[Ffmpeg-devel] timestamps in video

Michael Niedermayer michaelni
Sun Apr 30 02:36:39 CEST 2006


Hi

On Sun, Apr 30, 2006 at 02:00:41AM +0200, Tomas Carnecky wrote:
> I have an application that captures frames at any rate, it saves the
> encoded frame along with a timestamp (as provided by gettimeofday) in my
> own file format. I have a second application that converts the stream
> into and AVI file and another application that decodes the frames
> directly from my file.
> My timestamp resolution is microseconds (1/1000000 second), and I've tried:
> 
> AVCodecContext *c;
> c->time_base.den = 1000000;
> c->time_base.num = 1;
> 
> but that doesn't work always. For example when I use the xvid codec, I
> have to multiply the timestamps in the frame packets by 100 (not sure
> anymore), otherwise the video will play too fast in mplayer. But it
> works fine when I use:
> 
> c->time_base.den = 100;
> c->time_base.num = 1;
> 
> Is the framerate limited somehow?

yes, mpeg4 stores the timebase/framerate in a 16bit long field i dunno
if thats the cause of your problem

[...]
-- 
Michael

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is





More information about the ffmpeg-devel mailing list