Youtube without Flash Auto

By YoutubeWithoutFlash Last update Jan 30, 2011 — Installed 97,150 times.

Seeking

in
Subscribe to Seeking 6 posts, 5 voices



rednukleus User
ChromeWindows

Windows 7 with Chromium. Using Windows Media Player plugin. Video plays smoothly without Flash, but I cannot seek to a different time point in the video. Is there another external plugin that will enable seeking?

 
YoutubeWitho... Script's Author
FirefoxX11

Seeking is a bit of an issue. It doesn't work with the plugin that I'm using, either (totem). I haven't tried VLC yet -- maybe somebody who uses VLC can say something about it.

The thing is that what you get from Youtube is basically a video stream that doesn't allow seeking. In principle, it should be possible for an external plugin to allow seeking in the portion of the stream that you have already downloaded. (Although even that seems to be a problem.)

It gets even trickier when you want to jump to a position in the stream that you haven't downloaded yet. What happens when you do this using the standard Flash plugin is that the video stream is requested with a parameter that tells Youtube from where to start streaming. (Precisely, the "begin" parameter at the end of the video URL.) The external plugin doesn't know this, so jumping forward doesn't work.

Actually, it is possible to control the VLC plugin from the browser with JavaScript. This should make it possible to extend the script to allow seeking and have other cool features like subtitles when you use VLC. However, this is probably quite a bit of work.

 
chromeuser8 User
ChromeX11

proof of concept type stuff:

two new global variables: startingTime, startingLength. startingTime set to 0 and startingLength set to video length in writePlayer.

startingTime keeps track of the starting time of the current stream(ie the number after begin=); startingLength is the total length of the original video (ie starting at begin=0)

skip function, parameter amount in seconds

baseurl = "...begin="

var player = document.getElementById("no-flash-player");

var newpos = player.input.time + amount * 1000; // current location + amount in milliseconds

//when vlc loads the new url, the player.input.time is reset 0 and player.input.length is whats left of the video

startingTime = startingTime + newpos //update startingTime for current stream
if(startingTime < 0) startingTime = 0;
var id = player.playlist.add(baseurl + newpos);
player.playlist.playItem(id);

can also have a timer function that calculates pos every 1000ms, and updates a gui
var time = startingTime + player.inut.time;
var text = time + "/" + startingLength;

It might also be possible to try to seek and only jump if the player starts buffering. It might be tricky though, because I think seeking might be asynchronous, or go through other states before buffering in vlc/other players. Another option is to only seek for small jumps (~10s, so if it needs to buffer, it won't take long).

mplayer also has a javascript api (http://mplayerplug-in.cvs.sourceforge.net/viewv.... mplayer is able to keep track of the correct position and length by itself (if ...begin=20000, then it says it's 20 seconds into the video). getTime, getDuration, Open, and Play replace player.input.*.

I couldn't get mplayer working (although this url works: http://mplayerplug-in.sourceforge.net/testing/t...) but vlc seems to work with a seek +1min link. A slider interface is also possible, but more work (maybe it's possible to borrow from youtube.com/html5)

 
chromeuser8 User

http://pastebin.com/m47e30034

A simle implementation with a progress bar. I have only tested it with vlc (0.9.4) and midori (0.2.0). It doesn't work with firefox (3.0) with either vlc or mplayer (the player is not detected, even with long delays). The quicktime and wmp paths are also untested.

 
raaf Scriptwright
FirefoxX11

Actually totem can do seeking, but for some reason it doesn't work with the embedded totem player. But if you select "Open with Movie Player" it will play the video in the normal totem player and seeking should work with recent versions of totem and gstreamer. It works fine here with totem on Ubuntu 9.10, in fact seeking with totem works better than seeking with the normal flash player. It is blazingly fast.

 
WattoDaToyda... User
FirefoxX11

I use the gecko-mediaplayer (package included in ubuntu) http://kdekorte.googlepages.com/gecko-mediaplayer
It allows me to utilize the Nvidia VDPAU video decoder while watching youtube videos as an alternative to Adobes new flash player that only uses the GPU in windoze.

Would it be possible to implement seeking using it since it uses mplayer?

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel