video – Adding SEI side data to packet of h264 packet using FFmpeg

We are trying to add server local time to every frame of video in video streaming. There are lots of source say add side data to packet with type of AV_PKT_DATA_SEI_UNREGISTERED can add string data to packet.

But AV_PKT_DATA_SEI_UNREGISTERED is undeclared in latest FFmpeg source code;
And using other side data type like AV_PKT_DATA_METADATA_UPDATE, can confirm side data been added to packet in debugging memory, and call of av_interleaved_write_frame succeeded.

But unable to detect side data using following command from the output video:

ffprobe -i output_with_sei.mp4 -show_packets 

[PACKET]
codec_type=video
stream_index=0
pts=214
pts_time=0.002378
dts=209
dts_time=0.002322
duration=3000
duration_time=0.033333
size=72
pos=18682
flags=___
[/PACKET]

Read more here: Source link