PR #26229 opened by Romain Beauxis (toots) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26229 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26229.patch
After a seek, a fresh MPEG audio decoder outputs wrong samples until its state is rebuilt: the synthesis history (480 samples), and for layer III the IMDCT overlap (576) and the granules whose main data lies in bit reservoir bytes it never got. The decoders declared no `seek_preroll`, so `AVSEEK_FLAG_PREROLL` did nothing for them. The decoder now declares 480 for layers I and II. For layer III it declares 480 + 576 plus the frames the reservoir can reach back: up to 511 bytes in MPEG-1 and 255 in MPEG-2, bounded for the smallest frames of the stream's format since the encoder's use of it is not declared. For MPEG-1 that is about 0.2 s. At the lowest MPEG-2 bitrates it reaches several seconds (6.2 s at 24 kHz stereo). Since the seek takes the largest pre-roll of all audio streams, every pre-roll seek in such a file lands that much earlier, including on the video stream. That is the safe value for a caller who opts into the pre-roll. `fate-preroll-mp3-match` and `fate-preroll-mp3-itunes-match` compare the float decoder's output after a seek with a decode from the start, and print only the frames that match exactly. Before the change, the first frames after the target are missing. After it, every frame from the target on matches. >From c20a06a3371e980f41e46769198ea9424109ba9f Mon Sep 17 00:00:00 2001 From: Romain Beauxis <[email protected]> Date: Fri, 20 Nov 2026 00:45:11 -0600 Subject: [PATCH 1/2] tests/fate/preroll: compare mp3 decoding after a seek with a full decode Only the frames that match a decode from the start exactly are printed. The reference records the current behavior: mp3 declares no pre-roll, so the first frames after the target do not match. --- tests/fate/preroll.mak | 16 +++++++++++++++- tests/ref/fate/preroll-mp3-itunes-match | 16 ++++++++++++++++ tests/ref/fate/preroll-mp3-match | 15 +++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 tests/ref/fate/preroll-mp3-itunes-match create mode 100644 tests/ref/fate/preroll-mp3-match diff --git a/tests/fate/preroll.mak b/tests/fate/preroll.mak index c28515aefa3..075f5118618 100644 --- a/tests/fate/preroll.mak +++ b/tests/fate/preroll.mak @@ -5,7 +5,8 @@ # the first packets read after a seek, and the timing of the decoded output # after a seek, with and without the samples before the target. The output # is silenced, as only its timing is compared and the decoders are not -# bit-exact across platforms. +# bit-exact across platforms. The match tests below compare two decodes made +# in the same run instead, which are equal on any platform once converged. PREROLL_SEEK_TS = 0.53 PREROLL_OPT = -seek_flags preroll @@ -35,6 +36,19 @@ $(eval $(call FATE_PREROLL_TEST,opus-mpegts,MPEGTS,OPUS,opus/test-8-7.1.opus-sma $(eval $(call FATE_PREROLL_TEST,mp3,MP3,MP3FLOAT,gapless/gapless.mp3)) $(eval $(call FATE_PREROLL_TEST,mp3-itunes,MP3,MP3FLOAT,gapless/gapless-itunes.mp3)) +# Decoded output after a seek, compared with the same span decoded from the +# start of the stream: only the frames that match it exactly are printed. A +# decoder that converges to the exact output once its pre-roll is discarded +# prints every frame from the target on. +# 1: test name, 2: demuxer, 3: decoder, 4: decoder name, 5: sample +define FATE_PREROLL_MATCH_TEST +FATE_PREROLL_FFMPEG-$(call FRAMECRC, $(2), $(3), PCM_S16LE_ENCODER ARESAMPLE_FILTER AMIX_FILTER ASTATS_FILTER AMETADATA_FILTER ATRIM_FILTER ASETPTS_FILTER) += fate-preroll-$(1)-match +fate-preroll-$(1)-match: CMD = framecrc $(PREROLL_OPT) -ss $(PREROLL_SEEK_TS) -t 0.3 -c:a $(4) -i $(TARGET_SAMPLES)/$(5) -c:a $(4) -i $(TARGET_SAMPLES)/$(5) -filter_complex "[0:a:0]asetpts=PTS-STARTPTS[seek];[1:a:0]atrim=start=$(PREROLL_SEEK_TS):duration=0.3,asetpts=PTS-STARTPTS[full];[seek][full]amix=inputs=2:weights=1|-1:duration=shortest,astats=metadata=1:reset=1:measure_overall=Peak_level:measure_perchannel=none,ametadata=mode=select:key=lavfi.astats.Overall.Peak_level:value=-inf:function=same_str,aresample" -c:a pcm_s16le +endef + +$(eval $(call FATE_PREROLL_MATCH_TEST,mp3,MP3,MP3FLOAT,mp3float,gapless/gapless.mp3)) +$(eval $(call FATE_PREROLL_MATCH_TEST,mp3-itunes,MP3,MP3FLOAT,mp3float,gapless/gapless-itunes.mp3)) + # A seek that lands inside the priming, which here spans the first three # packets: the rest of the priming, or the pre-roll if longer, is skipped. FATE_PREROLL_FFMPEG-$(call FRAMECRC, CAF, AAC, PCM_S16LE_ENCODER ARESAMPLE_FILTER VOLUME_FILTER) += fate-preroll-aac-caf-decode-in-priming diff --git a/tests/ref/fate/preroll-mp3-itunes-match b/tests/ref/fate/preroll-mp3-itunes-match new file mode 100644 index 00000000000..723de36dd6d --- /dev/null +++ b/tests/ref/fate/preroll-mp3-itunes-match @@ -0,0 +1,16 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout_name 0: stereo +0, 1443, 1443, 1152, 4608, 0x00000000 +0, 2595, 2595, 1152, 4608, 0x00000000 +0, 3747, 3747, 1152, 4608, 0x00000000 +0, 4899, 4899, 1152, 4608, 0x00000000 +0, 6051, 6051, 1152, 4608, 0x00000000 +0, 7203, 7203, 1152, 4608, 0x00000000 +0, 8355, 8355, 1152, 4608, 0x00000000 +0, 9507, 9507, 1152, 4608, 0x00000000 +0, 10659, 10659, 1152, 4608, 0x00000000 +0, 11811, 11811, 1152, 4608, 0x00000000 +0, 12963, 12963, 267, 1068, 0x00000000 diff --git a/tests/ref/fate/preroll-mp3-match b/tests/ref/fate/preroll-mp3-match new file mode 100644 index 00000000000..e347844d6fd --- /dev/null +++ b/tests/ref/fate/preroll-mp3-match @@ -0,0 +1,15 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout_name 0: stereo +0, 2018, 2018, 1152, 4608, 0x00000000 +0, 3170, 3170, 1152, 4608, 0x00000000 +0, 4322, 4322, 1152, 4608, 0x00000000 +0, 5474, 5474, 1152, 4608, 0x00000000 +0, 6626, 6626, 1152, 4608, 0x00000000 +0, 7778, 7778, 1152, 4608, 0x00000000 +0, 8930, 8930, 1152, 4608, 0x00000000 +0, 10082, 10082, 1152, 4608, 0x00000000 +0, 11234, 11234, 1152, 4608, 0x00000000 +0, 12386, 12386, 844, 3376, 0x00000000 -- 2.54.1 >From e6b263211359b1dae72860de20d0755abe2de939 Mon Sep 17 00:00:00 2001 From: Romain Beauxis <[email protected]> Date: Fri, 20 Nov 2026 00:51:32 -0600 Subject: [PATCH 2/2] avcodec/mpegaudiodec: declare the seek pre-roll A decoder started inside the stream outputs exact samples once its state is rebuilt: the synthesis history (480 samples), and for layer III the IMDCT overlap (576) and the granules whose main data begins in frames it did not get. The encoder chooses how much of the bit reservoir it uses, so the reach is bounded for the smallest frames the stream format allows: 511 bytes back in MPEG-1, 255 in MPEG-2. That is about 0.2 s for MPEG-1. At the lowest MPEG-2 bitrates a frame carries only a few bytes of main data, and the bound reaches several seconds: 2.3 s at 22.05 kHz stereo, 6.2 s at 24 kHz stereo. As the seek takes the largest pre-roll of all audio streams, every seek with AVSEEK_FLAG_PREROLL in such a file, on the video stream too, lands that much earlier. It is the safe value for a caller who asks for the pre-roll. After a seek with the pre-roll, the float decoders' output now matches a decode from the start exactly from the target on. The fixed-point decoders carry their rounding from frame to frame, and stay within 1 LSB of it. --- libavcodec/mpegaudiodec_template.c | 30 +++++++++++++++++++ tests/ref/fate/concat-demuxer-simple2-lavf-ts | 2 +- tests/ref/fate/gapless-mp3-side-data | 2 +- tests/ref/fate/hls-shared-renditions-demux | 6 ++-- tests/ref/fate/hls-start-master-demux | 2 +- tests/ref/fate/hls-start-variant-demux | 2 +- tests/ref/fate/preroll-mp3-declared | 2 +- tests/ref/fate/preroll-mp3-decode-noaccurate | 3 +- tests/ref/fate/preroll-mp3-itunes-declared | 2 +- .../fate/preroll-mp3-itunes-decode-noaccurate | 3 +- tests/ref/fate/preroll-mp3-itunes-landing | 6 ++-- tests/ref/fate/preroll-mp3-itunes-match | 2 ++ tests/ref/fate/preroll-mp3-landing | 6 ++-- tests/ref/fate/preroll-mp3-match | 2 ++ 14 files changed, 53 insertions(+), 17 deletions(-) diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c index cb86ea170de..88748342a70 100644 --- a/libavcodec/mpegaudiodec_template.c +++ b/libavcodec/mpegaudiodec_template.c @@ -1558,6 +1558,35 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT **samples, return nb_frames * 32 * sizeof(OUT_INT) * s->hdr.nb_channels; } +/** + * Samples a decoder started inside the stream outputs before its output is + * exact: the synthesis history, then for layer III the IMDCT overlap and + * the granules whose main data begins before the first frame decoded. The + * bit reservoir reach is bounded for the smallest frames this stream format + * allows, as an encoder may use all of it. + */ +static int seek_preroll(const MPADecodeHeader2 *hdr) +{ + const int synth_history = 512 - 32; + const int imdct_overlap = 576; + + if (hdr->layer != 3) + return synth_history; + + const int samples_per_frame = hdr->lsf ? 576 : 1152; + const int max_main_data_begin = hdr->lsf ? 255 : 511; + const int side_info_size = hdr->lsf ? (hdr->nb_channels == 1 ? 9 : 17) + : (hdr->nb_channels == 1 ? 17 : 32); + const int min_frame_size = ff_mpa_bitrate_tab[hdr->lsf][2][1] * 144000 / + (hdr->sample_rate << hdr->lsf); + /* header and CRC */ + const int min_main_data = min_frame_size - 4 - 2 - side_info_size; + + return synth_history + imdct_overlap + + (max_main_data_begin + min_main_data - 1) / min_main_data * + samples_per_frame; +} + static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) { @@ -1599,6 +1628,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; if (!avctx->bit_rate) avctx->bit_rate = s->hdr.bit_rate; + avctx->seek_preroll = FFMAX(avctx->seek_preroll, seek_preroll(&s->hdr)); if (s->hdr.frame_size <= 0) { av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); diff --git a/tests/ref/fate/concat-demuxer-simple2-lavf-ts b/tests/ref/fate/concat-demuxer-simple2-lavf-ts index 34f78c288d6..a90a76daedf 100644 --- a/tests/ref/fate/concat-demuxer-simple2-lavf-ts +++ b/tests/ref/fate/concat-demuxer-simple2-lavf-ts @@ -147,5 +147,5 @@ video|1|164782|1.830911|161182|1.790911|3600|0.040000|12282|168448|___|MPEGTS St video|1|168382|1.870911|164782|1.830911|3600|0.040000|24786|181420|K__|MPEGTS Stream ID|224 video|1|171982|1.910911|168382|1.870911|3600|0.040000|17440|206988|___|MPEGTS Stream ID|224 video|1|175582|1.950911|171982|1.910911|3600|0.040000|15019|224848|___|MPEGTS Stream ID|224 -0|mp2|unknown|-99|audio|[3][0][0][0]|0x0003|mp4a.40.33|s16p|44100|1|mono|0|0|0|N/A|0/0|0/0|1/90000|0|0.000000|N/A|N/A|64000|N/A|N/A|N/A|N/A|89|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 0 +0|mp2|unknown|-99|audio|[3][0][0][0]|0x0003|mp4a.40.33|s16p|44100|1|mono|0|0|480|N/A|0/0|0/0|1/90000|0|0.000000|N/A|N/A|64000|N/A|N/A|N/A|N/A|89|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 0 1|mpeg2video|4|8|video|[2][0][0][0]|0x0002|352|288|0|0|1|1:1|11:9|yuv420p|tv|unknown|unknown|unknown|left|progressive|N/A|25/1|25/1|1/90000|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|60|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 1|CPB properties|0|0|0|49152|-1 diff --git a/tests/ref/fate/gapless-mp3-side-data b/tests/ref/fate/gapless-mp3-side-data index 425a7f35489..6154266abb1 100644 --- a/tests/ref/fate/gapless-mp3-side-data +++ b/tests/ref/fate/gapless-mp3-side-data @@ -593,5 +593,5 @@ packet|codec_type=audio|stream_index=0|pts=217866240|pts_time=15.438367|dts=2178 packet|codec_type=audio|stream_index=0|pts=218234880|pts_time=15.464490|dts=218234880|dts_time=15.464490|duration=368640|duration_time=0.026122|size=418|pos=248882|flags=K__|data_hash=CRC32:fbc83c3c packet|codec_type=audio|stream_index=0|pts=218603520|pts_time=15.490612|dts=218603520|dts_time=15.490612|duration=368640|duration_time=0.026122|size=418|pos=249300|flags=K__|data_hash=CRC32:d5fb5f9c|side_datum/skip_samples:side_data_type=Skip Samples|side_datum/skip_samples:skip_samples=0|side_datum/skip_samples:discard_padding=303|side_datum/skip_samples:skip_reason=0|side_datum/skip_samples:discard_reason=0 packet|codec_type=audio|stream_index=0|pts=218972160|pts_time=15.516735|dts=218972160|dts_time=15.516735|duration=368640|duration_time=0.026122|size=418|pos=249718|flags=K__|data_hash=CRC32:3789f3cf|side_datum/skip_samples:side_data_type=Skip Samples|side_datum/skip_samples:skip_samples=0|side_datum/skip_samples:discard_padding=1152|side_datum/skip_samples:skip_reason=0|side_datum/skip_samples:discard_reason=0 -stream|index=0|codec_name=mp3|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|mime_codec_string=mp4a.40.34|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=1105|seek_preroll=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/14112000|start_pts=353600|start_time=0.025057|duration_ts=218521600|duration=15.484807|bit_rate=128000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=595|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag: encoder=LAME3.93 +stream|index=0|codec_name=mp3|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|mime_codec_string=mp4a.40.34|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=1105|seek_preroll=10272|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/14112000|start_pts=353600|start_time=0.025057|duration_ts=218521600|duration=15.484807|bit_rate=128000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=595|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0| tag:encoder=LAME3.93 format|filename=gapless.mp3|nb_streams=1|nb_programs=0|nb_stream_groups=0|format_name=mp3|start_time=0.025057|duration=15.484807|size=250264|bit_rate=129295|probe_score=52|tag:title=test diff --git a/tests/ref/fate/hls-shared-renditions-demux b/tests/ref/fate/hls-shared-renditions-demux index 105f0391818..9b7e610ba69 100644 --- a/tests/ref/fate/hls-shared-renditions-demux +++ b/tests/ref/fate/hls-shared-renditions-demux @@ -28,10 +28,10 @@ packet|codec_type=audio|stream_index=1|pts=168480|pts_time=1.872000|dts=168480|d packet|codec_type=audio|stream_index=1|pts=174960|pts_time=1.944000|dts=174960|dts_time=1.944000|duration=6480|duration_time=0.072000|size=1440|pos=41172|flags=K__|data_hash=CRC32:cb00dd5b|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=192 program|program_id=0|program_num=0|nb_streams=2|pmt_pid=0|pcr_pid=0|tag:variant_bitrate=64000 stream|index=0|codec_name=webvtt|profile=unknown|level=-99|codec_type=subtitle|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=N/A|height=N/A|id=0x0|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=N/A|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=de|tag:comment=German -stream|index=1|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=fltp|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=0|id=0x1|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=28|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=en|tag:comment=En glish +stream|index=1|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=fltp|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=480|id=0x1|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=28|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=en|tag:comment= English program|program_id=1|program_num=0|nb_streams=2|pmt_pid=0|pcr_pid=0|tag:variant_bitrate=128000 stream|index=0|codec_name=webvtt|profile=unknown|level=-99|codec_type=subtitle|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=N/A|height=N/A|id=0x0|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=N/A|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=de|tag:comment=German -stream|index=1|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=fltp|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=0|id=0x1|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=28|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=en|tag:comment=En glish +stream|index=1|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=fltp|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=480|id=0x1|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=28|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=en|tag:comment= English stream|index=0|codec_name=webvtt|profile=unknown|level=-99|codec_type=subtitle|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=N/A|height=N/A|id=0x0|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=N/A|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=de|tag:comment=German -stream|index=1|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=fltp|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=0|id=0x1|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=28|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=en|tag:comment=En glish +stream|index=1|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=fltp|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=480|id=0x1|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=28|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=en|tag:comment= English format|filename=hls-shared-renditions.m3u8|nb_streams=2|nb_programs=2|nb_stream_groups=0|format_name=hls|start_time=0.000000|duration=2.016000|size=365|bit_rate=1448|probe_score=100 diff --git a/tests/ref/fate/hls-start-master-demux b/tests/ref/fate/hls-start-master-demux index fd698bea2d3..3057080fe0a 100644 --- a/tests/ref/fate/hls-start-master-demux +++ b/tests/ref/fate/hls-start-master-demux @@ -14,6 +14,6 @@ packet|codec_type=audio|stream_index=0|pts=38880|pts_time=0.432000|dts=38880|dts packet|codec_type=audio|stream_index=1|pts=38880|pts_time=0.432000|dts=38880|dts_time=0.432000|duration=6480|duration_time=0.072000|size=1440|pos=11280|flags=K__|data_hash=CRC32:cb00dd5b|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=192 packet|codec_type=audio|stream_index=0|pts=45360|pts_time=0.504000|dts=45360|dts_time=0.504000|duration=6480|duration_time=0.072000|size=1440|pos=12784|flags=K__|data_hash=CRC32:cb00dd5b|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=192 packet|codec_type=audio|stream_index=1|pts=45360|pts_time=0.504000|dts=45360|dts_time=0.504000|duration=6480|duration_time=0.072000|size=1440|pos=12784|flags=K__|data_hash=CRC32:cb00dd5b|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=192 -stream|index=0|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=fltp|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=0|id=0x0|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=8|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:variant_bitrate=64000|tag:c omment=a +stream|index=0|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=fltp|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=480|id=0x0|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=8|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:variant_bitrate=64000|tag :comment=a stream|index=1|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=unknown|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=0|id=0x1|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=8|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:variant_bitrate=64000 format|filename=hls-start-master.m3u8|nb_streams=2|nb_programs=1|nb_stream_groups=0|format_name=hls|start_time=0.000000|duration=N/A|size=190|bit_rate=320000|probe_score=100 diff --git a/tests/ref/fate/hls-start-variant-demux b/tests/ref/fate/hls-start-variant-demux index 48fa2785d30..2c42e9af413 100644 --- a/tests/ref/fate/hls-start-variant-demux +++ b/tests/ref/fate/hls-start-variant-demux @@ -6,6 +6,6 @@ packet|codec_type=audio|stream_index=0|pts=38880|pts_time=0.432000|dts=38880|dts packet|codec_type=audio|stream_index=1|pts=38880|pts_time=0.432000|dts=38880|dts_time=0.432000|duration=N/A|duration_time=N/A|size=1440|pos=564|flags=K__|data_hash=CRC32:cb00dd5b|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=192 packet|codec_type=audio|stream_index=0|pts=45360|pts_time=0.504000|dts=45360|dts_time=0.504000|duration=6480|duration_time=0.072000|size=1440|pos=9212|flags=K__|data_hash=CRC32:cb00dd5b|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=192 packet|codec_type=audio|stream_index=1|pts=45360|pts_time=0.504000|dts=45360|dts_time=0.504000|duration=6480|duration_time=0.072000|size=1440|pos=2068|flags=K__|data_hash=CRC32:cb00dd5b|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=192 -stream|index=0|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=s16p|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=0|id=0x0|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:variant_bitrate=64000|tag:c omment=a +stream|index=0|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=s16p|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=480|id=0x0|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:variant_bitrate=64000|tag :comment=a stream|index=1|codec_name=mp2|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|mime_codec_string=mp4a.40.33|sample_fmt=unknown|sample_rate=16000|channels=1|channel_layout=mono|bits_per_sample=0|initial_padding=0|seek_preroll=0|id=0x1|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=160000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=2|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:variant_bitrate=64000 format|filename=hls-start-variant.m3u8|nb_streams=2|nb_programs=1|nb_stream_groups=0|format_name=hls|start_time=0.000000|duration=N/A|size=150|bit_rate=320000|probe_score=100 diff --git a/tests/ref/fate/preroll-mp3-declared b/tests/ref/fate/preroll-mp3-declared index 3b242471e2c..d96aa6be2b4 100644 --- a/tests/ref/fate/preroll-mp3-declared +++ b/tests/ref/fate/preroll-mp3-declared @@ -1 +1 @@ -stream|codec_name=mp3|sample_rate=44100|initial_padding=1105|seek_preroll=0 +stream|codec_name=mp3|sample_rate=44100|initial_padding=1105|seek_preroll=10272 diff --git a/tests/ref/fate/preroll-mp3-decode-noaccurate b/tests/ref/fate/preroll-mp3-decode-noaccurate index 4726a2af44a..00b1e8f49b7 100644 --- a/tests/ref/fate/preroll-mp3-decode-noaccurate +++ b/tests/ref/fate/preroll-mp3-decode-noaccurate @@ -3,9 +3,10 @@ #codec_id 0: pcm_s16le #sample_rate 0: 44100 #channel_layout_name 0: stereo +0, -382, -382, 96, 384, 0x00000000 0, -286, -286, 1152, 4608, 0x00000000 0, 866, 866, 1152, 4608, 0x00000000 0, 2018, 2018, 1152, 4608, 0x00000000 0, 3170, 3170, 1152, 4608, 0x00000000 0, 4322, 4322, 1152, 4608, 0x00000000 -0, 5474, 5474, 855, 3420, 0x00000000 +0, 5474, 5474, 759, 3036, 0x00000000 diff --git a/tests/ref/fate/preroll-mp3-itunes-declared b/tests/ref/fate/preroll-mp3-itunes-declared index e111f6c9fb9..347b2aba347 100644 --- a/tests/ref/fate/preroll-mp3-itunes-declared +++ b/tests/ref/fate/preroll-mp3-itunes-declared @@ -1 +1 @@ -stream|codec_name=mp3|sample_rate=44100|initial_padding=528|seek_preroll=0 +stream|codec_name=mp3|sample_rate=44100|initial_padding=528|seek_preroll=10272 diff --git a/tests/ref/fate/preroll-mp3-itunes-decode-noaccurate b/tests/ref/fate/preroll-mp3-itunes-decode-noaccurate index 960cd66525b..ae6b082d85e 100644 --- a/tests/ref/fate/preroll-mp3-itunes-decode-noaccurate +++ b/tests/ref/fate/preroll-mp3-itunes-decode-noaccurate @@ -3,9 +3,10 @@ #codec_id 0: pcm_s16le #sample_rate 0: 44100 #channel_layout_name 0: stereo +0, -957, -957, 96, 384, 0x00000000 0, -861, -861, 1152, 4608, 0x00000000 0, 291, 291, 1152, 4608, 0x00000000 0, 1443, 1443, 1152, 4608, 0x00000000 0, 2595, 2595, 1152, 4608, 0x00000000 0, 3747, 3747, 1152, 4608, 0x00000000 -0, 4899, 4899, 855, 3420, 0x00000000 +0, 4899, 4899, 759, 3036, 0x00000000 diff --git a/tests/ref/fate/preroll-mp3-itunes-landing b/tests/ref/fate/preroll-mp3-itunes-landing index a52c329e73d..a7e4c911b46 100644 --- a/tests/ref/fate/preroll-mp3-itunes-landing +++ b/tests/ref/fate/preroll-mp3-itunes-landing @@ -1,3 +1,3 @@ -packet|pts=7372800|dts=7372800|duration=368640 -packet|pts=7741440|dts=7741440|duration=368640 -packet|pts=8110080|dts=8110080|duration=368640 +packet|pts=4055040|dts=4055040|duration=368640 +packet|pts=4423680|dts=4423680|duration=368640 +packet|pts=4792320|dts=4792320|duration=368640 diff --git a/tests/ref/fate/preroll-mp3-itunes-match b/tests/ref/fate/preroll-mp3-itunes-match index 723de36dd6d..37f72c45972 100644 --- a/tests/ref/fate/preroll-mp3-itunes-match +++ b/tests/ref/fate/preroll-mp3-itunes-match @@ -3,6 +3,8 @@ #codec_id 0: pcm_s16le #sample_rate 0: 44100 #channel_layout_name 0: stereo +0, 0, 0, 291, 1164, 0x00000000 +0, 291, 291, 1152, 4608, 0x00000000 0, 1443, 1443, 1152, 4608, 0x00000000 0, 2595, 2595, 1152, 4608, 0x00000000 0, 3747, 3747, 1152, 4608, 0x00000000 diff --git a/tests/ref/fate/preroll-mp3-landing b/tests/ref/fate/preroll-mp3-landing index a52c329e73d..a7e4c911b46 100644 --- a/tests/ref/fate/preroll-mp3-landing +++ b/tests/ref/fate/preroll-mp3-landing @@ -1,3 +1,3 @@ -packet|pts=7372800|dts=7372800|duration=368640 -packet|pts=7741440|dts=7741440|duration=368640 -packet|pts=8110080|dts=8110080|duration=368640 +packet|pts=4055040|dts=4055040|duration=368640 +packet|pts=4423680|dts=4423680|duration=368640 +packet|pts=4792320|dts=4792320|duration=368640 diff --git a/tests/ref/fate/preroll-mp3-match b/tests/ref/fate/preroll-mp3-match index e347844d6fd..d7047c761d8 100644 --- a/tests/ref/fate/preroll-mp3-match +++ b/tests/ref/fate/preroll-mp3-match @@ -3,6 +3,8 @@ #codec_id 0: pcm_s16le #sample_rate 0: 44100 #channel_layout_name 0: stereo +0, 0, 0, 866, 3464, 0x00000000 +0, 866, 866, 1152, 4608, 0x00000000 0, 2018, 2018, 1152, 4608, 0x00000000 0, 3170, 3170, 1152, 4608, 0x00000000 0, 4322, 4322, 1152, 4608, 0x00000000 -- 2.54.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
