From patchwork Mon Feb 15 16:55:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 25643 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C22E644B8A3 for ; Mon, 15 Feb 2021 18:56:21 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A9B09688188; Mon, 15 Feb 2021 18:56:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8D82B6880EF for ; Mon, 15 Feb 2021 18:56:19 +0200 (EET) Received: by mail-wr1-f51.google.com with SMTP id 7so9798379wrz.0 for ; Mon, 15 Feb 2021 08:56:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=UnVEsKmw0jqzGgMhpFz0OOl57ylF9ydqZzW8tZFJI4M=; b=o5qPpvT5Ji9wgVdFUc+uSlDhESmqR485uHQ2ZT1Ofs7tlQGc1xgrWDNpJqmrJ91TDG ZNv8ueAebNBNy4U+85wQFtLvnjept+nEtnorbfoxlE7/kDfsxET5AVYBarq2Sq9LpSoR tZzSu9doYiV3kj0MdJUZla9OykmZAWn4atDM3WQRrLN7fTt1hgS76kfRFjAyMLq8v9mq NAhxsUTAIg/gnuoTdxmGaPaugTkrDElGYemfkSHePHccpH0GDu4MYnMTRpBvkokiibfQ 6rY+oMFz2WMDgrjofbvoZ+QZMUnYZR8cbfBdMALaz69fZA8KVw3sRN6j2ugHmtIhTIi2 47iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=UnVEsKmw0jqzGgMhpFz0OOl57ylF9ydqZzW8tZFJI4M=; b=ojEU21gJYA1Qgt5ktoDsU4giDvO3MNw+9D5puzp44/hBZNo+sTvepq4ShB70Rgbhdp 1oK4gfYcWZ/thTeXPpx6OIYt6KjSa+vtXyWPkzB6nMjtoO0D+auI+Ks0hVQPzmjeE8SY 81ScbhsyPsCppex7Hp6Aa60mygP3apXBVc1X7wmKSRVids2H7YXS2j3wfcEi3o9cdOph 9CwM1+tOa3GzcwTDzx+Lpm/EyFokFmHZpsNsLGZa531R/BjD0zfj1CzZx/6LW9FIL/eo 6ILLX2lQZ+RnvH8dNMnRNqLb+Qma/BnmWbt7BdaxWdZB0O/wbUMtlB2qKu4WZk3HwBO2 JmzA== X-Gm-Message-State: AOAM530wDdRdMHjECFeyhNbqLIAAso3FBWHBje69K0hY8W0b1mRCepVQ 0c/CfJnx6lfP7GQn8LiQt2hY8jlNC3I= X-Google-Smtp-Source: ABdhPJwh68nebnO6s7OqHi037710dJ3ARmTUkVdYBB5qqfnuBDkGehxktK/8A96R+ZKtxi/y58jmZQ== X-Received: by 2002:a05:6000:18f:: with SMTP id p15mr11357457wrx.27.1613408178721; Mon, 15 Feb 2021 08:56:18 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id b2sm24531855wrv.73.2021.02.15.08.56.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 08:56:18 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Feb 2021 17:55:47 +0100 Message-Id: <20210215165549.667105-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210215165549.667105-1-andreas.rheinhardt@gmail.com> References: <20210215165549.667105-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 4/6] fate/mxf: Fix d10-user-comments test X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The mxf_d10 muxer is very picky regarding the input it accepts: The only video accepted is MPEG-2 with absolutely constant bitrate, i.e. all packets need to have exactly the same size; and only a few bitrates are accepted. The sample file used did not abide by this: Writing the first packet (a video packet) errors out and afterwards an audio packet from the muxing queue has been written. That's all besides metadata (which this test is about). The FFmpeg cli returned an error, but said error has been ignored by the md5 test. This commit changes the test to actually send a compliant stream to the muxer, so that it does not error out; furthermore, the test is changed to explicitly check the metadata instead of it only being implicitly included in the md5 checksum. The compliant stream is created by our encoder at runtime. Finally, the test now also covers writing user-specified product/company/version identification. Signed-off-by: Andreas Rheinhardt --- In comparison to the first version [1] I expanded the test to also cover the new product/company/version identification. [1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-December/273405.html tests/fate/mxf.mak | 8 ++++---- tests/ref/fate/mxf-d10-user-comments | 28 +++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/tests/fate/mxf.mak b/tests/fate/mxf.mak index ca119fa677..3a1096176f 100644 --- a/tests/fate/mxf.mak +++ b/tests/fate/mxf.mak @@ -45,9 +45,8 @@ FATE_MXF_USER_COMMENTS-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += fate-mxf-u fate-mxf-user-comments: $(SAMPLES)/mxf/Sony-00001.mxf fate-mxf-user-comments: CMD = md5 -y -i $(TARGET_SAMPLES)/mxf/Sony-00001.mxf -c copy -metadata "comment_test=value" -fflags +bitexact -f mxf -FATE_MXF_D10_USER_COMMENTS-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += fate-mxf-d10-user-comments -fate-mxf-d10-user-comments: $(SAMPLES)/mxf/Sony-00001.mxf -fate-mxf-d10-user-comments: CMD = md5 -y -i $(TARGET_SAMPLES)/mxf/Sony-00001.mxf -c copy -metadata "comment_test=value" -store_user_comments 1 -fflags +bitexact -f mxf_d10 +FATE_MXF_D10_USER_COMMENTS-$(call ALLYES, FILE_PROTOCOL MXF_DEMUXER DVVIDEO_DECODER SCALE_FILTER MPEG2VIDEO_ENCODER MXF_D10_MUXER EXTRACT_EXTRADATA_BSF MPEGVIDEO_PARSER PIPE_PROTOCOL FRAMECRC_MUXER) += fate-mxf-d10-user-comments +fate-mxf-d10-user-comments: CMD = transcode mxf $(TARGET_SAMPLES)/mxf/Avid-00005.mxf mxf_d10 "-c:v mpeg2video -b:v 30000k -minrate:v 30000k -maxrate:v 30000k -bufsize:v 30000k -rc_init_occupancy 30000k -vf scale=w=1280:h=720 -an -metadata comment_test=value -metadata company_name=FATE-company -metadata product_name=FATE-test -metadata product_version=3.14159 -store_user_comments 1" "-c copy -frames:v 5" "" "-show_entries format_tags" FATE_MXF_OPATOM_USER_COMMENTS-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += fate-mxf-opatom-user-comments fate-mxf-opatom-user-comments: $(SAMPLES)/mxf/Sony-00001.mxf @@ -56,7 +55,8 @@ fate-mxf-opatom-user-comments: CMD = md5 -y -i $(TARGET_SAMPLES)/mxf/Sony-00001. FATE_MXF-$(CONFIG_MXF_DEMUXER) += $(FATE_MXF) FATE_SAMPLES_AVCONV += $(FATE_MXF-yes) $(FATE_MXF_REEL_NAME-yes) -FATE_SAMPLES_AVCONV += $(FATE_MXF_USER_COMMENTS-yes) $(FATE_MXF_D10_USER_COMMENTS-yes) $(FATE_MXF_OPATOM_USER_COMMENTS-yes) +FATE_SAMPLES_AVCONV += $(FATE_MXF_USER_COMMENTS-yes) $(FATE_MXF_OPATOM_USER_COMMENTS-yes) +FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_MXF_D10_USER_COMMENTS-yes) FATE_SAMPLES_FFPROBE += $(FATE_MXF_PROBE-yes) fate-mxf: $(FATE_MXF-yes) $(FATE_MXF_PROBE-yes) $(FATE_MXF_REEL_NAME-yes) $(FATE_MXF_USER_COMMENTS-yes) $(FATE_MXF_D10_USER_COMMENTS-yes) $(FATE_MXF_OPATOM_USER_COMMENTS-yes) diff --git a/tests/ref/fate/mxf-d10-user-comments b/tests/ref/fate/mxf-d10-user-comments index c35add0279..0dcb04de30 100644 --- a/tests/ref/fate/mxf-d10-user-comments +++ b/tests/ref/fate/mxf-d10-user-comments @@ -1 +1,27 @@ -7bb9f39e8e05724525154de17f0235d8 +6dc13ae283257e898e069e5041ac8435 *tests/data/fate/mxf-d10-user-comments.mxf_d10 +3782189 tests/data/fate/mxf-d10-user-comments.mxf_d10 +#extradata 0: 34, 0x716b05c4 +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: mpeg2video +#dimensions 0: 1280x720 +#sar 0: 3/4 +0, -1, 0, 1, 150000, 0x0547870d, S=1, 24, 0x5aa90ad0 +0, 0, 1, 1, 150000, 0xe80a1612, F=0x0 +0, 1, 2, 1, 150000, 0xc5c50e2f, F=0x0 +0, 2, 3, 1, 150000, 0x51e28a04, F=0x0 +0, 3, 4, 1, 150000, 0x9bbe6feb, F=0x0 +[FORMAT] +TAG:operational_pattern_ul=060e2b34.04010101.0d010201.01010900 +TAG:uid=adab4424-2f25-4dc7-92ff-29bd000c0000 +TAG:generation_uid=adab4424-2f25-4dc7-92ff-29bd000c0001 +TAG:company_name=FATE-company +TAG:product_name=FATE-test +TAG:product_version=3.14159 +TAG:application_platform=Lavf +TAG:product_uid=adab4424-2f25-4dc7-92ff-29bd000c0002 +TAG:toolkit_version=0.0.0.0.0 +TAG:material_package_umid=0x060A2B340101010501010D001300000000000000000000000000000000000000 +TAG:comment_test=value +TAG:timecode=01:00:00:00 +[/FORMAT]