On Monday, August 31, 2015 at 6:07:52 PM UTC-4, Robert O'Callahan wrote:
> On Tue, Sep 1, 2015 at 6:19 AM, Daniel <
> > wrote:
>
> > I'm working on a project where we are using the value from the video
> > element's getCurrentTime() method to perform processing on the server
> > backend. I've come across an issue where the video element seems to report
> > a time code that is slightly farther forward in the video than the frame
> > that is visible in the video element.
> >
> > So for instance if the getCurrentTime() method reports that the current
> > video time is 26.83 I might find that the frame I really want ended at
> > 26.72 and so if I use the time to extract a frame on the server I get the
> > next frame instead of the current frame.
> >
> > The amount of offset seems to be slightly different in different parts of
> > the video and in different videos. But the offset is usually close to one
> > tenth of a second. Interestingly, I'm seeing similar behaviors in other
> > browsers though the amount of offset is different.
> >
> > Any ideas on what could be causing this behavior?
> >
>
> It's hard to determine what the problem is.
>
> How are you correlating the video element's currentTime with what it's
> rendering? Are you drawing the video to a canvas to capture the current
> frame, or using high-speed cameras, or what?
>
> Do you get consistent results with Firefox release and Nightly? We changed
> some frame rendering stuff in Nightly so that it will render frames
> slightly earlier in some cases.
>
> Could it be a demuxing issue that's causing the timestamps you compute for
> frames to slightly differ from what browsers compute?
>
> Rob
> --
> lbir ye,ea yer.tnietoehr rdn rdsme,anea lurpr edna e hnysnenh hhe uresyf
> toD
> selthor stor edna siewaoeodm or v sstvr esBa kbvted,t
> rdsme,aoreseoouoto
> o l euetiuruewFa kbn e hnystoivateweh uresyf tulsa rehr rdm or rnea
> lurpr
> .a war hsrer holsa rodvted,t nenh hneireseoouot.tniesiewaoeivatewt sstvr
> esn
Currently the way it works is we pause the video then sample the currentTime
using the following custom method we've created:
AVideo.prototype.getCurrentTime = function()
{
return this.videoElement[0].currentTime;
};
The value from the currentTime is sent to the server and saved. We later use
the saved time values to extract frames and/or clips from the video using
ffmpeg. We think that the problem is not in ffmpeg. We've at least verified
that ffmpeg seems to agree with other video editing software such as adobe
premier, though it can be difficult to be certain about that. What we are sure
of is that ffmpeg and each browser place the change of frames at a slightly
different timecode.
Regarding release/nightly we've only been testing in the current stable
release. I'll try the nightly to see if I observe any differences there.
_______________________________________________
dev-media mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-media