Please don't top post on this list. It makes it harder for people to
read it.

On Thu, 2010-09-16 at 17:02 +0400, Kulti wrote:
> Hm... Thanks, I'm use flv-container, but how to set VFR? It's mean, that I
> need to modify AVCodecContext.time_base before encoding every frames?
> 
> On Thu, Sep 16, 2010 at 4:43 PM, Tomas Härdin <[email protected]>wrote:
> 
> > On Thu, 2010-09-16 at 13:36 +0400, Kulti wrote:
> > > Hi, all.
> > >
> > > I have a webcam and need to transcode mjpeg to any formats, but sometime
> > > webcam lagged and fps fall down. Can ffmpeg atuo fill dropped frames to
> > > constantly fps?
> >
> > Why do you want constant fps? Just use a container that handles VFR
> > (avi, flv, mov etc.).
> >
> > Anyway, assuming the frames are timestamped correctly ffmpeg should
> > behave correctly. If not, try forcing constant framerate with -r.
> >
> > /Tomas
> >

FLV has a fixed time base of 1 kHz, so it's always VFR. In other cases,
like AVI, you can set time_base to be less than or equal to the inverse
of the maximum fps.

In other words, if you know your camera can't deliver more than 50 fps
you can set time_base to 1/50, 1/123, 1/10000 or whatever. In the
specific case of AVI you shouldn't set it too low though, since it pads
with empty packets for the "missing" time stamps (IIRC something like
39*16 = 624 B overhead if you mux 25 fps with a time base of 1 kHz). FLV
does not have this problem though.

Hope that helps :)

/Tomas

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to