View Single Post
  #56  
Old 06-19-2013, 10:44 AM
doitamd doitamd is offline
Junior Member
 
Join Date: Jun 2013
Posts: 1
doitamd is on a distinguished road
Default

Re: How to dump youtube live TV stream to file using commandline?


Hi Elgero,

I just ran into your tool few hours ago and found it very useful.
May I ask you to add one option - your current release exits right away if the live stream is not yet active. Is it possible to add something like 'wait until program starts' command line option, preferably with interval? e.g. "c:\>youtubedl -w 60 -u http://blah.", which means, try to download a program from blah, if the program is not active, wait 60 seconds and retry.
I need this option because I don't want to get stuck in front of my PC to start recording. How's this sound like?


BR

doitamd


Quote:
Originally Posted by Elgero View Post
Here's a new version.

https://rapidshare.com/files/18912184/YouTubeDL.zip

- Highest quality stream will be downloaded when format argument is omitted.
- Full url must be specified.
- Stream can be redirected to stdout and played with VLC.

I haven't done anything about the live stream getting stuck (yet). I have no idea what youtube-dl does and I'm not going to dig through the source code of youtube-dl or experiment for hours trying to find that out. If somebody can tell me how youtube-dl does it, then I might be able to fix it.

Code:
 -u <url>       YouTube url (e.g. http://www.youtube.com/watch?v=HcwTxRuq-uk).
 -l             Lists the available formats for this video.
 -f <number>    Video format to download (see -l).
                Highest quality available will be downloaded when omitted.
 -o <filepath>  FLV output path, if the filepath is - print stream to stdout.
                Video will be downloaded to the same folder as executable and
                YouTube page title will be used as filename when omitted.

Example #1 - List available formats:
  youtubedl -l -u http://www.youtube.com/watch?v=HcwTxRuq-uk

Example #2 - Download to current folder with page title as file name:
  youtubedl -f 34 -u http://www.youtube.com/watch?v=HcwTxRuq-uk

Example #3 - Dowload with path specified:
  youtubedl -f 34 -u http://www.youtube.com/watch?v=HcwTxRuq-uk -o "C:\a.flv"

Example #4 - Print stream to stdout and play in VLC:
  youtubedl -f 34 -u http://www.youtube.com/watch?v=HcwTxRuq-uk -o - | "C:\Program Files\VideoLAN\VLC\vlc.exe" -
Reply With Quote