[FFmpeg-devel] [PATCH] H.264 timestamps in h264_parser - complete set

Ivan Schreter schreter
Wed Feb 25 21:38:17 CET 2009


Michael Niedermayer wrote:
> On Tue, Feb 24, 2009 at 09:38:55PM +0100, Ivan Schreter wrote:
>   
>> Michael Niedermayer wrote:
>>     
>>> On Tue, Feb 24, 2009 at 08:20:53PM +0100, Ivan Schreter wrote
>>>> I'd propose adding a flag field_picture_flag to AVPacket (and pass it 
>>>> from the parser) to notify the user about field pictures, so it can 
>>>> correctly compute frame rate. What do you think? Or do you have a better 
>>>> idea?
>>>>     
>>>>         
>>> i dont know, it doesnt seem to be such a big issue to me to have 2*fps ...
>>>
>>>   
>>>       
>> It is for the user. See, I want to convert a H.264 interlaced video to some 
>> other format. So I'd call ffmpeg -i h264.mts -vcodec mpeg2video -acodec mp2 
>> -f vob h264.vob. What will this do? It will create a vob with 2*fps and 
>> each picture duplicated, which is definitely not what we want... True, the 
>> user could specify -r 25 to force frame rate to 25fps, but it's not 
>> logical. So IMHO we need this. Agreed?
>>     
>
> yes, there is a problem
>
>   

The three attached patches introduce field_frame_flag for 
AVCodecParserContext and AVPacket, use it to correct durations and 
generate field frame flag in H.264. This fixes the problem and 
interlaced H.264 movies are now detected at correct fps.

Regards,

Ivan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: avcodec_fieldframe_flag.patch
Type: text/x-patch
Size: 1519 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090225/a9b13496/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avformat_fieldframe_flag.patch
Type: text/x-patch
Size: 2267 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090225/a9b13496/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_fieldframe_flag.patch
Type: text/x-patch
Size: 752 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090225/a9b13496/attachment-0002.bin>



More information about the ffmpeg-devel mailing list