Thank you!!!
Elgero, it works perfectly! After further testing, it look like the "stuck video" issue isn't limited to your utility. I was wrong, it happens to youtube-dl as well; including raw youtube download using wget.
The problem I have with my player looks like it presumes the media file doesnt grow; and, only reads the file length when it first starts playback. If the player looks at the file size; then I doubt there's anything that can be done.
Having said that, great job! Your utility is actually more functional than the original youtube-dl utility! You may see lots of people wanting to use this.
Quote:
Originally Posted by Elgero
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" -
|