2

It seems like a simple issue, but no amount of different encodes seem to fix this.

The page scrolls the currentTime of the video based on the scroll bar position:

http://akasemusic.com/vid/testvid.html

Does anyone know why this would be buggy in Chrome and Firefox, yet render perfectly in Safari?

Note: This happens with videos over a certain bitrate and resolution, regardless of format, webm, ogv, mp4.

ECS
  • 21
  • 2
  • Are you using Chrome and Firefox in Mac or PC? What do you mean by 'buggy' I dont have Safari so I am not sure what the intended result should be. I assume is each scroll is supposed to do 1 frame of the video? – crazymatt May 04 '16 at 20:55
  • in Safary for windows it doesn't do anything... What is the intended behavior? – DIEGO CARRASCAL May 04 '16 at 20:58
  • The intended behaviour is for the currentTime of the video to advance based on the scrollbar position. Admittedly I haven't tested this on a PC and it's only at an early stage of development, however there seems to be a cutoff point between smooth scrolling of currentTime and choppy scrolling based on the size of the video – ECS May 04 '16 at 21:37
  • Tested with a different approach, same issue. Every once in a while (typically when the browser has just been restarted), it would work decently for a little while. Then drops frames like crazy. There's definitely something preventing Chrome to work smoothly when scrolling to play videos. – Francesco Frapporti Sep 15 '16 at 12:46
  • Response to an old question, but check https://stackoverflow.com/questions/51371160/how-to-use-ffmpeg-to-make-an-html5-webm-video-scroll-smoothly/51661764#51661764 for how to encode smooth scrolling video. – ScottyB Aug 31 '18 at 14:21

1 Answers1

1

I had the same problem today, and "solved" it by lowering the precision of the value given to currentTime:

vid.currentTime = parseFloat(value).toPrecision(3);

For some reason, it went from consistently freezing in Chrome to smooth playback.

ScottyB
  • 2,167
  • 1
  • 30
  • 46