chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 582 forks source link

YouTube Gaming timecode #1432

Open syphoxy opened 8 years ago

syphoxy commented 8 years ago

hello all,

I'm trying to use a timecode on a YouTube Gaming video stream and it's not being passed through.

I've done a little digging and I've discovered that the time code can be passed in by adding t=N where N is your time offset in seconds. I've further inspected the network activity and it seems like this parameter is passed through to the API as a parameter called cmt. I can't find much more information on this.

I tried some really primitive patching forcing t=N or cmt=N to the end of the stream URLs but I've had no such luck.

I've also tried playing around with the URL provided by livestreamer -j "gaming.youtube.com/watch?v=qudosh9t6vA&t=10897" 1080p and the URLs from that HLS playlist.

I just can't seem to figure out how to get the API to start playing from a timecode. it does support it on the gaming.youtube.com frontend but it's not working for me via livestreamer/curl-piped-into-mpv.

I suspect it might need some reverse engineering but someone who has a better idea of how this API works might know more than me.

anyone have any ideas?

syphoxy commented 8 years ago

oh, I also tried investigating if youtube-dl supported a timecode and it seemingly does not.