From patchwork Tue Mar 17 22:27:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 18274 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 3455744A2C4 for ; Wed, 18 Mar 2020 00:28:14 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 11FAD68B11E; Wed, 18 Mar 2020 00:28:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5DFA568AEB0 for ; Wed, 18 Mar 2020 00:28:07 +0200 (EET) Received: by mail-wm1-f52.google.com with SMTP id g62so1109904wme.1 for ; Tue, 17 Mar 2020 15:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r+d05x3/ZZ4tkkvrjcDwSbXzcIbXyHqhpNRVtoeHHvc=; b=Ov5bLGWIkDybZYUSL6c/d2C9lXCqj3uEuOWIZWTT3VKUyDuTHGf87plNOB8YRpivvG d5t/ZAYbx/IXp8nVWOmBRxt2UYB6lNeodZWswM4cv/edqe9U9DrcGAM01sOJd3v7/1Ao EFJx3aZ4keefdtfr+2T7ciJZir5ni2DldkJpjWrngOFmspwC1snLrF0N/wvdQ66+Rwsh YwYvTtAXCkzfVbrMe2Gsr1ZRaWwiuniS9t77Nz8c14Q+VfdphuckZ03tuK7oUVkHeLWy h7JKqBeP0Ks8MVXBeVWmX4RD6UfXwQegEDOZjIRh8+eThwQp89JcisdDrakwEO7bjZes vlZQ== 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:mime-version :content-transfer-encoding; bh=r+d05x3/ZZ4tkkvrjcDwSbXzcIbXyHqhpNRVtoeHHvc=; b=OfBSf15iC/c2MmOEfceyD+1f48440+f13gEEF3HHCXGJDwK749hn3E5wYdPEw5uW7n rFQeaVqv4bStfh82mizq+LRy9E2bdbWVAqB5t1myZ50PWaQcgZSbvXKf2XkTQZPL7OHT bjrikhEvtcMhhdqmUvxCDwoBd+p9PGuflMgh7ORxGuu+k2NmdTdl48G0lt3dO9ZeQ3uh ttsMEns2Br8pl34AOzGAEzR0D5J0lnC/g6Otp0uPyyMYG67JZZv99lnd+6vFeMPGHdBp KgrDSYMIjfmKA59keYZNY+Kco+IHijMEJ1ecO1gwYCX5BGtPI3hxvUC2DlvtEm42g+kz cGiw== X-Gm-Message-State: ANhLgQ205tvfJ7FpuXlh79das/I8zEKEiwCFuWPmxUN4VNKj+A4yw2IB RkRCXWx3XlFhDbDguAbStvu2zHT3 X-Google-Smtp-Source: ADFU+vvGXxWBmunxVOjPy66HTC6ssQ4QuJQ5+D8VWRGgoabzk7cmPLRbWeQxdbBProQojakkqSyxrA== X-Received: by 2002:a7b:c413:: with SMTP id k19mr1104549wmi.184.1584484086096; Tue, 17 Mar 2020 15:28:06 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1ab57.dynamic.kabel-deutschland.de. [188.193.171.87]) by smtp.gmail.com with ESMTPSA id b82sm1003135wmb.46.2020.03.17.15.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Mar 2020 15:28:05 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 17 Mar 2020 23:27:58 +0100 Message-Id: <20200317222758.24511-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/webmdashenc: Don't use custom option for bitexactness 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 WebM DASH Manifest muxer can write manifests for live streams and these contain an entry that depends on the time the manifest is written; an AVOption to make the output reproducible has been added for tests. But this is unnecessary, as there already is a method for reproducible output: The AVFMT_FLAG_BITEXACT-flag of the AVFormatContext. Therefore this commit removes the custom option. Given that the description of said option contained "private option - users should never set this" and that it was not documented in muxers.texi, no deprecation period for this option seemed necessary. The commands of the FATE-tests for this muxer have been changed to no longer use this option. Signed-off-by: Andreas Rheinhardt --- libavformat/webmdashenc.c | 4 +--- tests/fate/vpx.mak | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c index d2f0e0ec4d..0e7bfba34c 100644 --- a/libavformat/webmdashenc.c +++ b/libavformat/webmdashenc.c @@ -57,7 +57,6 @@ typedef struct WebMDashMuxContext { char *utc_timing_url; double time_shift_buffer_depth; int minimum_update_period; - int debug_mode; } WebMDashMuxContext; static const char *get_codec_name(int codec_id) @@ -114,7 +113,7 @@ static int write_header(AVFormatContext *s) if (!strftime(gmt_iso, 21, "%Y-%m-%dT%H:%M:%SZ", gmt)) { return AVERROR_UNKNOWN; } - if (w->debug_mode) { + if (s->flags & AVFMT_FLAG_BITEXACT) { av_strlcpy(gmt_iso, "", 1); } avio_printf(s->pb, " availabilityStartTime=\"%s\"\n", gmt_iso); @@ -553,7 +552,6 @@ static int webm_dash_manifest_write_packet(AVFormatContext *s, AVPacket *pkt) #define OFFSET(x) offsetof(WebMDashMuxContext, x) static const AVOption options[] = { { "adaptation_sets", "Adaptation sets. Syntax: id=0,streams=0,1,2 id=1,streams=3,4 and so on", OFFSET(adaptation_sets), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, - { "debug_mode", "[private option - users should never set this]. Create deterministic output", OFFSET(debug_mode), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, { "live", "create a live stream manifest", OFFSET(is_live), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM }, { "chunk_start_index", "start index of the chunk", OFFSET(chunk_start_index), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, { "chunk_duration_ms", "duration of each chunk (in milliseconds)", OFFSET(chunk_duration), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, diff --git a/tests/fate/vpx.mak b/tests/fate/vpx.mak index 3b3da18feb..c65959f133 100644 --- a/tests/fate/vpx.mak +++ b/tests/fate/vpx.mak @@ -71,10 +71,10 @@ FATE_VP8-$(CONFIG_WEBM_DASH_MANIFEST_DEMUXER) += fate-webm-dash-manifest-represe fate-webm-dash-manifest-representations: CMD = run $(FFMPEG) -nostdin -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video4.webm -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1" - FATE_VP8-$(CONFIG_WEBM_DASH_MANIFEST_DEMUXER) += fate-webm-dash-manifest-live -fate-webm-dash-manifest-live: CMD = run $(FFMPEG) -nostdin -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_video_360.hdr -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_audio_171.hdr -c copy -map 0 -map 1 -f webm_dash_manifest -live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 5000 -time_shift_buffer_depth 7200 -minimum_update_period 60 -debug_mode 1 - +fate-webm-dash-manifest-live: CMD = run $(FFMPEG) -nostdin -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_video_360.hdr -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_audio_171.hdr -c copy -map 0 -map 1 -fflags +bitexact -f webm_dash_manifest -live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 5000 -time_shift_buffer_depth 7200 -minimum_update_period 60 - FATE_VP8-$(CONFIG_WEBM_DASH_MANIFEST_DEMUXER) += fate-webm-dash-manifest-live-bandwidth -fate-webm-dash-manifest-live-bandwidth: CMD = run $(FFMPEG) -nostdin -f webm_dash_manifest -live 1 -bandwidth 100 -i $(TARGET_SAMPLES)/vp8/dash_live_video_360.hdr -f webm_dash_manifest -live 1 -bandwidth 200 -i $(TARGET_SAMPLES)/vp8/dash_live_audio_171.hdr -c copy -map 0 -map 1 -f webm_dash_manifest -live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 5000 -time_shift_buffer_depth 7200 -minimum_update_period 60 -debug_mode 1 - +fate-webm-dash-manifest-live-bandwidth: CMD = run $(FFMPEG) -nostdin -f webm_dash_manifest -live 1 -bandwidth 100 -i $(TARGET_SAMPLES)/vp8/dash_live_video_360.hdr -f webm_dash_manifest -live 1 -bandwidth 200 -i $(TARGET_SAMPLES)/vp8/dash_live_audio_171.hdr -c copy -map 0 -map 1 -fflags +bitexact -f webm_dash_manifest -live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 5000 -time_shift_buffer_depth 7200 -minimum_update_period 60 - FATE_VP8-$(call DEMDEC, MATROSKA, VP8) += fate-vp8-2451 fate-vp8-2451: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/vp8/RRSF49-short.webm -vsync cfr -an