javascript - When changing video currentTime too much, video fails? -
i'm using user drag event keypresses change position in html5 video element , updating video time accordingly using:
video.currenttime = totime;
and updating canvas based on video position grabbing video , putting canvas.
another element video time frame number, i.e:
framenumber = 123; fps = 25; totime = 123/25;
problem is, every fails. fails mean lose video; stops working altogether.
most of time works great fails, , not @ same point either...
any ideas appreciated!
there 2 answers question:
encoding of video files - controlling keyframes , sending right video right browser able solve lot of problems. using ffmpeg changed gop length.
ffmpeg -g <frames>
in case,<frames>
amount of frames between gop points desired.using videojs serve video seemed solve lot of problems , made smoother experience.
Comments
Post a Comment