From 16cc03076330b23a0e8744ea125db61a5a2bd2e8 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 2 Jun 2017 08:51:21 -0700 Subject: sync: work-around players with broken edit list support This adds a preset key AlignAVStart that enables this work-around. When enabled, blank frames are inserted or frames are dropped to force alignment of the initial timestamp of every audio and video stream. Aligning the start times minimizes the impact of broken edit list support in players. Closes #763. Squashed: sync: improve alignment when passthru audio is present presets: enable AlignAVStart for General and Gmail presets LinGui: Improve AlignAVStart tooltip sync: avoid inserting a black frame < nominal frame duration sync: fix start alignment when doing p-to-p encoding sync: add comments --- libhb/hb_json.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libhb/hb_json.c') diff --git a/libhb/hb_json.c b/libhb/hb_json.c index 3d42078f7..5a3b4ca9d 100644 --- a/libhb/hb_json.c +++ b/libhb/hb_json.c @@ -390,8 +390,8 @@ hb_dict_t* hb_job_to_dict( const hb_job_t * job ) "{" // SequenceID "s:o," - // Destination {Mux, ChapterMarkers, ChapterList} - "s:{s:o, s:o, s:[]}," + // Destination {Mux, AlignAVStart, ChapterMarkers, ChapterList} + "s:{s:o, s:o, s:o, s:[]}," // Source {Path, Title, Angle} "s:{s:o, s:o, s:o,}," // PAR {Num, Den} @@ -410,6 +410,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), + "AlignAVStart", hb_value_bool(job->align_av_start), "ChapterMarkers", hb_value_bool(job->chapter_markers), "ChapterList", "Source", @@ -852,7 +853,7 @@ hb_job_t* hb_dict_to_job( hb_handle_t * h, hb_dict_t *dict ) "s:i," // Destination {File, Mux, ChapterMarkers, ChapterList, // Mp4Options {Mp4Optimize, IpodAtom}} - "s:{s?s, s:o, s:b, s?o s?{s?b, s?b}}," + "s:{s?s, s:o, 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} @@ -877,6 +878,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), + "AlignAVStart", unpack_b(&job->align_av_start), "ChapterMarkers", unpack_b(&job->chapter_markers), "ChapterList", unpack_o(&chapter_list), "Mp4Options", -- cgit v1.2.3