Powershell newbie here: stream to VLC & download simultaneously

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by Profile photo of Ron Winfield Ron Winfield 3 months, 2 weeks ago.

  • Author
    Posts
  • #63511
    Profile photo of Ron Winfield
    Ron Winfield
    Participant

    I'm trying to use it because tee duplicates the output so I can see and download it simultaneously. I'm using Windows Powershell on Windows 7.

    I've been told on Linux it's

    youtube-dl -f Mobile "http://twitch.tv/Brotatoe" -o - | tee output.mp4 | vlc - 

    youtube-dl is the program, -f Mobile is video format mobile, the next is the origin URL, -o – reads media from stdin and streams it to stdout, I *think* output.mp is the downloaded filename, and vlc streams the media.

    At Powershell's suggestion and as vlc wasn't recognised, I changed it to

    .\youtube-dl -f Mobile "http://twitch.tv/Brotatoe" -o - | tee output.mp4 | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" - 

    Now I get a >> prompt, but no download or stream that I can see.

    I've gotten Streamlink to work with Powershell, but I haven't gotten the tee command to work for me yet.
    What do I do to get tee working, please?

  • #63612
    Profile photo of Don Jones
    Don Jones
    Keymaster

    The double-angle prompt indicates that PowerShell doesn't think the command is complete. For example, try this:

    Get-Service | (press Enter)
    

    You'll get the same prompt, because the pipe character tells the shell there's more, and so it's waiting for you to finish the command. You'll need to figure out what, in your syntax, is annoying it. I'm entirely not following what you're trying to do here, so I'm afraid I'm not going to be much help in fixing it, but that's what the prompt means.

    Additionally, I'm not sure the tee command will do quite what you're after. Linux' pipeline works pretty substantially different from PowerShell (or Windows in general, for that matter). You usually can't just copy and paste commands from Linux into Windows.

  • #63646
    Profile photo of Ron Winfield
    Ron Winfield
    Participant

    Thank you. I asked on a PowerShell IRC too, and they said to insert & before the VLC path. I did that, but the file was unplayable and it didn't launch VLC. They said PowerShell's tee doesn't play well with binary data.

    Those who suggested I turn to PowerShell are Linux users exclusively who saw tee on PS.

    Since you're a PowerShell native, do you know of a way, in general or practise, in PS that'll stream and download the same stream at the same time? Right now I do that, but it uses twice the bandwidth because I receive the same stream twice.

  • #63648
    Profile photo of Don Jones
    Don Jones
    Keymaster

    I don't. Honestly, most of the people I deal with are using PowerShell to automate network and server administration, not work with media. PowerShell's object-oriented; it doesn't "work well" with binary data is something of a misstatement, only because its pipeline is designed for objects, not raw data streams.

  • #63654
    Profile photo of Ron Winfield
    Ron Winfield
    Participant

    Do you know a good media forum upon which I might ask? I started with the forums for the programs I'm using, of course. I feel I just need to know who to ask, but I don't know who.

You must be logged in to reply to this topic.