PDA

View Full Version : How to dump youtube live TV stream to file using commandline?


MKANET
01-18-2013, 12:09 PM
I only know of only two ways to download a live youtube video:

The first way is using the full youtube URL using packet sniffing. This provides me a ridiculously long URL; which only works one or two times before I get a ERROR 403: Forbidden response.

For example:
wget.exe -O "C:\liveTV-flv http://r7---sn-nx57yn7r.c.youtube.com/liveplay?algorithm=throttle-factor&burst=40&cp=U0hUTVVQVl9HTENONF9NSlpHOldPTUFUX2ZQdzNt&expire=1358558622&factor=1.25&fexp=909711%2C916613%2C920704%2C912806%2C922403%2C 922405%2C929901%2C913605%2C925710%2C929104%2C92911 0%2C908493%2C920201%2C913302%2C919009%2C911116%2C9 26403%2C910221%2C901451&id=L7ird1HeEjw&ip=XXX.XXX.XXX.XXX&ipbits=8&itag=34&key=yt1&ms=nxu&mt=1358534109&mv=m&newshard=yes&ns=yt-live&signature=AF2D5423930D9DF2FD214BD5DFE8B2201049FBB6 .376F4E9ED9D70050FA2E1447994FB7FF47CB1B44&source=youtube&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip% 2Cipbits%2Citag%2Cns%2Csource%2Cupn%2Cexpire&sver=3&upn=PWDvz8C-i_w&cpn=9xjxhbO0_V_Q4bat&begin=Infinity&ptk=youtube_none"


The next way is using youtube-dl (python script). This way is very reliable and easy:

For example:
youtube-dl.exe --no-part --max-quality 22 -o C:\liveTV.flv http://www.youtube.com/watch?feature=player_embedded&v=L7ird1HeEjw


This allows me to use the share URL youtube provides. Unfortunately, this method starts to download the video starting from when the live TV event first began, instead of the current time of the live event. I dont know how to specify to download starting from current live broadcast time.

I was hoping someone could help me figure out the a consistent way to download this live TV stream starting from current time.

chap
01-18-2013, 02:55 PM
try use
ffmpeg -i "http://www.youtube.com/api/manifest/hls/ns/yt-live/id/L7ird1HeEjw?ipbits=0&fexp=912806,922403,922405,929901,913605,925710,929 104,929110,908493,920201,913302,919009,911116,9102 21,901451&ip=0.0.0.0&upn=9YCCj1LKFtA&sver=3&expire=1358569422&key=yt1&signature=5D978FEC838B33DC408C808994FD9BF942093ACF .508D9B2317448210736636866F47802ABAD13B27&sparams=id,ip,ipbits,ns,expire&file=index.m3u8" -c copy t.ts

MKANET
01-18-2013, 03:42 PM
Hi Chap, thank you so much for your help. I am able to use that URL. I have a question:

1. Is there a tutorial (or commandline app) which explains how to convert URLs like my original URL to a dependable URL? I prefer to learn to do this myself so I dont bother you for each URL :)

Sincerely,
MKANET

chap
01-18-2013, 05:21 PM
open(user agent=ipad)
http://m.youtube.com/watch?ajax=1&desktop_uri=/watch?feature=player_embedded&v=L7ird1HeEjw&feature=player_embedded&gl=RU&layout=mobile&tsp=1&utcoffset=120&v=L7ird1HeEjw&preq=
try use alternative
http://svnpenn.github.com/bm/

MKANET
01-18-2013, 11:24 PM
I think maybe I didn't explain correctly originally; or, there is a miscommunication. I have always been able to get a full URL to download a youtube video using packet sniffer apps. The problem is it doesnt work for more than a few times before I get a HTTP error 403 Forbidden error message. It seems like the URL you provided (below) has already stopped working.

I am actually looking for a reliable/consistent way to download the stream (starting at the current live TV position).

The closest I can get is when using the youtube-dl python script that I've already been using; except it seems like its meant for non-live TV videos (starts download from when the live TV stream first started to broadcast instead of "current" broadcast live TV position in the web browser.


try use
ffmpeg -i "http://www.youtube.com/api/manifest/hls/ns/yt-live/id/L7ird1HeEjw?ipbits=0&fexp=912806,922403,922405,929901,913605,925710,929 104,929110,908493,920201,913302,919009,911116,9102 21,901451&ip=0.0.0.0&upn=9YCCj1LKFtA&sver=3&expire=1358569422&key=yt1&signature=5D978FEC838B33DC408C808994FD9BF942093ACF .508D9B2317448210736636866F47802ABAD13B27&sparams=id,ip,ipbits,ns,expire&file=index.m3u8" -c copy t.ts

chap
01-19-2013, 12:04 AM
simple use
http://svnpenn.github.com/bm/

MKANET
01-19-2013, 11:24 AM
Yes, I tried both suggestions the first time you mentioned it. Unfortunately, it produces a URL that can only be used a few times. If I try to use it again, for example, the next day. The stream is no longer accessible using the URL produced by the below bookmarklet ...getting a HTTP error 403 Forbidden error message. It doesnt seem to be any better than the URLS I get via a protocol analyzer. The only way I can consistently get the stream is via youtube-dl; its unfortunately not really meant for live TV streams. Maybe there's something I'm missing?

simple use
http://svnpenn.github.com/bm/

MKANET
01-19-2013, 11:06 PM
I wish there was a way to explain what I'm try to do more clearly.

It looks like Youtube.com is smart enough to not allow a static URL to access a video stream file more than a couple of times. Otherwise, it would be too easy. Im sure the URL would change pretty quicky. So, it doesnt even seem feasible to expect some kind of magic URL pointing to the every time. If there is, I haven't found a way to do that yet.

I am hoping someone was able to make a Windows command-line tool which can convert friendly short youtube URLs to a "direct" long URL to the file. Basically what the bookmarket above does, except in a self contained command-line app.

If there as a command-line converter that converted URLs like this:
http://www.youtube.com/watch?v=6QRKvM27Gxc

to

http://r16---sn-p5q7ynee.c.youtube.com/liveplay?source=youtube&ns=yt-hangout&ipbits=8&sver=3&id=6QRKvM27Gxc&fexp=909711%2C916613%2C920704%2C912806%2C922403%2C 922405%2C929901%2C913605%2C925710%2C929104%2C92911 0%2C908493%2C920201%2C913302%2C919009%2C911116%2C9 26403%2C910221%2C901451&algorithm=throttle-factor&burst=40&cp=U0hUTVZTT19MTUNONF9OTVNGOlhPTUFUX2lJdjhu&key=yt1&ip=XXX.XXX.XXX.XXX&newshard=yes&expire=1358681573&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip% 2Cipbits%2Citag%2Cns%2Csource%2Cupn%2Cexpire&mv=m&upn=DDXnYbuhbPQ&mt=1358660531&ms=au&factor=1.25&itag=35&signature=5F0CAAEC60D98E25368AA4B12218F296764AB141 .872708DEDB774028EAFBF360464DE5B4DF40314D

That would be great! Hopefully, Im not the only person who wants to do something like this.

evol
01-20-2013, 06:22 AM
Not a answer really but you could look into seeing if there is a Windows port of clive or cclive ?
clive
http://clive.sourceforge.net/
cclive
http://cclive.sourceforge.net/

That's if you are using Windows ?

hasomaso
01-20-2013, 09:07 AM
@evol

