After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 524771 - Can't seek in YouTube videos
Can't seek in YouTube videos
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other Linux
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 527752 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-28 11:31 UTC by Lukas Michelbacher
Modified: 2010-01-11 09:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Lukas Michelbacher 2008-03-28 11:31:13 UTC
When using the youtube plugin it's not possible to seek forward or backward like in the web browser-based version.
Comment 1 Philip Withnall 2008-03-28 12:33:08 UTC
Looks like something not implemented in GStreamer, perhaps in the souphttpsrc?
Comment 2 Philip Withnall 2008-03-28 14:15:57 UTC
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
Comment 3 Sebastian Dröge (slomo) 2008-03-28 19:24:31 UTC
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.
Comment 4 Wim Taymans 2008-03-29 12:39:22 UTC
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.
Comment 5 Philip Withnall 2008-03-29 13:47:09 UTC
Superb!
Comment 6 Lukas Michelbacher 2008-03-29 14:26:49 UTC
Thanks from me too!
Comment 7 Sebastian Dröge (slomo) 2008-03-29 15:08:59 UTC
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...
Comment 8 Wim Taymans 2008-03-31 09:49:56 UTC
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. 
Comment 9 Sebastian Dröge (slomo) 2008-03-31 09:55:26 UTC
Sounds great :)
Comment 10 Philip Withnall 2008-04-22 17:29:25 UTC
*** Bug 527752 has been marked as a duplicate of this bug. ***
Comment 11 Jakub 'Livio' Rusinek 2008-04-22 17:47:14 UTC
But progress slider MUST indicate buffering as an addition (with fill level).
Comment 12 Johan (not receiving bugmail) Dahlin 2008-07-27 12:52:44 UTC
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.
Comment 13 Philip Withnall 2008-11-26 23:13:54 UTC
*** Bug 562259 has been marked as a duplicate of this bug. ***
Comment 14 Martin Olsson 2009-02-14 10:29:53 UTC
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?
Comment 15 Philip Withnall 2010-01-09 14:36:10 UTC
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
Comment 16 Wim Taymans 2010-01-11 09:36:56 UTC
OK, closing then.