From patchwork Thu Jun 16 19:55:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 36317 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:bb42:0:0:0:0:0 with SMTP id b2csp1520649ybk; Thu, 16 Jun 2022 13:08:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vHcLOdnLNnQKUBMdvCr29IersvNy5GKSk/0NGXFlZCCl4hlfsjQG5FCMXPM8zSyGL3tTc6 X-Received: by 2002:a17:906:64cb:b0:711:f686:a843 with SMTP id p11-20020a17090664cb00b00711f686a843mr6185898ejn.333.1655410130749; Thu, 16 Jun 2022 13:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655410130; cv=none; d=google.com; s=arc-20160816; b=N+ajQMmGNuxs8Wgw0qBlr3O7luOqgU5TbPKhEfJlWJrVY+ctiLa1fBGpOs7/Ub3hFw 8LOa6Ljq4T8pUMDdZz5zZq0PnhJK8gn3Dka8of1bD+IyMdXn4k2MBybEXno/SWpz53j0 Jfgha/ppnbt2cTvoT7Aba/WH7hVooqNyAPNKV5kACAlOFA9ULlHtHkfrg1rRLd35dsCV woXFHKUx8+CUp+igeoovbt1BjeVmBNHgnOZAHdMQkNOW+/JPTFSVqZ4E6DSmMgRJr136 FsdWRa0JRx8tB9v9qhiJhlacAd6AlLuYNjFwwNbst01gOrXpc+KW36XSBUvV8yqWY8xS KcTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=GbaGFc8DtJa8h2VfVCLW/BSGZ6eM8byyJ6rRj+/zF88=; b=lQZHY8fWhHoxVc47iSQW8AKQaU9b7yUEDDyk96mzNSeRRloKMviUCSuQNsLcNqBNot OVmEyJV+00rgq9jYfMVeLdxoODeI2o3JMffoCFUkMfLL0YPMkcSz4j4y+0hrXmJTY+lp ydwu0jteep0be4ssYHkghYWHBfhPYVlb0+V/CU6NrgV6zgkMYU4BHp1forCupHiEDhWn eHdu7rWa9S5W3vwu/KngBqckHr4/LBh/G9bizt6oMWjyXNfoKneLP+jF20oTQ3QYgcvv Uh/UUO/x/EF/IJ3L3DaCKytmBBzVuC6ZlqxhrdJjvCfxSahoOwrmnK6XwTyuRZsBB87J 8qbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a27-20020a50c31b000000b0042df4ea0c4asi3711434edb.560.2022.06.16.13.08.50; Thu, 16 Jun 2022 13:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7473768B8FB; Thu, 16 Jun 2022 23:04:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9A50668B88F for ; Thu, 16 Jun 2022 23:03:50 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 3E2692400F5 for ; Thu, 16 Jun 2022 22:03:50 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id HJ1iILgkcICT for ; Thu, 16 Jun 2022 22:03:48 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 5DF8824068D for ; Thu, 16 Jun 2022 22:03:34 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id C72193A20D6; Thu, 16 Jun 2022 22:03:30 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Jun 2022 21:55:17 +0200 Message-Id: <20220616195534.5278-18-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220616195534.5278-1-anton@khirnov.net> References: <20220616195534.5278-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 18/35] fate/ffmpeg: add a test for interleaving video+subs X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: A5bOBiZaav2b Content-Length: 2474 --- tests/fate/ffmpeg.mak | 8 ++++++++ tests/ref/fate/shortest-sub | 4 ++++ 2 files changed, 12 insertions(+) create mode 100644 tests/ref/fate/shortest-sub diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 94f50423be..154af2fac8 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -99,6 +99,14 @@ FATE_SAMPLES_FFMPEG-$(call FILTERDEMDEC, AMIX ARESAMPLE SINE, RAWVIDEO, \ fate-shortest: tests/data/vsynth_lena.yuv fate-shortest: CMD = framecrc -auto_conversion_filters -f lavfi -i "sine=3000:d=10" -f lavfi -i "sine=1000:d=1" -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -f rawvideo -s 352x288 -pix_fmt yuv420p -i $(TARGET_PATH)/tests/data/vsynth_lena.yuv -filter_complex "[0:a:0][1:a:0]amix=inputs=2[audio]" -map 2:v:0 -map "[audio]" -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -dct fastint -qscale 10 -threads 1 -c:v mpeg4 -c:a ac3_fixed -shortest +# test interleaving video with a sparse subtitle stream +FATE_SAMPLES_FFMPEG-$(call ALLYES, COLOR_FILTER, VOBSUB_DEMUXER, MATROSKA_DEMUXER,, \ + RAWVIDEO_ENCODER, MATROSKA_MUXER, FRAMECRC_MUXER) += fate-shortest-sub +fate-shortest-sub: CMD = enc_dec \ + vobsub $(TARGET_SAMPLES)/sub/vobsub.idx matroska \ + "-filter_complex 'color=s=1x1:rate=1:duration=400' -pix_fmt rgb24 -allow_raw_vfw 1 -c:s copy -c:v rawvideo" \ + framecrc "-map 0 -c copy -shortest" + # Basic test for fix_sub_duration, which calculates duration based on the # following subtitle's pts. FATE_SAMPLES_FFMPEG-$(call FILTERDEMDECENCMUX, MOVIE, MPEGVIDEO, \ diff --git a/tests/ref/fate/shortest-sub b/tests/ref/fate/shortest-sub new file mode 100644 index 0000000000..3b28898177 --- /dev/null +++ b/tests/ref/fate/shortest-sub @@ -0,0 +1,4 @@ +52bc3d6a0c80e639095a2c28da4ef42c *tests/data/fate/shortest-sub.matroska +139246 tests/data/fate/shortest-sub.matroska +d71f5d359ef788ea689415bc1e4a90df *tests/data/fate/shortest-sub.out.framecrc +stddev:11541.12 PSNR: 15.08 MAXDIFF:22854 bytes: 2591/ 26055