@@ -2660,6 +2660,9 @@ ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
Import closed captions (which must be ATSC compatible format) into output.
Only the mpeg2 and h264 decoders provide these. Default is 1 (on).
+@item udu_sei @var{boolean}
+Import user data unregistered SEI if available into output. Default is 0 (off).
+
@item x264-params (N.A.)
Override the x264 configuration using a :-separated list of key=value
parameters.
@@ -2741,6 +2744,9 @@ Quantizer curve compression factor
Normally, when forcing a I-frame type, the encoder can select any type
of I-frame. This option forces it to choose an IDR-frame.
+@item udu_sei @var{boolean}
+Import user data unregistered SEI if available into output. Default is 0 (off).
+
@item x265-params
Set x265 options using a list of @var{key}=@var{value} couples separated
by ":". See @command{x265 --help} for a list of options.
@@ -104,6 +104,7 @@ typedef struct X264Context {
int chroma_offset;
int scenechange_threshold;
int noise_reduction;
+ int udu_sei;
AVDictionary *x264_params;
@@ -468,7 +469,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
AVFrameSideData *side_data = frame->side_data[j];
void *tmp;
x264_sei_payload_t *sei_payload;
- if (side_data->type != AV_FRAME_DATA_SEI_UNREGISTERED)
+ if (!(x4->udu_sei && side_data->type == AV_FRAME_DATA_SEI_UNREGISTERED))
continue;
tmp = av_fast_realloc(sei->payloads, &sei_data_size, (sei->num_payloads + 1) * sizeof(*sei_payload));
if (!tmp) {
@@ -1168,7 +1169,7 @@ static const AVOption options[] = {
{ "chromaoffset", "QP difference between chroma and luma", OFFSET(chroma_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, VE },
{ "sc_threshold", "Scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX, VE },
{ "noise_reduction", "Noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX, VE },
-
+ { "udu_sei", "Use user data unregistered SEI if available", OFFSET(udu_sei), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
{ "x264-params", "Override the x264 configuration using a :-separated list of key=value parameters", OFFSET(x264_params), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE },
{ NULL },
};
@@ -54,6 +54,7 @@ typedef struct libx265Context {
void *sei_data;
int sei_data_size;
+ int udu_sei;
/**
* If the encoder does not support ROI then warn the first time we
@@ -548,7 +549,7 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
void *tmp;
x265_sei_payload *sei_payload;
- if (side_data->type != AV_FRAME_DATA_SEI_UNREGISTERED)
+ if (!(ctx->udu_sei && side_data->type == AV_FRAME_DATA_SEI_UNREGISTERED))
continue;
tmp = av_fast_realloc(ctx->sei_data,
@@ -708,6 +709,7 @@ static const AVOption options[] = {
{ "preset", "set the x265 preset", OFFSET(preset), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
{ "tune", "set the x265 tune parameter", OFFSET(tune), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
{ "profile", "set the x265 profile", OFFSET(profile), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
+ { "udu_sei", "Use user data unregistered SEI if available", OFFSET(udu_sei), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
{ "x265-params", "set the x265 configuration using a :-separated list of key=value parameters", OFFSET(x265_opts), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE },
{ NULL }
};