From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH v2 2/6] fate/matroska: Add test for avoiding negative timestamps
Date: Wed, 19 Jan 2022 22:29:36 +0100
Message-ID: <AM7PR03MB666017A3B82643664691A9568F599@AM7PR03MB6660.eurprd03.prod.outlook.com> (raw)
In-Reply-To: <AM7PR03MB6660033A965D169EF902724E8F599@AM7PR03MB6660.eurprd03.prod.outlook.com>
This tests the issue from tickets #4536, #5784;
the output of this test is currently broken.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
Now only performing codec copy.
tests/fate/matroska.mak | 17 +++++++++
tests/ref/fate/matroska-avoid-negative-ts | 42 +++++++++++++++++++++++
2 files changed, 59 insertions(+)
create mode 100644 tests/ref/fate/matroska-avoid-negative-ts
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 2fcac34d62..b65a76411b 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -90,6 +90,23 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL MOV_DEMUXER \
+= fate-matroska-dovi-write-config7
fate-matroska-dovi-write-config7: CMD = transcode mov $(TARGET_SAMPLES)/mov/dovi-p7.mp4 matroska "-map 0 -c copy -cues_to_front yes -reserve_index_space 40 -metadata_header_padding 64339" "-map 0 -c copy" "" "-show_entries stream_side_data_list"
+# This tests the scenario like tickets #4536, #5784 where
+# the first packet (with the overall lowest dts) is a video packet,
+# whereas an audio packet to be muxed later has the overall lowest pts
+# which happens to be negative and therefore needs to be shifted.
+# This is currently buggy (the timestamps of the video frames muxed
+# before the first audio frame are not shifted).
+# (-ss 1.09 ensures that a video frame has the lowest dts of all packets;
+# yet there is an audio packet with the overall lowest pts. output_ts_offset
+# makes the pts of the audio packet, but not the leading video packet negative
+# so that we run into the above issue.)
+FATE_MATROSKA-$(call ALLYES, FILE_PROTOCOL MPEGTS_DEMUXER MPEGVIDEO_PARSER \
+ MPEG2VIDEO_DECODER EXTRACT_EXTRADATA_BSF \
+ MP3FLOAT_DECODER MATROSKA_MUXER \
+ MATROSKA_DEMUXER FRAMECRC_MUXER PIPE_PROTOCOL) \
+ += fate-matroska-avoid-negative-ts
+fate-matroska-avoid-negative-ts: CMD = transcode mpegts $(TARGET_SAMPLES)/mpeg2/t.mpg matroska "-c copy -ss 1.09 -output_ts_offset -60ms" "-c copy -t 0.4"
+
# This tests writing the MS-compatibility modes V_MS/VFW/FOURCC and A_MS/ACM.
# It furthermore tests writing the Cues at the front if the cues_to_front
# option is set and more than enough space has been reserved in advance.
diff --git a/tests/ref/fate/matroska-avoid-negative-ts b/tests/ref/fate/matroska-avoid-negative-ts
new file mode 100644
index 0000000000..a687c8f63c
--- /dev/null
+++ b/tests/ref/fate/matroska-avoid-negative-ts
@@ -0,0 +1,42 @@
+3349536550047c5c553215003ba2acb7 *tests/data/fate/matroska-avoid-negative-ts.matroska
+973070 tests/data/fate/matroska-avoid-negative-ts.matroska
+#extradata 0: 22, 0x2885037c
+#tb 0: 1/1000
+#media_type 0: video
+#codec_id 0: mpeg2video
+#dimensions 0: 352x288
+#sar 0: 12/11
+#tb 1: 1/1000
+#media_type 1: audio
+#codec_id 1: mp3
+#sample_rate 1: 44100
+#channel_layout 1: 4
+#channel_layout_name 1: mono
+0, -37, 24, 40, 9156, 0xe5bd034a, S=1, 40
+1, 0, 0, 26, 417, 0x7198c15e
+0, 3, 3, 40, 1740, 0x29ac4480, F=0x0
+0, 24, 123, 40, 3672, 0x98652013, F=0x0
+1, 26, 26, 26, 417, 0x3c67c32d
+1, 52, 52, 26, 417, 0x8c24b1ca
+1, 78, 78, 26, 417, 0x6ee576b7
+0, 83, 83, 40, 2532, 0xa2c42769, F=0x0
+1, 104, 104, 26, 417, 0x407603db
+0, 123, 203, 40, 1728, 0xae823d3b, F=0x0
+1, 130, 130, 26, 417, 0xcf2804d2
+1, 156, 156, 26, 417, 0xcf2804d2
+0, 163, 163, 40, 1028, 0x286ac52a, F=0x0
+1, 182, 182, 26, 417, 0xcf2804d2
+0, 203, 283, 40, 1916, 0xd378899e, F=0x0
+1, 208, 208, 26, 417, 0xcf2804d2
+1, 235, 235, 26, 417, 0xcf2804d2
+0, 243, 243, 40, 1168, 0x424e12cf, F=0x0
+1, 261, 261, 26, 417, 0xcf2804d2
+0, 283, 363, 40, 1660, 0x5cec156c, F=0x0
+1, 287, 287, 26, 417, 0xcf2804d2
+1, 313, 313, 26, 417, 0xef163d04
+0, 323, 323, 40, 1004, 0xac0dce29, F=0x0
+1, 339, 339, 26, 417, 0x2a009b3a
+0, 363, 443, 40, 3008, 0x0fc798bf, F=0x0
+1, 365, 365, 26, 417, 0xbedccb9d
+1, 365, 365, 26, 417, 0x2214be3f
+1, 391, 391, 26, 417, 0x8953b878
--
2.32.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-01-19 21:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 21:19 [FFmpeg-devel] [PATCH v2 1/6] avformat/mux: Remove assert based on faulty assumptions Andreas Rheinhardt
2022-01-19 21:29 ` Andreas Rheinhardt [this message]
[not found] ` <20220119212940.1071477-1-andreas.rheinhardt@outlook.com>
2022-01-19 21:29 ` [FFmpeg-devel] [PATCH v2 3/6] avformat/avformat: Add AVFMT_AVOID_NEG_TS_DISABLED Andreas Rheinhardt
2022-01-19 21:29 ` [FFmpeg-devel] [PATCH v2 4/6] avformat/mux: Preserve sync even if later packet has negative ts Andreas Rheinhardt
2022-01-19 21:29 ` [FFmpeg-devel] [PATCH v2 5/6] avformat/mux: Peek into the muxing queue for avoid_negative_ts Andreas Rheinhardt
2022-01-19 21:29 ` [FFmpeg-devel] [PATCH v2 6/6] avformat/hls: Remove redundant cast Andreas Rheinhardt
2022-01-21 12:14 ` [FFmpeg-devel] [PATCH v2 1/6] avformat/mux: Remove assert based on faulty assumptions Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM7PR03MB666017A3B82643664691A9568F599@AM7PR03MB6660.eurprd03.prod.outlook.com \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git