NOTICE: FORUMS MOVING

Thank you for visiting and participating in the Video.js forums. We are currently moving the forums to Stack Overflow and GitHub Issues. If you have a question or need help with Video.js, please post your question on Stack Overflow and add the tag 'video.js'. If you've found a specific bug in Video.js, please submit it in the issues tracker.

You can read more about this move on the blog.

Video seek requiring pre-buffering to that point?

Adam's Avatar

Adam

25 May, 2012 11:44 AM

Hi,

I'd guess this is an issue with the server setup, but I can't be sure, not am I aware of what to change to fix it; when I skip to near the end of the video, the player doesn't jump there, it waits for the whole file to download up to that point before continuing playing.

Current demo site: http://clickstudio.info/ardesa/player/index1.html - this is under development so may change a bit, but the core issue remains regardless. Just move the player seek bar near the end to see the issue.

I'm using the same video file as the demo, so I know it's not an index placement problem.

Many thanks for any insights,
Adam

  1. 2 Posted by Adam on 31 May, 2012 08:34 PM

    Adam's Avatar

    Bumping for insight ... this is still evading any solution and starting to cause other problems.

    Many thanks.

  2. 3 Posted by Adam on 13 Jun, 2012 05:59 PM

    Adam's Avatar

    Bumping again. This is a very large problem still... any insight appreciated. Thanks.

  3. 4 Posted by Adam on 01 Jul, 2012 02:10 AM

    Adam's Avatar

    BUMP, jesus, what's the point of a support forum if you don't SUPPORT. This is a major issue with the project, something is undocumented that requires clarification!

  4. 5 Posted by Alex on 02 Jul, 2012 04:27 PM

    Alex's Avatar

    +1

  5. 6 Posted by Adam on 01 Aug, 2012 02:25 PM

    Adam's Avatar

    And bump once again. Not that there's much point as clearly nobody gives a damn.

  6. 7 Posted by WhiteSites on 11 Aug, 2012 09:47 PM

    WhiteSites's Avatar

    Adam,
    I also want an answer to this. Currently I use flash to stream our videos, and I had to write a custom handle to intercept the video requests and push out the bytes. That is the only way to support scrubbing with flash. With HTML 5, I can imagine you need something similar. I am still researching solutions for HTML 5 that support scrubbing. haven't tried videojs yet. If you find a solution let us know.

  7. 8 Posted by 1stDev on 17 Aug, 2012 11:33 PM

    1stDev's Avatar

    Adam,

    after looking at your demo page I can tell a few things. First, that your server is properly setup to deliver HTML5 video and allow seeking to parts not yet downloaded. It supports Accept Ranges requests and replies correctly to the browser with a 206 partial content status code. Also the mime type returned by your server is correct, which is basically all you need.

    However.. there's a catch! probably you are using FireFox 3.6 or another browser that does not support MP4 or WebM natively, and so videojs uses the flash fallback.

    As your server is not setup to support MP4 pseudo-streaming, you are not able to seek without buffering from the beginning to that point.

    You can find out a detailed explanation about the issue and information on how to enable seeking with MP4 / Flash in the following article:

    Seeking videos beyond the buffer line

    Hope that helps.

  8. 9 Posted by Jon Skarpeteig on 21 Aug, 2012 07:43 PM

    Jon Skarpeteig's Avatar

    Hi, this still doesn't work. Even the example page a the link you posted doesn't work:

    http://1stdev.com/staticmedia/examples/seeking-videos-beyond-the-bu...

    Looking at the request using Firebug, there's not a single request sent by the videojs flash player to the backend server. The expected format of this request would be http://mydomain.com/myfile.mp4?start=12345 such that the backend server can produce a new mp4 file (split existing file by generating a moov box, and send video track data from that point on), for a split file in order to 'seek' to that point. (Also known as pseudostreaming)

  9. 10 Posted by 1stDev on 21 Aug, 2012 08:05 PM

    1stDev's Avatar

    Hi Jon,

    have in count that the fallback flash player included in videojs does not support pseudo-streaming. So if you are loading the file using the flash player, it will simply do a progressive download, and the server response will be "200 OK".

    As explained in the "Flash pseudo-streaming gotcha!" section, if you want to provide pseudo-streaming in flash mode for MP4 files, your server needs to be setup to support it (ie with codeshop h264 pseudostreaming module), and the flash player also needs to support pseudo-streaming.

    As video-js.swf does not, you would need to setup a custom flash player,. such as flowplayer or jwplayer, which both support pseudo-streaming.

  10. 11 Posted by Jon Skarpeteig on 22 Aug, 2012 07:50 AM

    Jon Skarpeteig's Avatar

    I'm well aware of how the backend needs to react to pseudo-streaming, but the fact that the videojs player doesn't support pseudostreaming is new to me. Is this documented properly? I should be fairly easy to support though - by simply sending the seek point as an integer ?start=12345 (as supported by jwplayer, and codeshops modules for nginx/apache/lighttpd). As pseudostreaming isn't really streaming at all, but is in fact starting playback of a brand new file on every request (as generated by the server side), no other tricks than progress bar hacks and an extra get parameter would be needed.

    In a previous version of VideoJS I used the videojs-flash-fallback class to initialize jwplayer. This doesn't seem to kick in anymore, using the CDN hosted version. What's the supported way of doing this?

  11. 12 Posted by 1stDev on 22 Aug, 2012 12:44 PM

    1stDev's Avatar

    I didn't find any documentation in videojs.com about supporting pseudo-streaming in flash mode. Also the following 2 threads seem to state just that:

    http://help.videojs.com/discussions/questions/467-streaming-options

    http://help.videojs.com/discussions/questions/587-pseudo-streaming-support-http-flash-player-for-mp4

    I don't know why they removed support for a custom flash player in the current version. You may be able to use a custom player like JWplayer by modifying the flashvars in video.js, so instead of src it passes file as a parameter. Haven't tried that approach yet. When I do need support for both html5 and MP4 pseudo-streaming I use JWplayer, as it supports both technologies and makes a consistent fallback.

  12. 13 Posted by 1stDev on 22 Aug, 2012 04:05 PM

    1stDev's Avatar

    ok so I had some time to play with videojs, and here's a simple way to use JWplayer with http pseudo-stream enabled as a flash fallback player.

    <script src="path/to/video.js"></script>
    <script>
    
       // custom player swf file
       _V_.options.flash.swf = "path/to/jwplayer/player.swf";
    
       // flashvars
       _V_.options.flash.flashVars = {
             file: "path/to/video.mp4",
             image: "path/to/thumbnail.jpg",
             autostart: "false",
             provider: "http",
             "http.startparam": "starttime"
       };
    
       // object params
       _V_.options.flash.params = {
           allowfullscreen: "true",
           wmode: "transparent",
           allowscriptaccess: "always"
       };
    
       // object attributes (such as id, name, class, etc.)
       _V_.options.flash.attributes={};
    
    </script>
    

    Adjust any params or flashvars to your needs.

  13. 14 Posted by 1stDev on 22 Aug, 2012 06:15 PM

    1stDev's Avatar

    Just a small correction... for use with h264 streaming module from codeshop, the correct startparam should be "start", which is used by default by JWplayer. So either do not specify the "http.startparam" in your flashVars, or use this:

    "http.startparam": "start"
    
  14. 15 Posted by Peter on 06 Mar, 2013 08:10 AM

    Peter's Avatar

    1stDev - you rock man ! Thanks !

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Aug, 2014 06:33 AM
27 Aug, 2014 07:37 AM
27 Aug, 2014 07:05 AM
17 Aug, 2014 12:53 AM
11 Aug, 2014 05:23 PM