thanks for cclive
i downloaded cclive for windows but i could not download a youtube video?

that is the parameter

cclive "YoutubeURL" -f


you can help





thx
hasomaso

MKANET
01-20-2013, 11:16 AM
EDIT: There aren't any updated cclive builds for windows.
It seems youtube-dl is the only commandline downloader that has a Windows executable.

MKANET
01-20-2013, 05:55 PM
Thanks, but I dont have cygwin; and, definitely not worth installing just for a shell script.

MKANET
01-20-2013, 06:54 PM
I wasn't begging and certainly not from you.

Beggars cant be choosers.

svnpenn5
01-20-2013, 07:21 PM
Suit yourself but it does work.

$ youtube.sh youtube.com/watch?v=LHelEIJVxiE
46 1080p WebM vp8
37 1080p MP4 h.264 high
45 720p WebM vp8
102 720p WebM vp8 3D
22 720p MP4 h.264 high
84 720p MP4 h.264 3D
44 480p WebM vp8
35 480p FLV h.264 main
43 360p WebM vp8
100 360p WebM vp8 3D
34 360p FLV h.264 main
18 360p MP4 h.264 baseline
82 360p MP4 h.264 3D
5 240p FLV h.263
36 240p 3GP mpeg4 simple
17 144p 3GP mpeg4 simple
usage: youtube.sh [ITAG] URL

$ youtube.sh 37 youtube.com/watch?v=LHelEIJVxiE
--2013-01-20 20:20:21-- http://r9---sn-q4f7dn7r.c.youtube.com/videop
layback?mv=m&source=youtube&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cra
tebypass%2Csource%2Cupn%2Cexpire&cp=U0hUTVdQV19JTUNONF9PSkFHOnFoNGhZS
WJkcWZm&ms=au&ipbits=8&sver=3&expire=1358759643&mt=1358734810&id=2c77
a5108255c621&itag=37&upn=TbYQqBTiOpY&newshard=yes&ip=99.109.97.214&ke
y=yt1&fexp=920704%2C912806%2C922403%2C922405%2C929901%2C 913605%2C9257
10%2C929104%2C929110%2C908493%2C920201%2C913302%2C 919009%2C911116%2C9
26403%2C910221%2C901451&ratebypass=yes&signature=2C8615065314DC13FA54
5E057ACAA37C55004942.85F61420F91DCDCBACACDF881B06D FBFC9938402
Resolving r9---sn-q4f7dn7r.c.youtube.com (r9---sn-q4f7dn7r.c.youtube.
com)... 173.194.24.142, 2001:4860:4002:4::e
Connecting to r9---sn-q4f7dn7r.c.youtube.com (r9---sn-q4f7dn7r.c.yout
ube.com)|173.194.24.142|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17891401 (17M) [video/mp4]
Saving to: `a.mp4'

100%[===========================>] 17,891,401 1.37M/s in 12s

2013-01-20 20:20:34 (1.37 MB/s) - `a.mp4' saved [17891401/17891401]

MKANET
01-20-2013, 07:35 PM
No doubt it works for you, but if I was going to install an entire cygwin environment on my machine, I would have done it a long time ago; and certainly not for a single script. I do have cygwin1.dll on my machine for a few standalone exe's, but that's about it.

Elgero
01-21-2013, 12:14 AM
I can write a commandline tool tomorrow that is similar to svnpenn's script, but it requires .NET Framework 2.0.

MKANET
01-21-2013, 01:33 AM
That would be great. I already have .NET Framework 2.0. I appreciate it.

I can write a commandline tool tomorrow that is similar to svnpenn's script, but it requires .NET Framework 2.0.

MKANET
01-21-2013, 03:39 AM
@svnpenn5 I really do appreciate pointing me to babycygwin. I didnt even know there was such a thing.

One of the reasons why I was hoping for a windows native command-line tool was because it's much easier for me to integrate into my existing Windows batch files and apps; plus, the output would display natively in my Windows command prompt. I'm sure there are probably ways to further bridge the gap; but, it's hard to pass up a Windows native command-line tool if it's available.

BTW: I did try youtube.sh. I think Im doing something fundamentally wrong. But, it gave an error for me. It would be good to get this to work just in case the .NET solution doesnt come through.

MKANET@Horizon ~
$ youtube.sh youtube.com/watch?v=LHelEIJVxiE
/bin/youtube.sh: line 4: syntax error near unexpected token `newline'
/bin/youtube.sh: line 4: `<!DOCTYPE html>'

svnpenn5
01-21-2013, 03:52 AM
MKANET@Horizon ~
$ youtube.sh youtube.com/watch?v=LHelEIJVxiE
/bin/youtube.sh: line 4: syntax error near unexpected token `newline'
/bin/youtube.sh: line 4: `<!DOCTYPE html>'


You need to get "Raw" version by clicking Raw link on GitHub.

MKANET
01-26-2013, 01:13 PM
@svnpenn5 @Elgero, the whole purpose of needing this functionality in the first place is because I currently have Windows applications that depend on a external youtube plugin (looks for a user-defined Windows EXE,BAT, or CMD) to handle youtube streaming. Ive been using youtube-dl.exe for this, but unfortunately youtube-dl.exe doesnt handle live-tv correctly. So, I've been searching for a suitable Win32/Win64 youtube-dl.exe replacement.

With the solution that svnpenn5 so kindly created, I have no idea how to tell it what to do from a windows command prompt. Below, is the functionality I would need for this to work:

c:\>youtube youtube.com/watch?v=LHelEIJVxiE
46 1080p WebM vp8
37 1080p MP4 h.264 high
45 720p WebM vp8
102 720p WebM vp8 3D
22 720p MP4 h.264 high
84 720p MP4 h.264 3D
44 480p WebM vp8
35 480p FLV h.264 main
43 360p WebM vp8
100 360p WebM vp8 3D
34 360p FLV h.264 main
18 360p MP4 h.264 baseline
82 360p MP4 h.264 3D
5 240p FLV h.263
36 240p 3GP mpeg4 simple
17 144p 3GP mpeg4 simple
usage: /bin/youtube.sh [FILEPATH] URL

c:\>youtube [I]46 "E:\TV Recordings\video.mp4" youtube.com/watch?v=LHelEIJVxiE
--2013-01-26 11:52:27-- http://r3---sn-jvhj5nu-a5me.c.youtube.com/videoplayback?cp=U0hUTlJQUF9JTUNONF9KSlRJOlhPTUFVX 2ZKeTVu&cpn=HK55ba8vKaCJnpL2&expire=1359252843&fexp=916613%2C920704%2C912806%2C922403%2C922405%2C 929901%2C913605%2C925710%2C929104%2C920201%2C91330 2%2C919009%2C911116%2C926403%2C910221%2C901451&id=2c77a5108255c621&ip=67.160.251.60&ipbits=8&itag=37&keepalive=yes&key=yt1&ms=au&mt=1359229695&mv=m&newshard=yes&range=0-11886591&ratebypass=yes&signature=7F31C85ACEBA29AF9EECFAC6232887A41BC66E34 .0940C484FAA680D30864333260B3AA17629DB3AE&source=youtube&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass% 2Csource%2Cupn%2Cexpire&sver=3&upn=foxK64JaswQ
Resolving r3---sn-jvhj5nu-a5me.c.youtube.com (r3---sn-jvhj5nu-a5me.c.youtube.com)... 208.117.232.142
Connecting to r3---sn-jvhj5nu-a5me.c.youtube.com (r3---sn-jvhj5nu-a5me.c.youtube.com)|208.117.232.142|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 15745447 (15M) [video/webm] Saving to: `E:\TV Recordings\video.mp4'
91% [==================================> ] 14,364,940 1.30M/s eta 1s

@svnpenn5, I hope this isn't asking too much (at this point it is getting closer to begging :) ), but is there any way you could convert your batch script into a Windows executable (with builtin baby-cygwin) that works like the above example?

BTW, @Elgero, did you change your mind to make a .net based script that does this?

Thanks so much,
MKANET

Elgero
01-26-2013, 01:53 PM
Can you give me an example of a livestream?

A live stream like this?

http://www.youtube.com/user/Aiekillu/featured?v=7Oo0eh55eGE&feature=plcp

:edit:

Changed live stream. Previous one went offline.

MKANET
01-26-2013, 01:58 PM
Like this one:
http://www.youtube.com/watch?v=L7ird1HeEjw

Edit: Just to be clear, youtube-dl CAN download live-tv streams like my example just fine, except they start downloading from the very beginning of the stream from several days ago (in case you didnt see this in my earlier posts in this thread). The temporary link produced be svnpenn (and my protocol analyzer) produce a url that downloads the livetv stream at the CURRENT live broadcat time; which is the right starting point.


Can you give me an example of a livestream?

A live stream like this?

http://www.youtube.com/user/Aiekillu/featured?v=7Oo0eh55eGE&feature=plcp

:edit:

Changed live stream. Previous one went offline.

Elgero
01-26-2013, 03:03 PM
Try this. I've only tested it on a few streams, but seems to work ok.

Usage: youtubedl L7ird1HeEjw

<deleted. new url below>

youtubedl L7ird1HeEjw
Downloading webpage. Please wait...
Finished downloading webpage.

Direct live url found.

http://r7---sn-5hn7sner.c.youtube.com/liveplay?itag=34&burst=40&cp=U0hUTlJRTl9HT
ENONF9KS1JHOm1fQ0xQMXI0NEpD&ip=94.214.98.54&newshard=yes&factor=1.25&key=yt1&mv=
m&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip% 2Cipbits%2Citag%2Cns%2Csourc
e%2Cupn%2Cexpire&source=youtube&upn=dLfnsgUlUvQ&sver=3&id=L7ird1HeEjw&ns=yt-live
&mt=1359237187&ipbits=8&ms=nxu&algorithm=throttle-factor&fexp=923114%2C914085%2C
916625%2C920704%2C912806%2C922403%2C922405%2C92990 1%2C913605%2C925710%2C929104%2
C906938%2C920201%2C913302%2C919009%2C911116%2C9264 03%2C910221%2C901451&expire=13
59260622&signature=6B3AFAA89A27F528D1164E4651D0408978DFAFBC .5DB9342DD465438CB8B5
357801AD67F7289C7E16

Saving as: HORIZON ARMENIAN TV LIVE.flv

Downloading Live Stream: 11.278 KB - 00:02:16

MKANET
01-26-2013, 03:58 PM
@Elgero, thank you so much for doing this!! I can confirm that it works for live TV likes such as the ones here: http://www.youtube.com/live/all. That's a big step closer to get it to work like svnpenn's script; which supports livetv and non-livetv full URLs.

Example usage:

c:\>
c:\>YouTubeDL.exe http://youtube.com/watch?v=LHelEIJVxiE

Available formats for stream:
46 1080p WebM vp8
37 1080p MP4 h.264 high
45 720p WebM vp8
102 720p WebM vp8 3D
22 720p MP4 h.264 high
84 720p MP4 h.264 3D
44 480p WebM vp8
35 480p FLV h.264 main
43 360p WebM vp8
100 360p WebM vp8 3D
34 360p FLV h.264 main
18 360p MP4 h.264 baseline
82 360p MP4 h.264 3D
5 240p FLV h.263
36 240p 3GP mpeg4 simple
17 144p 3GP mpeg4 simple

usage: YouTubeDL.exe [Format] [Filepath] [URL]

c:\>
c:\>YouTubeDL.exe 46 "E:\TV Recordings\video.mp4" http://youtube.com/watch?v=LHelEIJVxiE

Saving as: E:\TV Recordings\video.mp4
Downloading Youtube Stream: 237 KB - 00:00:02

Thanks again for all your trouble. A tool like this can easily get very popular; since it would have more usefulness than even the popular opensource project for "youtube-dl"

Elgero
01-26-2013, 05:00 PM
Try this one.

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

hasomaso
01-26-2013, 06:23 PM
hi,

youtubedl downloaded youtube videos ok
youtubedl also plays videos with VLC..?

I tested the same way

youtubedl oFjoCVZvA0Q 46 | c:\progra~1\videolan\vlc\vlc -

but does not work???

can you help me please




thx
hasomaso

MKANET
01-26-2013, 06:45 PM
This is almost perfect! There is a couple of very minor items I noticed:

Sorry, in advance that Issue 1 is so long. Its very hard for me to describe such a seemingly simple symptom:

Item 1: For example, while a media file is still downloading (20 seconds after starting the download), if I try to play it back in my media player, the video will playback up until 20 seconds, then get stuck.

It seems like there is a value/attribute saved in the media file which stores the media file's estimated length/size of the file. A couple of my media players seems to look at that value; and, stops at the file-length it reads when it first started playing the media file back.

I am hoping you might be able to remove this attribute in the media file so the player wont be able to read the length/size of the file, so it can continue playback back a growing media file.

Youtube-dl.exe already knows how to handle this issue and displays a NO-ETA for live TV streams:
[download] 0.1% of 2.00G at 66.15k/s ETA --:--
So, none of my players have a problem playback back liveTV streams.


Item 2: This is a very very minor issue, but if possible, could you make it so if the format is not specified by the user, it will automatically select the highest quality stream? This is also what Youtube-dl.exe does.


Issue 3: This is also a very minor issue, but if possible, could you also allow the full URL to be specified by the user? So, "http://www.youtube.com/watch?v=v_UyVmITiYQ" could be used instead of only "v_UyVmITiYQ". My applications use the full URL as their URL variable. No worries if this is too hard to do.


Thanks for all your time.. If possible, I would like to offer a donation via paypal for your time.

hasomaso
01-26-2013, 07:15 PM
I would also like the supportet youtubedl vlc

Elgero
01-26-2013, 07:54 PM
This is almost perfect! There is a couple of very minor items I noticed:

Sorry, in advance that Issue 1 is so long. Its very hard for me to describe such a seemingly simple symptom:

Item 1: For example, while a media file is still downloading (20 seconds after starting the download), if I try to play it back in my media player, the video will playback up until 20 seconds, then get stuck.

It seems like there is a value/attribute saved in the media file which stores the media file's estimated length/size of the file. A couple of my media players seems to look at that value; and, stops at the file-length it reads when it first started playing the media file back.

I am hoping you might be able to remove this attribute in the media file so the player wont be able to read the length/size of the file, so it can continue playback back a growing media file.

Youtube-dl.exe already knows how to handle this issue and displays a NO-ETA for live TV streams:
[download] 0.1% of 2.00G at 66.15k/s ETA --:--
So, none of my players have a problem playback back liveTV streams.


Item 2: This is a very very minor issue, but if possible, could you make it so if the format is not specified by the user, it will automatically select the highest quality stream? This is also what Youtube-dl.exe does.


Issue 3: This is also a very minor issue, but if possible, could you also allow the full URL to be specified by the user? So, "http://www.youtube.com/watch?v=v_UyVmITiYQ" could be used instead of only "v_UyVmITiYQ". My applications use the full URL as their URL variable. No worries if this is too hard to do.


Thanks for all your time.. If possible, I would like to offer a donation via paypal for your time.

Item 1:

FLV videos can contain metadata at the beginning with information about the video file, like the duration, but this is not the case with live streams from YouTube. Your video player probably reads the timestamp of the last audio/video frame and gets the duration that way.

I'm not sure what the problem is, but I can change the file permissions in the code (it's set to write only now) and maybe that will solve the issue. VLC doesn't have any problems with playing the video while downloading it and keeps on playing, so you might want to try that.

The 2.00G that youtube-dl shows is simply the content-length header returned from the youtube server. When downloading a normal file it returns the size of the file in bytes. With a live stream it returns 2147483648 (2GB).

Item 2:

Yes.

Item 3:

Yes.

I'll do it tomorrow.

Elgero
01-26-2013, 07:55 PM
I would also like the supportet youtubedl vlc

I need to modify it to be able to write to stdout.

I'll do it tomorrow.

MKANET
01-26-2013, 08:23 PM
Thanks for taking a look at this. Unfortunately, it's not possible for me to change my player. It's my media center software which runs my entire home's TV/Audio/Video in every room (SageTV). It has a plugin to allow me to do whatever I want using command-line; which I've used youtube-dl.exe for. Whatever the issue is, it doesnt look like its by accident that youtube-dl.exe is able able produce media file that's playable until the "real" end of the media file; which could go on indefinitely.

I have a feeling this might not be a file permissions issue. Whatever the issue is, it only affects liveTV videos produced with your executable, not video clips with a defined ending. if it was a permissions issue the same behavior would occur with video clips as well. For example, if I start download a 10 minute video; and, start playing it back in SageTV after 30 seconds, it will continue playing it back until the very end. This isn't true doing the same thing with liveTV clips. Do you think youtube-dl changes the livetv file attribute to have a fake, unobtainable very long video clip lenth such as a 10 hour video? that way the play will try to play it all the way until the end no matter what.

Anyway.. thanks a million for helping us!

Item 1:

FLV videos can contain metadata at the beginning with information about the video file, like the duration, but this is not the case with live streams from YouTube. Your video player probably reads the timestamp of the last audio/video frame and gets the duration that way.

I'm not sure what the problem is, but I can change the file permissions in the code (it's set to write only now) and maybe that will solve the issue. VLC doesn't have any problems with playing the video while downloading it and keeps on playing, so you might want to try that.

The 2.00G that youtube-dl shows is simply the content-length header returned from the youtube server. When downloading a normal file it returns the size of the file in bytes. With a live stream it returns 2147483648 (2GB).

Item 2:

Yes.

Item 3:

Yes.

I'll do it tomorrow.

Elgero
01-28-2013, 11:37 AM
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.

-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" -

hasomaso
01-28-2013, 12:35 PM
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.

-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" -



woww thanks

MKANET
01-28-2013, 01:17 PM
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. :)



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.

-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" -

MKANET
01-29-2013, 03:33 PM
Elgero, I hope you dont mind. I shared your tool with youtube-dl users who need better handling of live TV video downloads.

BTW: I'm not sure if this is fixable or not. But, on some live TV videos, there is no format detected. The same thing happens with youtube-dl.exe

C:>youtubedl.exe -u http://www.youtube.com/watch?v=LJHdBB3YX9k
Specified format not found.

C:>youtubedl.exe -l -u http://www.youtube.com/watch?v=LJHdBB3YX9k
Available formats for this stream:

Elgero
01-29-2013, 04:04 PM
Yes, that's fine.

I don't think it's easy to fix. Not all live streams are from YouTube. Some live streams are from other websites, but embedded on the YouTube website. The white house streams are from live.whitehouse.gov (Akamai) and as far as I know they provide rtmp streams.

hasomaso
02-15-2013, 11:47 AM
hello Elgero,

thank you for the great youtube-dl tool, works perfect mate ;)

can you please expand the tool and a few streaming sites integrate?

the sites are free...


for example this sites

1. http://xhamster.com/

2. http://www.thenewporn.com

3. http://www.tnaflix.com/

4. http://www.youporn.com/





thx Bro.
hasomaso

Elgero
02-15-2013, 12:14 PM
Sorry, that's not going to happen. I spent several hours making this tool and it has only been downloaded 11 times in almost 3 weeks, so there isn't much interest in this tool. If I add those websites, then I'm basically just doing it for you and I'm not going to do that.

There are already a lot of tools out there that can download from all these websites.

hasomaso
02-15-2013, 01:05 PM
Sorry, that's not going to happen. I spent several hours making this tool and it has only been downloaded 11 times in almost 3 weeks, so there isn't much interest in this tool. If I add those websites, then I'm basically just doing it for you and I'm not going to do that.

There are already a lot of tools out there that can download from all these websites.



hello Elgero,

i can understand you well, but you can force anyone
of course there are many download tools on the internet, but youtube-dl has certain something.

I would be happy, if you are integrating the pages in your great tool

my email you can find under my profile



thx
hasomaso

Elgero
02-15-2013, 02:21 PM
Like I said, I won't do it. It's a 'YouTube' downloader that was designed for downloading from YouTube only. Adding other websites to the tool requires me to rewrite most of the tool and already nobody is interested. And if one of these websites changes something, then I am forced to update it. I'm really not interested in writing or updating a tool just for a handful of people, while I'm not using it myself.

Maybe you can contact the author of youtube-dl (another console youtube downloader), to add support for those websites. He already added xvideos.com, so he might add other websites as well.

cezi1
02-15-2013, 03:03 PM
@Elgero

that's your decision, but real shame my friend
who is the author of youtube-dl?

DEAD_MAN_WALKING
02-17-2013, 10:19 AM
I spent several hours making this tool and it has only been downloaded 11 times in almost 3 weeks, so there isn't much interest in this tool.

You might get a few more downloads now mate...;)

Great work keep it up.

http://forum.wiziwig.eu/threads/81476-YouTubeDL-YouTube-Live-Streams

djensen1234@gmail.com
03-15-2013, 03:49 PM
hello all

thanks so much for the rip program

however trying to rip this

http://www.youtube.com/watch?v=A0H7-eZm4Mg&pxtry=1

to no succes...

C:\>youtubedl -l -u http://www.youtube.com/watch?v=A0H7-eZm4Mg&pxtry=1

Available formats for this stream:

'pxtry' blev ikke genkendt som en intern eller ekstern kommando,
et program eller en batchfil.


in danish... saying pxtry was not recognized as an internal or external command, program or batchfile...

can somebody explain ...?

thanks :)

TubeDigger
03-15-2013, 04:01 PM
however trying to rip this
http://www.youtube.com/watch?v=A0H7-eZm4Mg&pxtry=1
to no succes...

ffmpeg -i "http://www.youtube.com/api/manifest/hls_playlist/id/A0H7-eZm4Mg.1/itag/93/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/playlist_type/LIVE/cp/U0hVSFRLU19FUENONV9MRVdCOnN3MkNVSkZtaTJX/maudio/1/pmbypass/yes/sver/3/fexp/912806,902000,919512,929901,913605,906938,931202,9 31401,908529,930803,920201,929602,930101,930603,90 0824/upn/B1D7NPMwzLo/cpn/3j6T84km9gzfdL_V/ip/188.230.10.206/ipbits/8/expire/1363405106/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,playlist_type,cp,maudio,pmbypass/signature/4516D925E719FDAECAD772CF28B1DB7698C4E6C1.47CAFC076 F0D04E5E5AE278DECC6D80E58AAE980/key/dg_yt0/file/index.m3u8" -c copy out.ts

Elgero
03-15-2013, 04:27 PM
hello all

thanks so much for the rip program

however trying to rip this

http://www.youtube.com/watch?v=A0H7-eZm4Mg&pxtry=1

to no succes...

C:\>youtubedl -l -u http://www.youtube.com/watch?v=A0H7-eZm4Mg&pxtry=1

Available formats for this stream:

'pxtry' blev ikke genkendt som en intern eller ekstern kommando,
et program eller en batchfil.


in danish... saying pxtry was not recognized as an internal or external command, program or batchfile...

can somebody explain ...?

thanks :)

The reason why you get that error is because you can't use an ampersand (&) in the url. You must either remove "&pxtry=1" or escape the ampersand with a caret.

http://www.youtube.com/watch?v=A0H7-eZm4Mg

or

http://www.youtube.com/watch?v=A0H7-eZm4Mg^&pxtry=1


The tool was written in a very short time and doesn't support every live video on YouTube, so even after removing "&pxtry=1" or escaping the ampersand it won't work unfortunately.

djensen1234@gmail.com
03-15-2013, 04:59 PM
ok... thank you for using the time to reply...

i can confirm it wont work...

trying to go down the ffmpeg way... though starting from scratch from a new virtuel linux install

so... dont know how this is gonna end .... and i really want to get started recording.... will tell you how this ends.. :)

djensen1234@gmail.com
03-15-2013, 05:12 PM
i tried this

http://ffmpeg.zeranoe.com/builds/

and the command from tubedigger

same problem with &pxtry

and this

http://www.youtube.com/watch?v=A0H7-eZm4Mg: Invalid data found when processing input

magichandz
03-16-2013, 09:21 AM
ffmpeg -i "http://www.youtube.com/api/manifest/hls_playlist/id/A0H7-eZm4Mg.1/itag/93/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/playlist_type/LIVE/cp/U0hVSFRLU19FUENONV9MRVdCOnN3MkNVSkZtaTJX/maudio/1/pmbypass/yes/sver/3/fexp/912806,902000,919512,929901,913605,906938,931202,9 31401,908529,930803,920201,929602,930101,930603,90 0824/upn/B1D7NPMwzLo/cpn/3j6T84km9gzfdL_V/ip/188.230.10.206/ipbits/8/expire/1363405106/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,playlist_type,cp,maudio,pmbypass/signature/4516D925E719FDAECAD772CF28B1DB7698C4E6C1.47CAFC076 F0D04E5E5AE278DECC6D80E58AAE980/key/dg_yt0/file/index.m3u8" -c copy out.tsi'm trying to record that stream too. the ffmpeg method definitely works but i ran into a problem where it stops downloading the stream after about 2 or 3 hours. the stream is about 10 hours long. is there any way to make sure it gets the whole thing?

magichandz
03-17-2013, 12:09 AM
i just discovered a bigger problem with this stream
http://www.youtube.com/watch?v=A0H7-eZm4Mg&hd=1

the ffmpeg method only captures the video but no audio. not sure why.

EDIT: looks like i was using the wrong m3u8 file. i used the one from the page source not the network monitor.

chap
03-17-2013, 12:37 AM
try
ffmpeg -i "bla,bla,bla" -c copy -absf aac_adtstoasc t.mp4

southz
03-21-2013, 09:39 AM
this seems to be a nice Tool. Due to law restrictions in Germany I have to use a proxy for Live Broadcasts. This Proxy uses authentication with username/pw. Using this toll throws "Error downloading webpage: 407 - Proxy Authentication Required". I haven't found any possible way to authenticate in cmd

magichandz
03-21-2013, 07:24 PM
occasionally i get this message using ffmpeg
"skipping 11 segments ahead, expired from playlists"

do anyone know how to get the right m3u8 file so i get all segments in the final video?

magichandz
03-22-2013, 09:37 AM
this seems to be a nice Tool. Due to law restrictions in Germany I have to use a proxy for Live Broadcasts. This Proxy uses authentication with username/pw. Using this toll throws "Error downloading webpage: 407 - Proxy Authentication Required". I haven't found any possible way to authenticate in cmdhave you tried "user : pass @ proxyaddress" ?

magichandz
03-22-2013, 09:39 AM
try
ffmpeg -i "bla,bla,bla" -c copy -absf aac_adtstoasc t.mp4this works for changing containers from ts to mp4 after the fact but capturing on the fly i get mixed results.

southz
03-22-2013, 09:24 PM
have you tried "user : pass @ proxyaddress" ?

yeah.. win won't do this... im tryin this on my debian machine right now.. youtube-dl aborts with ERROR: no conn or url_encoded_fmt_stream_map information found in video info

File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/bin/youtube-dl/__main__.py", line 17, in <module>
youtube_dl.main()
File "/usr/bin/youtube-dl/youtube_dl/__init__.py", line 514, in main
_real_main()
File "/usr/bin/youtube-dl/youtube_dl/__init__.py", line 498, in _real_main
retcode = fd.download(all_urls)
File "/usr/bin/youtube-dl/youtube_dl/FileDownloader.py", line 508, in download
videos = ie.extract(url)
File "/usr/bin/youtube-dl/youtube_dl/InfoExtractors.py", line 93, in extract
return self._real_extract(url)
File "/usr/bin/youtube-dl/youtube_dl/InfoExtractors.py", line 560, in _real_extract
self._downloader.trouble(u'ERROR: no conn or url_encoded_fmt_stream_map information found in video info')
File "/usr/bin/youtube-dl/youtube_dl/FileDownloader.py", line 230, in trouble
tb_data = traceback.format_list(traceback.extract_stack())


and this shell script does much other weird stuff:

decode ()
{
read $1 < <(sed 's % \\\\x g' <<< ${!2} | xargs printf)
}
usage ()
{
echo usage: $0 [ITAG] URL;
exit
}
warn ()
{
printf '\e[36m%s\e[m\n' "$*"
}
printf: fehlender Operand
„printf --help“ gibt weitere Informationen.
/home/southz/youtube.sh: Zeile 65: [: 18: Einstelliger (unärer) Operator erwartet.
/home/southz/youtube.sh: Zeile 83: [: =: Einstelliger (unärer) Operator erwartet.
--2013-03-23 04:21:29-- http://&signature=/
Auflösen des Hostnamen »XXXXXXXXX (XXXXXXXXXX)«... XXX.XXX.XXX.XXX, XXX.XXX.XXX.XXX
Verbindungsaufbau zu XXXXXXXXXX (XXXXXXXXXX)|XXXXXXXXXX|:80... verbunden.
Proxy-Anforderung gesendet, warte auf Antwort... 502 Proxy Error
2013-03-23 04:21:32 FEHLER 502: Proxy Error.

doitamd
06-19-2013, 10:44 AM
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


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.

-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" -

Elgero
06-19-2013, 08:40 PM
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

Sorry, but I can't add any new options, because I don't have the source code and the compiled executable anymore. There wasn't much interest in the tool, so I deleted everything.

Spinnaker2001
06-22-2013, 12:19 PM
I'm surprised nobody has mentioned the youtube-dl CLI tool. I personally use it on Ubuntu Linux but it also is supported by Windows and OSX, here is a link to their site: http://rg3.github.io/youtube-dl/

Its insanely simply to use, here is a usage example:
In this example, I will use this YouTube video: http://www.youtube.com/watch?v=bV9L5Ht9LgY

youtube-dl http://www.youtube.com/watch?v=bV9L5Ht9LgY
Note: For me this downloaded the video's 1080p resolution with h.264/aac codecs (iTag 37 which Ill explain later).

The filename of the video was that of the URL's video, simply bV9L5Ht9LgY.mp4 if you want to download the video with the video's title as the file name simply use this command:

youtube-dl http://www.youtube.com/watch?v=bV9L5Ht9LgY -o %\(stitle\)s\.%\(ext\)s

The filename that was downloaded was: Download_Youtube_Playlist_with_Youtube-dl.mp4

If you want to specify the resolution or codec type for the video you can easily do so by using the iTag value that YouTube uses. To view a list of the video's iTag values (without downloading the video) use the -F flag in the command:
youtube-dl -F http://www.youtube.com/watch?v=bV9L5Ht9LgY -o %\(stitle\)s\.%\(ext\)s

The result will look as such:
[youtube] Setting language
[youtube] bV9L5Ht9LgY: Downloading video webpage
[youtube] bV9L5Ht9LgY: Downloading video info webpage
[youtube] bV9L5Ht9LgY: Extracting video information
Available formats:
37 : mp4 [1080x1920]
46 : webm [1080x1920]
22 : mp4 [720x1280]
45 : webm [720x1280]
35 : flv [480x854]
34 : flv [360x640]
18 : mp4 [360x640]
43 : webm [360x640]
5 : flv [240x400]
17 : mp4 [144x176]

Since I'm a geek for mp4 I'm going to go with the the 37 iTag value and use the video's title as its' file name:
youtube-dl -f 37 http://www.youtube.com/watch?v=bV9L5Ht9LgY -o %\(stitle\)s\.%\(ext\)s

If your curious, all of YouTube's iTag values are listed here: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs

Lastly, this awesome tool is not limited to just YouTube. It also works on a list of other sites like Vimeo, DailyMotion, DepositFiles, CollegeHumor, etc etc. A list of all sites this works with is available here: http://rg3.github.io/youtube-dl/documentation.html#d4

magichandz
09-27-2013, 06:20 PM
trying to download live stream
http://www.youtube.com/watch?v=Bht5_9sUg3k&hd=1

seems youtube has changed the url format. ffmpeg method not working like before. getting a 403 error.

ffmpeg -i "http://www.youtube.com/api/manifest/hls_playlist/id/Bht5_9sUg3k.1/itag/95/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/Bht5_9sUg3k.1_95/cp/U0hXRVNQT19NSkNON19LSlNEOk9MNkh6Z0xWUDZz/pmbypass/yes/playlist_type/DVR/maudio/1/upn/AtW_LbeiVCA/sver/3/fexp/926400,906946,932242,916807,916625,929305,924606,9 16914,929117,929121,929906,929907,929922,929923,92 9127,929129,929131,929930,936403,925724,925726,936 310,925720,925722,925718,936401,925714,929917,9299 33,929935,929937,929939,939602,939604,937102,90684 2,913428,912715,919811,932309,913563,919373,930803 ,908536,908538,938701,931924,940501,936308,909549, 900816,912711,934507,907231,936312,906001/cpn/RKjJU5hq-RpziBMV/ip/174.109.39.220/ipbits/8/expire/1380351380/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,hls_chunk_host,gir,dg_shard,cp,pmb ypass,playlist_type,maudio/signature/18FFB16ACCD670DD64CC90D58AEFC0EB61CD5750.1E71A2A68 A0EE0A09E64B21F2522D00860DCC20B/key/dg_yt0/file/index.m3u8?start_seq=967" -c copy stream3.ts
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on May 20 2013 05:39:32 with gcc 4.2.1 (GCC) (Apple Inc. build 5666) (dot 3)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libfreetype --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[http @ 0x102013a00] HTTP error 403 Forbidden
[hls,applehttp @ 0x10202a000] Error when loading first segment 'http://www.youtube.com/videoplayback/id/Bht5_9sUg3k.1/itag/95/source/yt_live_broadcast/sq/967/file/seg.ts?ratebypass=yes&cmbypass=yes&newshard=yes&hls_chunk_host=www.youtube.com&gir=yes&dg_shard=Bht5_9sUg3k.1_95&cp=U0hXRVNQT19NSkNON19LSlNEOk9MNkh6Z0xWUDZz&pmbypass=yes&playlist_type=DVR&maudio=1&upn=AtW_LbeiVCA&sver=3&fexp=926400,906946,932242,916807,916625,929305,924 606,916914,929117,929121,929906,929907,929922,9299 23,929127,929129,929131,929930,936403,925724,92572 6,936310,925720,925722,925718,936401,925714,929917 ,929933,929935,929937,929939,939602,939604,937102, 906842,913428,912715,919811,932309,913563,919373,9 30803,908536,908538,938701,931924,940501,936308,90 9549,900816,912711,934507,907231,936312,906001&cpn=RKjJU5hq-RpziBMV&ip=174.109.39.220&ipbits=8&expire=1380351380&sparams=ip,ipbits,expire,id,itag,source,ratebypass ,live,cmbypass,newshard,hls_chunk_host,gir,dg_shar d,cp,pmbypass,playlist_type,maudio&signature=18FFB16ACCD670DD64CC90D58AEFC0EB61CD5750 .1E71A2A68A0EE0A09E64Bhttp://www.youtube.com/api/manifest/hls_playlist/id/Bht5_9sUg3k.1/itag/95/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/Bht5_9sUg3k.1_95/cp/U0hXRVNQT19NSkNON19LSlNEOk9MNkh6Z0xWUDZz/pmbypass/yes/playlist_type/DVR/maudio/1/upn/AtW_LbeiVCA/sver/3/fexp/926400,906946,932242,916807,916625,929305,924606,9 16914,929117,929121,929906,929907,929922,929923,92 9127,929129,929131,929930,936403,925724,925726,936 310,925720,925722,925718,936401,925714,929917,9299 33,929935,929937,929939,939602,939604,937102,90684 2,913428,912715,919811,932309,913563,919373,930803 ,908536,908538,938701,931924,940501,936308,909549, 900816,912711,934507,907231,936312,906001/cpn/RKjJU5hq-RpziBMV/ip/174.109.39.220/ipbits/8/expire/1380351380/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,hls_chunk_host,gir,dg_shard,cp,pmb ypass,playlist_type,maudio/signature/18FFB16ACCD670DD64CC90D58AEFC0EB61CD5750.1E71A2A68 A0EE0A09E64B21F2522D00860DCC20B/key/dg_yt0/fil

chap
09-27-2013, 11:10 PM
use latest ffmpeg

fix
http://trac.ffmpeg.org/ticket/2976

REACH
09-29-2013, 03:08 AM
Thanks

magichandz
09-30-2013, 12:23 AM
use latest ffmpeg

fix
http://trac.ffmpeg.org/ticket/2976updated to latest ffmpeg. still getting 403 error.
http://www.youtube.com/watch?v=8sdLAHzZVMc&hd=1

tried using chrome network monitor to get m3u8 and get this

$ ffmpeg -i "http://www.youtube.com/api/manifest/hls_playlist/id/8sdLAHzZVMc.1/itag/95/source/yt_liyes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/8sdLAHzZVMc.1_95/playlist_type/DVR/cp/U0hXRVVPVV9LU0NON19NSVlGOkVCdE1XU0VHT0hK/pmbypass/yes/maudio/1/fexp/901482,938610,900376,916611,929305,939104,924606,9 16914,929117,929121,929906,929907,929922,929923,92 9127,929129,929131,929930,936403,925724,925726,936 310,925720,925722,925718,936401,925714,929917,9069 45,929933,929935,929937,929939,939602,939604,93710 2,906842,913428,920605,912715,919811,932309,913563 ,919373,930803,908536,938701,931924,940501,936308, 909549,935006,900816,912711,900378,934507,907231,9 36312,906001/upn/NrvSS41mV1o/sver/3/cpn/88jOG8SdQIl5HPFH/ip/{my-ip}/ipbits/8/expire/1380547569/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,hls_chunk_host,gir,dg_shard,playli st_type,cp,pmbypass,maudio/signature/3B48DEFBA1CB95A7DEE2E1FB81A60AB9CB642012.8A6432A4E 596019E09AA24BF7D74CBA1EDBD3E25/key/dg_yt0/file/index.m3u8?start_seq=5384" -c copy stream.ts
ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 25 2013 06:03:35 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-libfreetype --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[http @ 0x7fdbb2830200] HTTP error 403 Forbidden
[hls,applehttp @ 0x7fdbb2813000] Error when loading first segment 'http://www.youtube.com/videoplayback/id/8sdLAHzZVMc.1/itag/95/source/yt_live_broadcast/sq/5384/file/seg.ts?ratebypass=yes&cmbypass=yes&newshard=yes&hls_chunk_host=www.youtube.com&gir=yes&dg_shard=8sdLAHzZVMc.1_95&playlist_type=DVR&cp=U0hXRVVPVV9LU0NON19NSVlGOkVCdE1XU0VHT0hK&pmbypass=yes&maudio=1&fexp=901482,938610,900376,916611,929305,939104,924 606,916914,929117,929121,929906,929907,929922,9299 23,929127,929129,929131,929930,936403,925724,92572 6,936310,925720,925722,925718,936401,925714,929917 ,906945,929933,929935,929937,929939,939602,939604, 937102,906842,913428,920605,912715,919811,932309,9 13563,919373,930803,908536,938701,931924,940501,93 6308,909549,935006,900816,912711,900378,934507,907 231,936312,906001&upn=NrvSS41mV1o&sver=3&cpn=88jOG8SdQIl5HPFH&ip={my-ip}&ipbits=8&expire=1380547569&sparams=ip,ipbits,expire,id,itag,source,ratebypass ,live,cmbypass,newshard,hls_chunk_host,gir,dg_shar d,playlist_type,cp,pmbypass,maudio&signature=3B48DEFBA1CB95A7DEE2E1FB81A60AB9CB642012 http://www.youtube.com/api/manifest/hls_playlist/id/8sdLAHzZVMc.1/itag/95/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/8sdLAHzZVMc.1_95/playlist_type/DVR/cp/U0hXRVVPVV9LU0NON19NSVlGOkVCdE1XU0VHT0hK/pmbypass/yes/maudio/1/fexp/901482,938610,900376,916611,929305,939104,924606,9 16914,929117,929121,929906,929907,929922,929923,92 9127,929129,929131,929930,936403,925724,925726,936 310,925720,925722,925718,936401,925714,929917,9069 45,929933,929935,929937,929939,939602,939604,93710 2,906842,913428,920605,912715,919811,932309,913563 ,919373,930803,908536,938701,931924,940501,936308, 909549,935006,900816,912711,900378,934507,907231,9 36312,906001/upn/NrvSS41mV1o/sver/3/cpn/88jOG8SdQIl5HPFH/ip/{my-ip}/ipbits/8/expire/1380547569/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,hls_chunk_host,gir,dg_shard,playli st_type,cp,pmbypass,maudio/signature/3B48DEFBA1CB95A7DEE2E1FB81A60AB9CB642012.8A6432A4E 596019E09AA24BF7D74CBA1ED

lesor
09-30-2013, 02:31 AM
See this video (http://rghost.ru/private/49060603/b50212c6f4be88a198e45c02372ea245)

magichandz
10-06-2013, 02:15 PM
See this video (http://rghost.ru/private/49060603/b50212c6f4be88a198e45c02372ea245)thanks a lot for this lesor. i tried opening the m3u8 file and picking the right url but i still get a 403 error. the problem must be my version of ffmpeg.

i updated mine via mac ports. not sure which version it gave me. probably the latest stable release 2.0.1. might have to try N-56704-g3e0c78b

http://www.youtube.com/watch?v=NUhD8EJApAs

ffmpeg -i "http://www.youtube.com/api/manifest/hls_playlist/id/NUhD8EJApAs.1/itag/95/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/NUhD8EJApAs.1_95/maudio/1/playlist_type/DVR/pmbypass/yes/cp/U0hXRlFMTl9JS0NON19JRlJHOjJJMWtINjJmcXVC/sver/3/upn/36S79ghugfs/fexp/926404,919813,910207,923500,924606,924616,916914,9 29117,929121,929906,929907,929922,929923,929127,92 9129,929131,929930,936403,925724,925726,936310,925 720,925722,925718,936401,925714,929917,906945,9299 33,929935,929937,929939,939602,939604,912909,93710 2,906842,913428,920605,912715,919811,939908,935704 ,932309,913563,919373,930803,908538,932211,934003, 934004,931924,938608,940501,936308,939201,900816,9 12711,916304,900391,934507,907231,936312,906001/cpn/tDrvnVYNynJg2eWd/ip/{my-ip}/ipbits/8/expire/1381110641/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,hls_chunk_host,gir,dg_shard,maudio ,playlist_type,pmbypass,cp/signature/7A1ABD0771F989C664A07354F48EAD17F17AF8DF.792C1864C CB5BDFBD85DE96833D09B12EAB0122C/key/dg_yt0/file/index.m3u8" -c copy out.ts
ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 25 2013 06:03:35 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-libfreetype --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[http @ 0x7f93941e3c00] HTTP error 403 Forbidden
[hls,applehttp @ 0x7f9394013000] Error when loading first segment 'http://www.youtube.com/videoplayback/id/NUhD8EJApAs.1/itag/95/source/yt_live_broadcast/sq/0/file/seg.ts?ratebypass=yes&cmbypass=yes&newshard=yes&hls_chunk_host=www.youtube.com&gir=yes&dg_shard=NUhD8EJApAs.1_95&maudio=1&playlist_type=DVR&pmbypass=yes&cp=U0hXRlFMTl9JS0NON19JRlJHOjJJMWtINjJmcXVC&sver=3&upn=36S79ghugfs&fexp=926404,919813,910207,923500,924606,924616,916 914,929117,929121,929906,929907,929922,929923,9291 27,929129,929131,929930,936403,925724,925726,93631 0,925720,925722,925718,936401,925714,929917,906945 ,929933,929935,929937,929939,939602,939604,912909, 937102,906842,913428,920605,912715,919811,939908,9 35704,932309,913563,919373,930803,908538,932211,93 4003,934004,931924,938608,940501,936308,939201,900 816,912711,916304,900391,934507,907231,936312,9060 01&cpn=tDrvnVYNynJg2eWd&ip={my-ip}&ipbits=8&expire=1381110641&sparams=ip,ipbits,expire,id,itag,source,ratebypass ,live,cmbypass,newshard,hls_chunk_host,gir,dg_shar d,maudio,playlist_type,pmbypass,cp&signature=7A1ABD07http://www.youtube.com/api/manifest/hls_playlist/id/NUhD8EJApAs.1/itag/95/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/NUhD8EJApAs.1_95/maudio/1/playlist_type/DVR/pmbypass/yes/cp/U0hXRlFMTl9JS0NON19JRlJHOjJJMWtINjJmcXVC/sver/3/upn/36S79ghugfs/fexp/926404,919813,910207,923500,924606,924616,916914,9 29117,929121,929906,929907,929922,929923,929127,92 9129,929131,929930,936403,925724,925726,936310,925 720,925722,925718,936401,925714,929917,906945,9299 33,929935,929937,929939,939602,939604,912909,93710 2,906842,913428,920605,912715,919811,939908,935704 ,932309,913563,919373,930803,908538,932211,934003, 934004,931924,938608,940501,936308,939201,900816,9 12711,916304,900391,934507,907231,936312,906001/cpn/tDrvnVYNynJg2eWd/ip/{my-ip}/ipbits/8/expire/1381110641/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,hls_chunk_host,gir,dg_shard,maudio ,playlist_type,pmbypass,cp/signature/7A1ABD0771F989C664A07354F48EAD17F17AF8DF

magichandz
03-28-2014, 06:00 PM
i'm recording again this year.
http://www.youtube.com/watch?v=MF0UNmHzu5Y&hd=1

after about an hour the stream disconnects. anyone have any ideas why? i restart it with the same m3u8 file and it starts downloading again. since it does that i don't think the m3u8 is the problem. i get it straight out of the page source not using developer tools or firebug.

is there some script i could write to tell ffmpeg to execute the command again if the stream disconnects?

ffmpeg -i "http://www.youtube.com/api/manifest/hls_playlist/id/MF0UNmHzu5Y.1/itag/95/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/gir/yes/dg_shard/MF0UNmHzu5Y.1_95/hls_chunk_host/www.youtube.com/maudio/1/pmbypass/yes/playlist_type/LIVE/gcr/us/fexp/906373,931946,938647,914089,937417,913434,936910,9 36913,934022/sver/3/upn/ijUA-7cc8gI/ip/{my-ip}/ipbits/0/expire/1396073058/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,gir,dg_shard,hls_chunk_host,maudio ,pmbypass,playlist_type,gcr/signature/14C8FBE4DEB9D29DB85FC0AE6A552445526A13B8.8F86EAC08 60F4D4591799128175A839A572793DB/key/dg_yt0/file/index.m3u8" -c copy ultra02.ts
ffmpeg version 2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 25 2014 08:36:03 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-fontconfig --enable-libfreetype --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
[hls,applehttp @ 0x7fd0d5000600] Estimating duration from bitrate, this may be inaccurate
Input #0, hls,applehttp, from 'http://www.youtube.com/api/manifest/hls_playlist/id/MF0UNmHzu5Y.1/itag/95/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/gir/yes/dg_shard/MF0UNmHzu5Y.1_95/hls_chunk_host/www.youtube.com/maudio/1/pmbypass/yes/playlist_type/LIVE/gcr/us/fexp/906373,931946,938647,914089,937417,913434,936910,9 36913,934022/sver/3/upn/ijUA-7cc8gI/ip/{my-ip}/ipbits/0/expire/1396073058/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,gir,dg_shard,hls_chunk_host,maudio ,pmbypass,playlist_type,gcr/signature/14C8FBE4DEB9D29DB85FC0AE6A552445526A13B8.8F86EAC08 60F4D4591799128175A839A572793DB/key/dg_yt0/file/index.m3u8':
Duration: 00:00:00.12, start: 1815.000000, bitrate: 233 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 256 kb/s
Output #0, mpegts, to 'ultra02.ts':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 90k tbn, 25 tbc
Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 256 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[tcp @ 0x7fd0d3e05760] Failed to resolve hostname www.youtube.com: nodename nor servname provided, or not known
[tcp @ 0x7fd0d3c00f20] Failed to resolve hostname www.youtube.com: nodename nor servname provided, or not known
frame=49250 fps= 25 q=-1.0 Lsize= 644339kB time=00:32:50.01 bitrate=2679.4kbits/s
video:528667kB audio:61563kB subtitle:0 data:0 global headers:0kB muxing overhead 9.167596%

$ ffmpeg -i "http://www.youtube.com/api/manifest/hls_playlist/id/MF0UNmHzu5Y.1/itag/95/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/gir/yes/dg_shard/MF0UNmHzu5Y.1_95/hls_chunk_host/www.youtube.com/maudio/1/pmbypass/yes/playlist_type/LIVE/gcr/us/fexp/906373,931946,938647,914089,937417,913434,936910,9 36913,934022/sver/3/upn/ijUA-7cc8gI/ip/{my-ip}/ipbits/0/expire/1396073058/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,gir,dg_shard,hls_chunk_host,maudio ,pmbypass,playlist_type,gcr/signature/14C8FBE4DEB9D29DB85FC0AE6A552445526A13B8.8F86EAC08 60F4D4591799128175A839A572793DB/key/dg_yt0/file/index.m3u8" -c copy ultra03.ts
ffmpeg version 2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 25 2014 08:36:03 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-fontconfig --enable-libfreetype --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
[hls,applehttp @ 0x7f900381b400] Estimating duration from bitrate, this may be inaccurate
Input #0, hls,applehttp, from 'http://www.youtube.com/api/manifest/hls_playlist/id/MF0UNmHzu5Y.1/itag/95/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/gir/yes/dg_shard/MF0UNmHzu5Y.1_95/hls_chunk_host/www.youtube.com/maudio/1/pmbypass/yes/playlist_type/LIVE/gcr/us/fexp/906373,931946,938647,914089,937417,913434,936910,9 36913,934022/sver/3/upn/ijUA-7cc8gI/ip/{my-ip}/ipbits/0/expire/1396073058/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cm bypass,newshard,gir,dg_shard,hls_chunk_host,maudio ,pmbypass,playlist_type,gcr/signature/14C8FBE4DEB9D29DB85FC0AE6A552445526A13B8.8F86EAC08 60F4D4591799128175A839A572793DB/key/dg_yt0/file/index.m3u8':
Duration: 00:00:00.13, start: 4120.000000, bitrate: 225 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 251 kb/s
Output #0, mpegts, to 'ultra03.ts':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 90k tbn, 25 tbc
Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 251 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=20179 fps= 25 q=-1.0 size= 264446kB time=00:13:27.16 bitrate=2683.9kbits/s

sebastian
06-21-2014, 04:11 AM
Got a short question. Am using this command to dump livestreams, e.g. https://www.youtube.com/watch?v=L4n4O_mGBh0
ffmpeg -i “http://streamlocation.m3u8″ -c copy c:\FileName.ts

That works, but is there a way to tell ffmpeg to start downloading from first segment? The youtube livestream itself is seekable.

Best
Sebastian

sebastian
06-22-2014, 04:14 AM
Hmm, there should be some "start with segment #0" switch or something like that in ffmpeg, but I can't find it...