Skip to content

Instantly share code, notes, and snippets.

View tvercaut's full-sized avatar

Tom Vercauteren tvercaut

View GitHub Profile
@figgis
figgis / gist:d3cff69be815491eff1ac9338aa78add
Last active May 21, 2024 13:40
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]);