[Libav-user] SEI picture timing message and timestamp in decoded frame, h264 es
Carl Eugen Hoyos
ceffmpeg at gmail.com
Thu Feb 14 00:13:48 EET 2019
2019-02-13 18:53 GMT+01:00, Michal Rybinski <michal.rybinski+ffmpeg at gmail.com>:
> śr., 13 lut 2019, 16:28: Carl Eugen Hoyos <ceffmpeg at gmail.com> napisał(a):
>
>> 2019-02-13 16:15 GMT+01:00, Michal Rybinski <
>> michal.rybinski+ffmpeg at gmail.com>:
>>
>> > Is FFMPEG taking into account SEI picture timing message
>> > contents when establishing timestamp (pts or best effort
>> > timestamp) when my app reads decoded AVFrame (basically
>> > looking into pts and best_effort_timestamp fields)?
>>
>> I don't know the answer but I can confirm that there are known
>> (and apparently difficult to fix) issues with timestamps in raw
>> h.264 streams.
> If it does any difference, I might check things also with GPL version of
> ffmpeg that includes x264 decoder.
There is no x264 decoder.
> I get timestamping in raw h264 is troublesome. If it wasn't, ffmpeg
> wouldn't be employed in the proces :-) Synchronization is a case I'm
> looking at currently.
>
> Nevertheless (sorry, being persistent because I want to understand) I
> noticed various kinds of SEI are parsed in ffmpeg:
>
> https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/h264_sei.c
>
> So given raw h264 elementary stream, it seems that info should be sitting
> (processed or not) and maybe used somewhere in ffmpeg structures (or my
> understanding what happens where in ffmpeg is totally wrong). Would you
> care to show me the right direction in ffmpeg sources to do my own digging?
You could start with the option "-debug_ts" that should show you timestamps
from different components of FFmpeg so you can see if they are
read by the decoder and if they are changed later.
Carl Eugen
More information about the Libav-user
mailing list