GNOME Bugzilla – Bug 524771
Can't seek in YouTube videos
Last modified: 2010-01-11 09:36:56 UTC
When using the youtube plugin it's not possible to seek forward or backward like in the web browser-based version.
Looks like something not implemented in GStreamer, perhaps in the souphttpsrc?
If I try to seek backwards or forwards in a YouTube video, I get the following with CVS HEAD: 0:00:23.619487133 29811 0x6485d0 ERROR totem bacon-video-widget-gst-0.10.c:325:bvw_error_msg: message = "http://www.youtube.com/get_video?video_id=TopkgGxGzQs&t=OEgsToPDskLMnJ-PsL911icGShiLBdwg": Forbidden 0:00:23.619517268 29811 0x6485d0 ERROR totem bacon-video-widget-gst-0.10.c:327:bvw_error_msg: domain = 3493 (gst-resource-error-quark) 0:00:23.619526936 29811 0x6485d0 ERROR totem bacon-video-widget-gst-0.10.c:328:bvw_error_msg: code = 5 0:00:23.619535778 29811 0x6485d0 ERROR totem bacon-video-widget-gst-0.10.c:329:bvw_error_msg: debug = gstsouphttpsrc.c(863): gst_soup_http_src_parse_status (): /play/source: 403 Forbidden 0:00:23.619545471 29811 0x6485d0 ERROR totem bacon-video-widget-gst-0.10.c:330:bvw_error_msg: source = <source> 0:00:23.619797421 29811 0x6485d0 ERROR totem bacon-video-widget-gst-0.10.c:331:bvw_error_msg: uri = http://www.youtube.com/get_video?video_id=TopkgGxGzQs&t=OEgsToPDskLMnJ-PsL911icGShiLBdwg ** Message: Error: "http://www.youtube.com/get_video?video_id=TopkgGxGzQs&t=OEgsToPDskLMnJ-PsL911icGShiLBdwg": Forbidden gstsouphttpsrc.c(863): gst_soup_http_src_parse_status (): /play/source: 403 Forbidden
This is a limitation by the youtube servers, they don't allow ranged GETs and return 403 (forbidden) for them. No way to fix this as far as I'm concerned, the flash player does some special magic probably.
I'm working on seeking in youtube stuff right now. The only way to do it is the way flash does it, download the file to a temp file and allowing seeking in the downloaded part.
Superb!
Thanks from me too!
Wim, are you working on it in one of our http sources or the totem plugin? IMHO it's not in the scope of http sources to implement something like this...
It's going to go into queue2 (buffering to file and providing get_range on the cached file). It also requires some changes to playbin2/uridecodebin to integrate nicely. Ah, and a new GstQuery type to query the amount of downloaded data.
Sounds great :)
*** Bug 527752 has been marked as a duplicate of this bug. ***
But progress slider MUST indicate buffering as an addition (with fill level).
The magic done by the flash player on youtube appears to be the following: (http connection, port 80 on youtube.com): GET /s?ns=yt&plid=AARTAJaJjEefrYM0AAAAoAAgAAA&sourceid=ys&q=eldkvarn&vid=JwFOzEcFz7-FdWGcILUxzeZHUoU9A9wKU&docid=WiH7qimQLIA&el=detailpage&hbd=4248592&hbt=76.324&rt=0.135&nbe=1&len=230.034&st=69.695&et=69.695&fv=LNX%209%2C0%2C124%2C0 HTTP/1.1 where: len = total length of stream in seconds st = seeking position in seconds et = seeking position in seconds hbt = current / last known position in stream? The flash player is displaying a progress gadget, I it appears to stop as soon as data is received. I'd say that it is up to the plugin to send the seek queries. Totem itself needs to add API to override seeking, eg let the plugin handle seeking itself instead of using whatever GStreamer element is used.
*** Bug 562259 has been marked as a duplicate of this bug. ***
Wim, what's the status of seeking in youtube videos? I was thinking if you don't have time to work on this right now maybe you can post your partial work here and maybe someone else will pick up the work?
Wim, can we consider this fixed now that Totem has its nice on-disk buffering[1], or is there still stuff to be done in GStreamer? Seeking is working nicely for me on 2.28. [1]: http://www.hadess.net/2009/11/fedora-12-and-beyond.html
OK, closing then.