Skip to content

Instantly share code, notes, and snippets.

@figgis
Last active January 30, 2022 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save figgis/d3cff69be815491eff1ac9338aa78add to your computer and use it in GitHub Desktop.
Save figgis/d3cff69be815491eff1ac9338aa78add to your computer and use it in GitHub Desktop.
H264 extract SEI using FFMPEG
// It's actually quite simple to extract unregistered sei data using ffmpeg, but I couln't find any documentation about how it's done
AVFrameSideData *sd;
sd = av_frame_get_side_data(frame, AV_FRAME_DATA_SEI_UNREGISTERED);
if (sd) {
// First 15 bytes is the uuid, unregistered payload start at index 16 and the
// total size is given by sd->size
printf("side-data size %ld first-byte %u\n", sd->size, sd->data[16]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment