[Libav-user] SEI picture timing message and timestamp in decoded frame, h264 es

Michal Rybinski michal.rybinski+ffmpeg at gmail.com
Wed Feb 20 13:13:37 EET 2019


Just leaving it here in case anyone else in future would look for similar
answer:

If a h264 elementary (raw) stream contains SEI with some metadata a stream
receiving client would need to use, it is possible to access it from
AVPacket->data. One needs look for SEI NAL type and then strip it correctly
according to specific SEI type (SEI may be present for each frame, at
specific frames etc - FFMPEG AVPacket structure seems to combine relevant
important items). In case of unregistered user data SEI -
pay attention to/do know upfront payload size to map the data correctly in
your program.

In my case it's sufficient to get hands on SEI data, so I didn't do
detailed analysis how timestamps are calculated in the process of coming up
with final pts for the frame whenever picture timing SEI is present, though
there's definitely more to dig through.

Hope it helps some other newbie to FFMPEG. If any of above is
misleading/incorrect, please correct me.

BR
MichaƂ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190220/c3ead6f2/attachment.html>


More information about the Libav-user mailing list