Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to download starting from the "current" position in the live TV stream? #641

Closed
mkanet opened this issue Jan 18, 2013 · 8 comments
Closed

Comments

@mkanet
Copy link

mkanet commented Jan 18, 2013

When I visit a live TV youtube URL using my web browser, it starts to playback what's on TV currently.

By default, instead of youtube-dl downloading this TV steam starting from the "current" live TV broadcast position in the feed, youtube-dl will start the download from the very beginning of when the live TV broadcast originally started.

How can I get youtube-dl to start downloading from "what's currently on TV now (when you visit the youtube live TV URL using a web browser.

@mkanet
Copy link
Author

mkanet commented Jan 18, 2013

I noticed that live TV urls have a current time position setting. It's a dynamic value based on when you visit the liveTV URL.

i.e.,
#t=138576s
#t=138576s
#t=139067s

Is there any way to get the above value at the time youtube-dl starts to download? Surely, I can't be the first person to try to download/watch live TV via youtube-dl..

@fkiller
Copy link

fkiller commented Jan 18, 2013

I would also raise my hand for the issue, but little different. The point of the issue is to enable capture "from when". There is a "begin" param in "videoplayback", but it seems that Youtube recently changed their interface. Now, what I know is "range" param, which indicates "[start byte]-[end byte]". However, it still couldn't have millisecond param on it. Do you have any plan to support it?

@fkiller
Copy link

fkiller commented Jan 18, 2013

In addition to that, I also found that browser send a request xxx.youtube.com/player_204?xxx with p-time param, which is a millisecond to start video from.

I put some infomation on http://stackoverflow.com/questions/14365272/is-begin-param-dead-in-youtubes-c-youtube-com-videoplayback as well, FYI.

@mkanet
Copy link
Author

mkanet commented Jan 18, 2013

This might be way over my head; and, please don't laugh if it's not relevant... but, I did see that there is support for the below function in the current youtube api:

player.getCurrentTime():Number
"Returns the elapsed time in seconds since the video started playing."

@FiloSottile
Copy link
Collaborator

Linking to #622
(@mkanet unfortunately that is a JS API that is not related to what we can use as a client)

Actually studying what happens in the browser for a TV show could lead to a solution for #622

@mkanet
Copy link
Author

mkanet commented Jan 19, 2013

I'm really hoping the developer(s) of youtube-dl will have a command-line switch to do this; or maybe even automatically do this for live TV streams as the default.

Since it looks like youtube-dl doesnt really support live-TV streams in a useful way, I was hoping someone knew how to at least figure out a way to do this using a different method. If I use the long, unfriendly URL I get using a packet sniffer (or other hacks), I can use wget to download the live TV stream.. but then after a few tries, unfortunately I get a HTTP error 403 Forbidden error message.

All I need is a way to do this for a few live TV streams.

@mkanet
Copy link
Author

mkanet commented Jan 29, 2013

For those of you who have Windows. There is a brand new command-line youtube downloader (.NET based) that can handle live TV streams correctly in respect to this issue. I actually prefer this tool for my youtube downloads needs.

(Edit by @phihag: Cut down unrelated advertisement for a closed-source application)

@phihag
Copy link
Contributor

phihag commented Jan 29, 2013

What I'm missing from this issue is a single demo URL. I'm aware that live-streams are short-lived, but surely there must be someone who broadcasts a view of the Big Ben (or any other clock) 24/7, isn't there?

Also, @mkanet, the program you linked actually computes its download URL just like youtube-dl does (actually, they miss virtually all of the edge cases we have handled).

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants