[Ffmpeg-devel] Calculating PTS Times

Colin Ward lists
Sun Oct 23 07:56:49 CEST 2005


Rich Felker wrote:
> 

   [snip]

>>>Increment by one timebase unit is definitely NOT correct. You need to
>>>obtain a pts value for each frame. For proper containers, every frame
>>>will come with a pts value to begin with. For broken containers, it
>>>can be a lot of work to get the pts.. :(
>>
>>  I took this logic from one of the example programs that comes with 
>>FFMPEG; IIRC it was from ffplay.c.  So what must I do in the case where 
>>AVFrame->pts is 0?  Does this mean that the container/codec is broken? 
>>And if so, shouldn't they be fixed?
> 
> 0 means the pts is 0. If a demuxer outputs 0 except for the first
> frame it's broken.

   Well lots of decoders output 0 for all of their frames with my build 
of the libraries.  Maybe it is a configuration issue?  Are there any 
#defines or any special functions and/or variables that need to be set 
up to enable the correct calculation of pts?  In my experience every 
decoder seems to output something different.

   I am having another problem which may be related, with almost all 
decoders claiming that the very first frame is not a keyframe, when it is.

   I am not using configure to create my makefiles by the way as 
configure does not run on my system (Amiga OS) and so I am using my own 
hand-crafted makefiles.  I think that I will have to run configure on a 
UNIX system and examine the makefiles it creates to ensure that mine are 
correct.

/-------------------------------------------------------------------\
[Hitman/Code HQ - 6502/z80/68000/604e/80x86/ARM coder - Amiga rulez!]
[VZ-200/VIC-20/MZ-700/c16/c64*10/c128*8/Plus-4/CPC464/CD32/500*2    ]
[600/1000/1200*2/A4000/SNES/N64/Dreamcast/Athlon 1100/AmigaOne      ]
[Assembly Language: The most fun you can have with your clothes on! ]
\-------------------------------------------------------------------/





More information about the ffmpeg-devel mailing list