diff options
author | John Stebbins <[email protected]> | 2017-11-09 13:43:53 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2017-11-09 13:43:53 -0800 |
commit | 65597ee7f4bfa11838d815fceb6bc6dd24150c1f (patch) | |
tree | d044e1fb014797b4526508d4d423194079d746a5 | |
parent | 86d6345771e3b2fb22255620aa91cf77fdf15f10 (diff) |
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.
-rw-r--r-- | contrib/ffmpeg/A20-avc3-hvc1-override.patch | 49 | ||||
-rw-r--r-- | contrib/ffmpeg/A20-hvc1-override.patch | 48 | ||||
-rw-r--r-- | libhb/common.h | 5 | ||||
-rw-r--r-- | libhb/encx264.c | 8 | ||||
-rw-r--r-- | libhb/encx265.c | 2 | ||||
-rw-r--r-- | libhb/hb_json.c | 12 | ||||
-rw-r--r-- | libhb/muxavformat.c | 17 | ||||
-rw-r--r-- | libhb/preset.c | 3 | ||||
-rw-r--r-- | libhb/preset_builtin.h | 73 | ||||
-rw-r--r-- | libhb/work.c | 4 | ||||
-rw-r--r-- | preset/preset_builtin.json | 70 | ||||
-rw-r--r-- | preset/preset_builtin.list | 2 | ||||
-rw-r--r-- | preset/preset_template.json | 1 | ||||
-rw-r--r-- | test/test.c | 11 |
14 files changed, 247 insertions, 58 deletions
diff --git a/contrib/ffmpeg/A20-avc3-hvc1-override.patch b/contrib/ffmpeg/A20-avc3-hvc1-override.patch new file mode 100644 index 000000000..70d67b4a3 --- /dev/null +++ b/contrib/ffmpeg/A20-avc3-hvc1-override.patch @@ -0,0 +1,49 @@ +diff -ur libav-12.2.orig/libavformat/isom.c libav-12.2/libavformat/isom.c +--- libav-12.2.orig/libavformat/isom.c 2017-09-30 11:13:39.000000000 -0700 ++++ libav-12.2/libavformat/isom.c 2017-11-01 14:17:30.762856002 -0700 +@@ -152,6 +152,7 @@ + { AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which indicates parameter sets shall not be in ES */ + + { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */ ++ { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '3') }, /* AVC-1/H.264 */ + { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */ + { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */ + { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', '2') }, /* AVC-Intra 50M 1080p25/50 */ +diff -ur libav-12.2.orig/libavformat/movenc.c libav-12.2/libavformat/movenc.c +--- libav-12.2.orig/libavformat/movenc.c 2017-09-30 11:13:39.000000000 -0700 ++++ libav-12.2/libavformat/movenc.c 2017-11-01 14:20:52.783487291 -0700 +@@ -724,7 +724,10 @@ + + avio_wb32(pb, 0); + ffio_wfourcc(pb, "hvcC"); +- ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 0); ++ if (track->tag == MKTAG('h','v','c','1')) ++ ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 1); ++ else ++ ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 0); + return update_size(pb, pos); + } + +@@ -783,7 +786,11 @@ + if (!ff_codec_get_tag(ff_mp4_obj_type, track->par->codec_id)) + return 0; + +- if (track->par->codec_id == AV_CODEC_ID_H264) tag = MKTAG('a','v','c','1'); ++ if (track->par->codec_id == AV_CODEC_ID_H264 && ++ tag == MKTAG('a','v','c','3')) ; ++ else if (track->par->codec_id == AV_CODEC_ID_H264) tag = MKTAG('a','v','c','1'); ++ else if (track->par->codec_id == AV_CODEC_ID_HEVC && ++ tag == MKTAG('h','v','c','1')) ; + else if (track->par->codec_id == AV_CODEC_ID_HEVC) tag = MKTAG('h','e','v','1'); + else if (track->par->codec_id == AV_CODEC_ID_AC3) tag = MKTAG('a','c','-','3'); + else if (track->par->codec_id == AV_CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c'); +@@ -4476,7 +4483,7 @@ + .write_packet = mov_write_packet, + .write_trailer = mov_write_trailer, + .flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE, +- .codec_tag = (const AVCodecTag* const []){ ff_mp4_obj_type, 0 }, ++ .codec_tag = (const AVCodecTag* const []){ ff_codec_movvideo_tags, ff_codec_movaudio_tags, ff_codec_movsubtitle_tags, 0 }, + .priv_class = &mp4_muxer_class, + }; + #endif +Only in libav-12.2/libavformat: movenc.c.orig diff --git a/contrib/ffmpeg/A20-hvc1-override.patch b/contrib/ffmpeg/A20-hvc1-override.patch deleted file mode 100644 index 639885ebb..000000000 --- a/contrib/ffmpeg/A20-hvc1-override.patch +++ /dev/null @@ -1,48 +0,0 @@ -From cc6cb8d44b50082ae3edfed39f484213590c8777 Mon Sep 17 00:00:00 2001 -From: John Stebbins <[email protected]> -Date: Sun, 11 Jun 2017 10:19:14 -0700 -Subject: [PATCH] movenc: Allow use of hvc1 tag for h.265 - -If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for -h.265 streams. ---- - libavformat/movenc.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/libavformat/movenc.c b/libavformat/movenc.c -index e389029..835f588 100644 ---- a/libavformat/movenc.c -+++ b/libavformat/movenc.c -@@ -726,7 +726,10 @@ static int mov_write_hvcc_tag(AVIOContext *pb, MOVTrack *track) - - avio_wb32(pb, 0); - ffio_wfourcc(pb, "hvcC"); -- ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 0); -+ if (track->tag == MKTAG('h','v','c','1')) -+ ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 1); -+ else -+ ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 0); - return update_size(pb, pos); - } - -@@ -786,6 +789,8 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track) - return 0; - - if (track->par->codec_id == AV_CODEC_ID_H264) tag = MKTAG('a','v','c','1'); -+ else if (track->par->codec_id == AV_CODEC_ID_HEVC && -+ tag == MKTAG('h','v','c','1')) ; - else if (track->par->codec_id == AV_CODEC_ID_HEVC) tag = MKTAG('h','e','v','1'); - else if (track->par->codec_id == AV_CODEC_ID_AC3) tag = MKTAG('a','c','-','3'); - else if (track->par->codec_id == AV_CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c'); -@@ -4496,7 +4501,7 @@ AVOutputFormat ff_mp4_muxer = { - .write_packet = mov_write_packet, - .write_trailer = mov_write_trailer, - .flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE, -- .codec_tag = (const AVCodecTag* const []){ ff_mp4_obj_type, 0 }, -+ .codec_tag = (const AVCodecTag* const []){ ff_codec_movvideo_tags, ff_codec_movaudio_tags, ff_codec_movsubtitle_tags, 0 }, - .priv_class = &mp4_muxer_class, - }; - #endif --- -2.9.3 - diff --git a/libhb/common.h b/libhb/common.h index 2b8467d82..7e0a6f31b 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -614,6 +614,11 @@ struct hb_job_s int mux; char * file; + int inline_parameter_sets; + // Put h.264/h.265 SPS and PPS + // inline in the stream. This + // is necessary when constructing + // adaptive streaming dash files. int align_av_start; // align A/V stream start times. // This is used to work around mp4 // players that do not support edit diff --git a/libhb/encx264.c b/libhb/encx264.c index 1d2fd997e..ce7879ec7 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -718,10 +718,14 @@ static hb_buffer_t *nal_encode( hb_work_object_t *w, x264_picture_t *pic_out, */ case NAL_SPS: case NAL_PPS: - continue; + if (!job->inline_parameter_sets) + { + continue; + } + break; - case NAL_SLICE: case NAL_SLICE_IDR: + case NAL_SLICE: case NAL_SEI: default: break; diff --git a/libhb/encx265.c b/libhb/encx265.c index de1a99c9a..ec7b7d574 100644 --- a/libhb/encx265.c +++ b/libhb/encx265.c @@ -228,7 +228,7 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job) * Settings which can't be overriden in the encodeer_options string * (muxer-specific settings, resolution, ratecontrol, etc.). */ - param->bRepeatHeaders = 0; + param->bRepeatHeaders = job->inline_parameter_sets; param->sourceWidth = job->width; param->sourceHeight = job->height; diff --git a/libhb/hb_json.c b/libhb/hb_json.c index 615458b31..c267bf86d 100644 --- a/libhb/hb_json.c +++ b/libhb/hb_json.c @@ -525,8 +525,9 @@ hb_dict_t* hb_job_to_dict( const hb_job_t * job ) "{" // SequenceID "s:o," - // Destination {Mux, AlignAVStart, ChapterMarkers, ChapterList} - "s:{s:o, s:o, s:o, s:[]}," + // Destination {Mux, InlineParameterSets, AlignAVStart, + // ChapterMarkers, ChapterList} + "s:{s:o, s:o, s:o, s:o, s:[]}," // Source {Path, Title, Angle} "s:{s:o, s:o, s:o,}," // PAR {Num, Den} @@ -545,6 +546,7 @@ hb_dict_t* hb_job_to_dict( const hb_job_t * job ) "SequenceID", hb_value_int(job->sequence_id), "Destination", "Mux", hb_value_int(job->mux), + "InlineParameterSets", hb_value_bool(job->inline_parameter_sets), "AlignAVStart", hb_value_bool(job->align_av_start), "ChapterMarkers", hb_value_bool(job->chapter_markers), "ChapterList", @@ -986,9 +988,10 @@ hb_job_t* hb_dict_to_job( hb_handle_t * h, hb_dict_t *dict ) "{" // SequenceID "s:i," - // Destination {File, Mux, ChapterMarkers, ChapterList, + // Destination {File, Mux, InlineParameterSets, AlignAVStart, + // ChapterMarkers, ChapterList, // Mp4Options {Mp4Optimize, IpodAtom}} - "s:{s?s, s:o, s?b, s:b, s?o s?{s?b, s?b}}," + "s:{s?s, s:o, s?b, s?b, s:b, s?o s?{s?b, s?b}}," // Source {Angle, Range {Type, Start, End, SeekPoints}} "s:{s?i, s?{s:s, s?I, s?I, s?I}}," // PAR {Num, Den} @@ -1013,6 +1016,7 @@ hb_job_t* hb_dict_to_job( hb_handle_t * h, hb_dict_t *dict ) "Destination", "File", unpack_s(&destfile), "Mux", unpack_o(&mux), + "InlineParameterSets", unpack_b(&job->inline_parameter_sets), "AlignAVStart", unpack_b(&job->align_av_start), "ChapterMarkers", unpack_b(&job->chapter_markers), "ChapterList", unpack_o(&chapter_list), diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index f011c0cee..f85336dfe 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -215,6 +215,14 @@ static int avformatInit( hb_mux_object_t * m ) case HB_VCODEC_X264_10BIT: case HB_VCODEC_QSV_H264: track->st->codecpar->codec_id = AV_CODEC_ID_H264; + if (job->mux == HB_MUX_AV_MP4 && job->inline_parameter_sets) + { + track->st->codecpar->codec_tag = MKTAG('a','v','c','3'); + } + else + { + track->st->codecpar->codec_tag = MKTAG('a','v','c','1'); + } /* Taken from x264 muxers.c */ priv_size = 5 + 1 + 2 + job->config.h264.sps_length + 1 + 2 + @@ -332,7 +340,14 @@ static int avformatInit( hb_mux_object_t * m ) case HB_VCODEC_QSV_H265: case HB_VCODEC_QSV_H265_10BIT: track->st->codecpar->codec_id = AV_CODEC_ID_HEVC; - track->st->codecpar->codec_tag = MKTAG('h','v','c','1'); + if (job->mux == HB_MUX_AV_MP4 && job->inline_parameter_sets) + { + track->st->codecpar->codec_tag = MKTAG('h','e','v','1'); + } + else + { + track->st->codecpar->codec_tag = MKTAG('h','v','c','1'); + } if (job->config.h265.headers_length > 0) { diff --git a/libhb/preset.c b/libhb/preset.c index 4693fca2a..8aecdccff 100644 --- a/libhb/preset.c +++ b/libhb/preset.c @@ -1722,6 +1722,9 @@ int hb_preset_apply_mux(const hb_dict_t *preset, hb_dict_t *job_dict) hb_dict_set(dest_dict, "AlignAVStart", hb_value_xform(hb_dict_get(preset, "AlignAVStart"), HB_VALUE_TYPE_BOOL)); + hb_dict_set(dest_dict, "InlineParameterSets", + hb_value_xform(hb_dict_get(preset, "InlineParameterSets"), + HB_VALUE_TYPE_BOOL)); if (mux & HB_MUX_MASK_MP4) { hb_dict_t *mp4_dict = hb_dict_init(); diff --git a/libhb/preset_builtin.h b/libhb/preset_builtin.h index 20c1f71fb..fee3ec03a 100644 --- a/libhb/preset_builtin.h +++ b/libhb/preset_builtin.h @@ -33,6 +33,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -134,6 +135,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -235,6 +237,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -336,6 +339,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -437,6 +441,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -538,6 +543,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -639,6 +645,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -740,6 +747,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -855,6 +863,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -970,6 +979,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -1085,6 +1095,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -1200,6 +1211,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -1315,6 +1327,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -1430,6 +1443,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -1545,6 +1559,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -1660,6 +1675,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -1768,6 +1784,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": true, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -1869,6 +1886,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": true, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -1970,6 +1988,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": true, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2071,6 +2090,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": true, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2172,6 +2192,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": true, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2273,6 +2294,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": true, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2374,6 +2396,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": true, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2475,6 +2498,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": true, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2582,6 +2606,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2682,6 +2707,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2782,6 +2808,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2882,6 +2909,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -2996,6 +3024,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -3110,6 +3139,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -3224,6 +3254,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -3338,6 +3369,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -3438,6 +3470,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": true, \n" " \"PictureAutoCrop\": true, \n" @@ -3552,6 +3585,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": true, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -3666,6 +3700,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -3780,6 +3815,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -3880,6 +3916,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -3980,6 +4017,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -4098,6 +4136,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -4216,6 +4255,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -4331,6 +4371,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -4446,6 +4487,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -4547,6 +4589,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -4648,6 +4691,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -4748,6 +4792,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -4848,6 +4893,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -4948,6 +4994,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5048,6 +5095,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5162,6 +5210,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5276,6 +5325,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5383,6 +5433,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5483,6 +5534,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5583,6 +5635,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5683,6 +5736,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5783,6 +5837,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5883,6 +5938,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -5983,6 +6039,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6083,6 +6140,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6181,6 +6239,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6279,6 +6338,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6377,6 +6437,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6475,6 +6536,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6573,6 +6635,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6671,6 +6734,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6769,6 +6833,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6867,6 +6932,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mkv\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -6975,6 +7041,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": false, \n" @@ -7076,6 +7143,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": false, \n" @@ -7177,6 +7245,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": false, \n" @@ -7278,6 +7347,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": false, \n" @@ -8256,6 +8326,7 @@ const char hb_builtin_presets_json[] = " \"FileFormat\": \"mp4\", \n" " \"Folder\": false, \n" " \"FolderOpen\": false, \n" +" \"InlineParameterSets\": false, \n" " \"Mp4HttpOptimize\": false, \n" " \"Mp4iPodCompatible\": false, \n" " \"PictureAutoCrop\": true, \n" @@ -8327,7 +8398,7 @@ const char hb_builtin_presets_json[] = " \"x264Option\": \"\", \n" " \"x264UseAdvancedOptions\": false\n" " }, \n" -" \"VersionMajor\": 30, \n" +" \"VersionMajor\": 31, \n" " \"VersionMicro\": 0, \n" " \"VersionMinor\": 0\n" " }\n" diff --git a/libhb/work.c b/libhb/work.c index a35cc76cf..402d1bec4 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -354,6 +354,10 @@ void hb_display_job_info(hb_job_t *job) break; } + if (job->inline_parameter_sets) + { + hb_log(" + optimized for adaptive streaming (inline parameter sets)"); + } if( job->chapter_markers ) { hb_log( " + chapter markers" ); diff --git a/preset/preset_builtin.json b/preset/preset_builtin.json index a964acd0d..ed3412ff8 100644 --- a/preset/preset_builtin.json +++ b/preset/preset_builtin.json @@ -33,6 +33,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -137,6 +138,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -241,6 +243,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -345,6 +348,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -449,6 +453,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -553,6 +558,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -657,6 +663,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -761,6 +768,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -879,6 +887,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -997,6 +1006,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -1115,6 +1125,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -1233,6 +1244,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -1351,6 +1363,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -1469,6 +1482,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -1587,6 +1601,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -1705,6 +1720,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -1816,6 +1832,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": true, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -1920,6 +1937,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": true, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2024,6 +2042,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": true, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2128,6 +2147,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": true, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2232,6 +2252,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": true, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2336,6 +2357,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": true, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2440,6 +2462,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": true, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2544,6 +2567,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": true, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2654,6 +2678,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2757,6 +2782,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2860,6 +2886,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -2963,6 +2990,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -3080,6 +3108,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -3197,6 +3226,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -3314,6 +3344,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -3431,6 +3462,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -3534,6 +3566,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": true, "PictureAutoCrop": true, @@ -3651,6 +3684,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": true, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -3768,6 +3802,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -3885,6 +3920,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -3988,6 +4024,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -4091,6 +4128,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -4212,6 +4250,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -4333,6 +4372,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -4451,6 +4491,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -4569,6 +4610,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -4673,6 +4715,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -4777,6 +4820,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -4880,6 +4924,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -4983,6 +5028,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -5086,6 +5132,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -5189,6 +5236,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -5306,6 +5354,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -5423,6 +5472,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -5533,6 +5583,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -5636,6 +5687,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -5739,6 +5791,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -5842,6 +5895,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -5945,6 +5999,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6048,6 +6103,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6151,6 +6207,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6254,6 +6311,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6356,6 +6414,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6458,6 +6517,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6560,6 +6620,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6662,6 +6723,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6764,6 +6826,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6866,6 +6929,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -6968,6 +7032,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -7070,6 +7135,7 @@ "FileFormat": "mkv", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, @@ -7181,6 +7247,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": false, @@ -7285,6 +7352,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": false, @@ -7389,6 +7457,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": false, @@ -7493,6 +7562,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": false, diff --git a/preset/preset_builtin.list b/preset/preset_builtin.list index 74d159ec7..bdc86e943 100644 --- a/preset/preset_builtin.list +++ b/preset/preset_builtin.list @@ -1,6 +1,6 @@ <resources> <section name="PresetTemplate"> - <integer name="VersionMajor" value="30" /> + <integer name="VersionMajor" value="31" /> <integer name="VersionMinor" value="0" /> <integer name="VersionMicro" value="0" /> <json name="Preset" file="preset_template.json" /> diff --git a/preset/preset_template.json b/preset/preset_template.json index 4e5389230..ae96e2172 100644 --- a/preset/preset_template.json +++ b/preset/preset_template.json @@ -38,6 +38,7 @@ "FileFormat": "mp4", "Folder": false, "FolderOpen": false, + "InlineParameterSets": false, "Mp4HttpOptimize": false, "Mp4iPodCompatible": false, "PictureAutoCrop": true, 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) |