From 65597ee7f4bfa11838d815fceb6bc6dd24150c1f Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Thu, 9 Nov 2017 13:43:53 -0800 Subject: Add adaptive streaming support (#972) "Adaptive streaming" allows changing video parameters mid-stream at IDR boundaries. Such changes require new SPS and PPS NALs at the IDR. MP4 supports this with 'avc3' and 'hev1' sample entry types. --- test/test.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/test.c b/test/test.c index da1f07c2e..f2ab5ab93 100644 --- a/test/test.c +++ b/test/test.c @@ -59,6 +59,7 @@ /* Options */ static int debug = HB_DEBUG_ALL; static int json = 0; +static int inline_parameter_sets = -1; static int align_av_start = -1; static int dvdnav = 1; static char * input = NULL; @@ -1358,6 +1359,9 @@ static void ShowHelp() " --align-av Add audio silence or black video frames to start\n" " of streams so that all streams start at exactly\n" " the same time\n" +" --inline-parameter-sets Create adaptive streaming compatible output.\n" +" Inserts parameter sets (SPS and PPS) inline\n" +" in the video stream before each IDR.\n" "\n" "\n" "Video Options ----------------------------------------------------------------\n" @@ -2130,6 +2134,8 @@ static int ParseOptions( int argc, char ** argv ) { "angle", required_argument, NULL, ANGLE }, { "markers", optional_argument, NULL, 'm' }, { "no-markers", no_argument, &chapter_markers, 0 }, + { "inline-parameter-sets", no_argument, &inline_parameter_sets, 1 }, + { "no-inline-parameter-sets", no_argument, &inline_parameter_sets, 0 }, { "align-av", no_argument, &align_av_start, 1 }, { "no-align-av", no_argument, &align_av_start, 0 }, { "audio-lang-list", required_argument, NULL, AUDIO_LANG_LIST }, @@ -3371,6 +3377,11 @@ static hb_dict_t * PreparePreset(const char *preset_name) { hb_dict_set(preset, "AlignAVStart", hb_value_bool(align_av_start)); } + if (inline_parameter_sets != -1) + { + hb_dict_set(preset, "InlineParameterSets", + hb_value_bool(inline_parameter_sets)); + } hb_value_array_t *subtitle_lang_array; subtitle_lang_array = hb_dict_get(preset, "SubtitleLanguageList"); if (subtitle_lang_array == NULL) -- cgit v1.2.3