How to make seeking work for Youtube videos

Requests, suggestions, support, and everything else python / plugin related.
Post Reply
cptmarginal
Posts: 5
Joined: Sun Aug 12, 2012 8:31 pm

How to make seeking work for Youtube videos

Post by cptmarginal »

I've always wanted to be able to arbitrarily skip around through Youtube videos, but it wasn't possible. Recently, I figured out how to do this while playing around with XBMC Eden. Basically, any video that is played with the "380p" quality selection allows seeking. Jan's version of the Eden Youtube plugin gives me "script failed" so I made a simple modification to the standard Xbox Youtube plugin.

Youtube uses numerical codes to determine which quality a video plays in, and the code we want to use here is 18. I know nothing about python, so I just used a quick workaround. The line in the YoutubePlayer.py file which gives the quality code for 1080p videos has been changed to "18". When you choose 1080p for a video (which I never usually do) you will get a stream with full seeking functionality instead.

This is very helpful to me, as there are a lot of long videos on Youtube that were difficult to watch because you couldn't resume where you left off. This is definitely a quick and cheap solution, and it would be better just to have a proper quality selection dialog with all options available. However, here's a copy of my modified file for anyone who wants to use it:

http://pastebin.com/9U2kxjR8

Just download the file and replace the YoutubePlayer.py in your plugin directory
skatulskijean
Posts: 1028
Joined: Wed Jul 04, 2012 8:01 am
Has thanked: 1 time
Been thanked: 148 times

Re: How to make seeking work for Youtube videos

Post by skatulskijean »

we have no xbox youtube plugin . what your mean is the old plugin for the old main xbmc Dharma !

regards Jan
Post Reply