From patchwork Fri Nov 12 16:32:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 31389 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2052318iob; Fri, 12 Nov 2021 08:33:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJygrqGhXyiwaf0YFQic0Gfs3HfUw8dImpUGSEx3lgjGt90vHjMgvkL6tSC7KUruaXcCPq9s X-Received: by 2002:a17:907:160a:: with SMTP id hb10mr21032937ejc.83.1636734790682; Fri, 12 Nov 2021 08:33:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636734790; cv=none; d=google.com; s=arc-20160816; b=rHD7VhWrWs47mtrE0N9d9QTkGvKUGCeyRmPeHxrOjKCy8kauP4PbCqX5RryAO1cK+7 fgrihOxzASygafqNSuE4vkS6VWurmVdMZjS0jXokOGqpdY4+xKcyP2iTNpN0h8uaMKXe ota2sZUPPlbKwbI58Cm77+jlianeBwvq6HFEr8riQ5RgGTFVvlDa8bObgHTzoJ0gWLON 3aDmfMAdmbQjkSizBM+ZQv3QbwivSJ9sgcIggLYCHsKi2hcmFeurZUTRqjpCL/lscsnG UUxF2y/zNoqRO0J76k0OLE7lW1pyzNfCnXAzzO80iCCkKxTDt0sQPiNJ9AzevbtLeO08 otWA== 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:message-id:date:to:from :delivered-to; bh=N0FIcxqIxe6OdWsfpialP2SdHz+pHSgmvA5/J5QFKko=; b=mNmYCdJ4+AtDGRNSFyoBpnZz01BkRaHslkCg0tG+Artq8RHic8rH0UBJJmPL9lemrB CcHoE4ilWnoxZini/p63+cMWeURTrmuZ63G4+KRrD4hDqluDX4+PhYx1pPTCSaKYqyPt Mg8XqdJS9iAoBlZ1yULxo348RfZ8r9cqge3QguDB3CVJXNrdYjB898vj20yorCmqjzis fMzIWFXLCo7/mp3bsCKz56m5e88kJTG6Mqr3WLZk5BwcGSSUndRCv38YULUwZlCdH4eE xzAUO3eFLi4Q5sunurb79gamh68x3ZlLZuN61R29qunMsZkxgn32x0yZZhesOxYZufvU obww== 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 v8si148935ede.195.2021.11.12.08.33.10; Fri, 12 Nov 2021 08:33:10 -0800 (PST) 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 94CBF68A8FD; Fri, 12 Nov 2021 18:33:06 +0200 (EET) 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 E923068A1A7 for ; Fri, 12 Nov 2021 18:32:59 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 768C824050B for ; Fri, 12 Nov 2021 17:32:59 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id GCVrfYwFAhtz for ; Fri, 12 Nov 2021 17:32:58 +0100 (CET) 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 D9F68240175 for ; Fri, 12 Nov 2021 17:32:58 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id EF03B3A0631; Fri, 12 Nov 2021 17:32:58 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 12 Nov 2021 17:32:50 +0100 Message-Id: <20211112163255.20522-1-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/6] lavf: improve AV_DISPOSITION_* doxy 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: J7GMs21T/Xq9 Also switch the values definition to the (1 << N) style, which is easier to read. --- libavformat/avformat.h | 96 +++++++++++++++++++++++++++++++++--------- 1 file changed, 77 insertions(+), 19 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index a2af7e9f89..7d8ad08f07 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -803,22 +803,56 @@ typedef struct AVIndexEntry { int min_distance; /**< Minimum distance between this and the previous keyframe, used to avoid unneeded searching. */ } AVIndexEntry; -#define AV_DISPOSITION_DEFAULT 0x0001 -#define AV_DISPOSITION_DUB 0x0002 -#define AV_DISPOSITION_ORIGINAL 0x0004 -#define AV_DISPOSITION_COMMENT 0x0008 -#define AV_DISPOSITION_LYRICS 0x0010 -#define AV_DISPOSITION_KARAOKE 0x0020 +/** + * The stream should be chosen by default among other streams of the same time, + * unless the user has explicitly specified otherwise. + */ +#define AV_DISPOSITION_DEFAULT (1 << 0) +/** + * The stream is not in original language. + * + * @note AV_DISPOSITION_ORIGINAL is the inverse of this disposition. At most of + * them should be set in properly tagged streams. + * @note This disposition may apply to any stream type, not just audio. + */ +#define AV_DISPOSITION_DUB (1 << 1) +/** + * The stream is in original language. + * + * @see the notes for AV_DISPOSITION_DUB + */ +#define AV_DISPOSITION_ORIGINAL (1 << 2) +/** + * The stream is a commentary track. + */ +#define AV_DISPOSITION_COMMENT (1 << 3) +/** + * The stream contains song lyrics. + */ +#define AV_DISPOSITION_LYRICS (1 << 4) +/** + * The stream contains karaoke audio. + */ +#define AV_DISPOSITION_KARAOKE (1 << 5) /** * Track should be used during playback by default. * Useful for subtitle track that should be displayed * even when user did not explicitly ask for subtitles. */ -#define AV_DISPOSITION_FORCED 0x0040 -#define AV_DISPOSITION_HEARING_IMPAIRED 0x0080 /**< stream for hearing impaired audiences */ -#define AV_DISPOSITION_VISUAL_IMPAIRED 0x0100 /**< stream for visual impaired audiences */ -#define AV_DISPOSITION_CLEAN_EFFECTS 0x0200 /**< stream without voice */ +#define AV_DISPOSITION_FORCED (1 << 6) +/** + * The stream is intended for hearing impaired audiences. + */ +#define AV_DISPOSITION_HEARING_IMPAIRED (1 << 7) +/** + * The stream is intended for visually impaired audiences. + */ +#define AV_DISPOSITION_VISUAL_IMPAIRED (1 << 8) +/** + * The audio stream contains music and sound effects without voice. + */ +#define AV_DISPOSITION_CLEAN_EFFECTS (1 << 9) /** * The stream is stored in the file as an attached picture/"cover art" (e.g. * APIC frame in ID3v2). The first (usually only) packet associated with it @@ -826,21 +860,39 @@ typedef struct AVIndexEntry { * seeking takes place. It can also be accessed at any time in * AVStream.attached_pic. */ -#define AV_DISPOSITION_ATTACHED_PIC 0x0400 +#define AV_DISPOSITION_ATTACHED_PIC (1 << 10) /** * The stream is sparse, and contains thumbnail images, often corresponding * to chapter markers. Only ever used with AV_DISPOSITION_ATTACHED_PIC. */ -#define AV_DISPOSITION_TIMED_THUMBNAILS 0x0800 +#define AV_DISPOSITION_TIMED_THUMBNAILS (1 << 11) /** - * To specify text track kind (different from subtitles default). + * The subtitle stream contains captions, providing a transcription and possibly + * a translation of audio. Typically intended for hearing-impaired audiences. + */ +#define AV_DISPOSITION_CAPTIONS (1 << 16) +/** + * The subtitle stream contains a textual description of the video content. + * Typically intended for visually-impaired audiences or for the cases where the + * video cannot be seen. + */ +#define AV_DISPOSITION_DESCRIPTIONS (1 << 17) +/** + * The subtitle stream contains time-aligned metadata that is not intended to be + * directly presented to the user. */ -#define AV_DISPOSITION_CAPTIONS 0x10000 -#define AV_DISPOSITION_DESCRIPTIONS 0x20000 -#define AV_DISPOSITION_METADATA 0x40000 -#define AV_DISPOSITION_DEPENDENT 0x80000 ///< dependent audio stream (mix_type=0 in mpegts) -#define AV_DISPOSITION_STILL_IMAGE 0x100000 ///< still images in video stream (still_picture_flag=1 in mpegts) +#define AV_DISPOSITION_METADATA (1 << 18) +/** + * The audio stream is intended to be mixed with another stream before + * presentation. + * Corresponds to mix_type=0 in mpegts. + */ +#define AV_DISPOSITION_DEPENDENT (1 << 19) +/** + * The video stream contains still images. + */ +#define AV_DISPOSITION_STILL_IMAGE (1 << 20) /** * Options for behavior on timestamp wrap detection. @@ -903,7 +955,13 @@ typedef struct AVStream { int64_t nb_frames; ///< number of frames in this stream if known or 0 - int disposition; /**< AV_DISPOSITION_* bit field */ + /** + * Stream disposition - a combination of AV_DISPOSITION_* flags. + * - demuxing: set by libavformat when creating the stream or in + * avformat_find_stream_info(). + * - muxing: may be set by the caller before avformat_write_header(). + */ + int disposition; enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed. From patchwork Fri Nov 12 16:32:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 31393 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2052825iob; Fri, 12 Nov 2021 08:33:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFDFQXBmoHFE/5ZNPeHT1zwtzJW/SOETc/5mjJJXzw3hpWj58x1tOgpHA69gm4fwbM5lmU X-Received: by 2002:a17:906:5641:: with SMTP id v1mr20407461ejr.357.1636734813384; Fri, 12 Nov 2021 08:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636734813; cv=none; d=google.com; s=arc-20160816; b=ngRzeapYyHB7H5/HD8rgpkaA4KrRNUq7xl8OXn7bzyhinRqVyW6mY8PZVg9NIKael0 sCRX9+6aOxP5UM15VdIwnTwMlLIxXlQr12cAwBpvI59cXfJYhF1PqBIAT0rzc2VyrU5Q ovBHpAXMJNElYuiiwoCQXR1RsPBMaVJYLdGO8BpV9TY4bhhODZOuteg+R1VILE2pZ16n PcjtkZ0Im+09XYv5HU+YWSlQ8yagjCb6rNaHfCO1BB5r1V/9oJNSIkaZZnP2yWGNAgc4 cK0MlWLGhM6g5EpjrY1M+TtS0da77XuAVchqrY6UHmxwT5+OHMMOKU9EHx7LVHpinExq AQng== 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=jCHhDsvR2UGJ5SZ6mEyTYpWBh7pxZPUzyQZNVYhSaX4=; b=npoPsa6ImuBCfSFcMs6/PCHzBk3X/oUyd9bHFUuSfAPfZ7wy0jyp40zCo8l5Qeunb2 9K1xlRBFJGSeiIGnWhdNFmWFJp21bo49fm3U469Qv0rp5cIdVTmBK5o1Z+N+oA/+IYfJ WZ9MhyLMpo9Ar5g+QVatms30c8rsGEfLk9UVf3g7rntG9duQShRS4KrN2o41g2PqMldp pw2LDj8QH/Y1BwJkR2rlI3QgyKALMdA98sC1VWuBK9C7XHfzcjtXyegAldUMEGRNfyCX DsA1vS2X61A5SaURe19/ZHbDpSg52AZG2Df5G0NZzCilJA/xHDDgVxullUMTk8QG4Lqy hiiQ== 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 ji3si16770099ejc.690.2021.11.12.08.33.32; Fri, 12 Nov 2021 08:33:33 -0800 (PST) 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 A864468AE41; Fri, 12 Nov 2021 18:33:08 +0200 (EET) 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 DCAF068A1A7 for ; Fri, 12 Nov 2021 18:33:00 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 6E496240179 for ; Fri, 12 Nov 2021 17:33:00 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id C_Hx4Wgt411I for ; Fri, 12 Nov 2021 17:32:58 +0100 (CET) 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 E9B56240176 for ; Fri, 12 Nov 2021 17:32:58 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id F14823A03FD; Fri, 12 Nov 2021 17:32:58 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 12 Nov 2021 17:32:51 +0100 Message-Id: <20211112163255.20522-2-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211112163255.20522-1-anton@khirnov.net> References: <20211112163255.20522-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/6] lavf: add an AVClass to AVStream on next major bump 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: GVOuJZJsdYOA Also add a function to retrieve that class, analogously to avformat_get_class(). This will be useful for adding an AVOption for dispositions. --- doc/APIchanges | 4 ++++ libavformat/avformat.h | 15 +++++++++++++++ libavformat/utils.c | 15 +++++++++++++++ libavformat/version.h | 3 ++- 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 10bad1d21e..a86f4b936e 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,10 @@ libavutil: 2021-04-27 API changes, most recent first: +2021-11-xx - xxxxxxxxxx - lavf 59.9.100 - avformat.h + Add av_stream_get_class(). Schedule adding AVStream.av_class at libavformat + major version 60. + 2021-11-12 - xxxxxxxxxx - lavu 57.8.100 - hwcontext_vulkan.h Added AVFrame.sem_value, AVVulkanDeviceContext.queue_family_encode_index, nb_encode_queues, queue_family_decode_index, and nb_decode_queues. diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 7d8ad08f07..4dabc90f24 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -909,6 +909,13 @@ typedef struct AVIndexEntry { * sizeof(AVStream) must not be used outside libav*. */ typedef struct AVStream { +#if FF_API_AVSTREAM_CLASS + /** + * A class for @ref avoptions. Set on stream creation. + */ + const AVClass *av_class; +#endif + int index; /**< stream index in AVFormatContext */ /** * Format-specific stream ID. @@ -1864,6 +1871,14 @@ void avformat_free_context(AVFormatContext *s); */ const AVClass *avformat_get_class(void); +/** + * Get the AVClass for AVStream. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *av_stream_get_class(void); + /** * Add a new stream to a media file. * diff --git a/libavformat/utils.c b/libavformat/utils.c index 509c0ecdce..d889134a1a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -721,6 +721,17 @@ void avformat_free_context(AVFormatContext *s) av_free(s); } +static const AVClass stream_class = { + .class_name = "AVStream", + .item_name = av_default_item_name, + .version = LIBAVUTIL_VERSION_INT, +}; + +const AVClass *av_stream_get_class(void) +{ + return &stream_class; +} + AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c) { FFFormatContext *const si = ffformatcontext(s); @@ -745,6 +756,10 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c) return NULL; st = &sti->pub; +#if FF_API_AVSTREAM_CLASS + st->av_class = &stream_class; +#endif + st->codecpar = avcodec_parameters_alloc(); if (!st->codecpar) goto fail; diff --git a/libavformat/version.h b/libavformat/version.h index 2e860b8d76..1d10481734 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 59 -#define LIBAVFORMAT_VERSION_MINOR 8 +#define LIBAVFORMAT_VERSION_MINOR 9 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ @@ -58,6 +58,7 @@ #define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60) +#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59) #define FF_API_R_FRAME_RATE 1 From patchwork Fri Nov 12 16:32:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 31391 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2052615iob; Fri, 12 Nov 2021 08:33:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1gulfZi5Hn9ugjIRzQ+5wG2Qex/nJ1VHXJ+V4H8iGXJJyLQD80P14MiL718Yg9Wwwz+vF X-Received: by 2002:a17:906:c302:: with SMTP id s2mr21237409ejz.499.1636734803228; Fri, 12 Nov 2021 08:33:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636734803; cv=none; d=google.com; s=arc-20160816; b=xanJ65pimjxlDyMOv9rAF930hqfZ9W6q8zxt6g0JXVCcXbfgnlVd1XXE2VbpPI4KTN /Lyq4Dyq4ZLfyPe7Jb0xgJwQKkOkOVHME63Y50CJ9Be6ANdCpw2GsUOVaszK0+0ThJ/F NaT+4SZPlnz0hKbNEV9LyDVhZ8f0f0G+6x4NRn84GQWqUf2u2yogJmcsaBihJx78jseq bAp/XelJz3JhZT7sK9gwB48nscQE/9u7LRm3pMrjbb0fvqco5b+womy6e4NDULbeD/IJ C4UK9jzyJX0jgayQoVAU0oTAoT66croO10ghUECpJKdJBWBOiAVcHheUcLt4U976tsGf rlQg== 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=/OqGYPyNJ45iPn/aNjzrTt+PA5cwnBRRIDp/ar5iPzQ=; b=wa382v7n2fdvNKOI/r72R831DYryFVaP5s2cDwDl0TUhpuSaArWEjL5NYR/od0WdfJ 25TDOxpgXBF8rEjp74PQBwu8+wltZEazrpSXBimacKhWq26iwYBhku6/QhVdy/0vI3Oc IPoBkfFQBhewln0hKOBuB2/MnqpQmm+z3+INSSR2QaiUV4wc+etkRRoY+Kva3+PMLCW3 CYscGw+AsA3aX+i+qlNinBlsg1zAxP5x+S9JZbAOG/wEENbUDiacUOkyTJY+N9P7vi7t TnVtc6o7e2S/amFb1rDEqdLrDakMv0dfThg5L1ImFqnJBYUC3DbXE0NH2lTx4cw7n3Ok rhaA== 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 yc17si4923787ejb.18.2021.11.12.08.33.21; Fri, 12 Nov 2021 08:33:23 -0800 (PST) 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 B133968AE3E; Fri, 12 Nov 2021 18:33:07 +0200 (EET) 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 693D368A1A7 for ; Fri, 12 Nov 2021 18:33:00 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id E937E240175 for ; Fri, 12 Nov 2021 17:32:59 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id dhvFjc51XzcR for ; Fri, 12 Nov 2021 17:32:59 +0100 (CET) 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 0823F240179 for ; Fri, 12 Nov 2021 17:32:59 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 026893A073E; Fri, 12 Nov 2021 17:32:58 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 12 Nov 2021 17:32:52 +0100 Message-Id: <20211112163255.20522-3-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211112163255.20522-1-anton@khirnov.net> References: <20211112163255.20522-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/6] lavf: add public functions converting dispositions to/from strings 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: 5k/SxtrFY/JM --- doc/APIchanges | 1 + libavformat/avformat.h | 14 +++++++++++++ libavformat/utils.c | 47 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index a86f4b936e..53f229d41a 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -17,6 +17,7 @@ API changes, most recent first: 2021-11-xx - xxxxxxxxxx - lavf 59.9.100 - avformat.h Add av_stream_get_class(). Schedule adding AVStream.av_class at libavformat major version 60. + Add av_disposition_to_string() and av_disposition_from_string(). 2021-11-12 - xxxxxxxxxx - lavu 57.8.100 - hwcontext_vulkan.h Added AVFrame.sem_value, AVVulkanDeviceContext.queue_family_encode_index, diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 4dabc90f24..ac3e1b6e60 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -894,6 +894,20 @@ typedef struct AVIndexEntry { */ #define AV_DISPOSITION_STILL_IMAGE (1 << 20) +/** + * @return The AV_DISPOSITION_* flag corresponding to disp or a negative error + * code if disp does not correspond to a known stream disposition. + */ +int av_disposition_from_string(const char *disp); + +/** + * @param disposition a combination of AV_DISPOSITION_* values + * @return The string description corresponding to the lowest set bit in + * disposition. NULL when the lowest set bit does not correspond + * to a known disposition or when disposition is 0. + */ +const char *av_disposition_to_string(int disposition); + /** * Options for behavior on timestamp wrap detection. */ diff --git a/libavformat/utils.c b/libavformat/utils.c index d889134a1a..9c38c60e81 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -28,6 +28,7 @@ #include "libavutil/bprint.h" #include "libavutil/dict.h" #include "libavutil/internal.h" +#include "libavutil/intmath.h" #include "libavutil/opt.h" #include "libavutil/parseutils.h" #include "libavutil/pixfmt.h" @@ -1965,3 +1966,49 @@ void ff_format_set_url(AVFormatContext *s, char *url) av_freep(&s->url); s->url = url; } + +static const struct { + const char *str; + int disposition; +} dispositions[] = { + { "default", AV_DISPOSITION_DEFAULT }, + { "dub", AV_DISPOSITION_DUB }, + { "original", AV_DISPOSITION_ORIGINAL }, + { "comment", AV_DISPOSITION_COMMENT }, + { "lyrics", AV_DISPOSITION_LYRICS }, + { "karaoke", AV_DISPOSITION_KARAOKE }, + { "forced", AV_DISPOSITION_FORCED }, + { "hearing_impaired", AV_DISPOSITION_HEARING_IMPAIRED }, + { "visual_impaired", AV_DISPOSITION_VISUAL_IMPAIRED }, + { "clean_effects", AV_DISPOSITION_CLEAN_EFFECTS }, + { "attached_pic", AV_DISPOSITION_ATTACHED_PIC }, + { "timed_thumbnails", AV_DISPOSITION_TIMED_THUMBNAILS }, + { "captions", AV_DISPOSITION_CAPTIONS }, + { "descriptions", AV_DISPOSITION_DESCRIPTIONS }, + { "metadata", AV_DISPOSITION_METADATA }, + { "dependent", AV_DISPOSITION_DEPENDENT }, + { "still_image", AV_DISPOSITION_STILL_IMAGE }, +}; + +int av_disposition_from_string(const char *disp) +{ + for (int i = 0; i < FF_ARRAY_ELEMS(dispositions); i++) + if (!strcmp(disp, dispositions[i].str)) + return dispositions[i].disposition; + return AVERROR(EINVAL); +} + +const char *av_disposition_to_string(int disposition) +{ + int val; + + if (disposition <= 0) + return NULL; + + val = 1 << ff_ctz(disposition); + for (int i = 0; i < FF_ARRAY_ELEMS(dispositions); i++) + if (dispositions[i].disposition == val) + return dispositions[i].str; + + return NULL; +} From patchwork Fri Nov 12 16:32:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 31394 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2053054iob; Fri, 12 Nov 2021 08:33:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJww7bYYXtKN5/70IOAtzYVMxjpVeB49MJW1rMWzu7vxAG53RsSU/1GYf37D7LXnb7/caL7+ X-Received: by 2002:a05:6402:40ce:: with SMTP id z14mr22519568edb.294.1636734825984; Fri, 12 Nov 2021 08:33:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636734825; cv=none; d=google.com; s=arc-20160816; b=dOQKqVElXCGCUX6GAAnuVIjgjw1bk0rskL5YTnPf9V9WJG1GVBUbFQgqmLdJftnmcv rLhn8L2+9W7P7DoAl7nrxswRNdDVcIap7qlcRIzB1peTio/oiKxlL0KsozBES/+zMUuV etqYz/UBsP4PXo1ZJMRiGFXT0F9mv5c0P8LPc7SItzN5zhcEmxcBqW5xukTOf0PjWaSV pzM4UGNDi3k71XE+ZcL1vwv2pb+oddx6XnNaXlPOy2CKo1TWqTCquTsKpjcbR2bWYzHl zKGYhkA3mBQ4ymMk/AMnIvpOiZ0ctKXUwToWErlXLdo5BksFe7Fun/fciK3x0e+33NPj 4mYA== 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=JU/4kiviTdBpZuJSbbcREH9I8bU6BZgAGNCoTfaKWL8=; b=if8eR8qksVowXnF3peUbDa1FJHOQpd4OKkNZ8dsSnpfThHgyJs7B5Onjo8TuuMo2fe 3KCeeC135Fh5zHuL3IauMLF0k5WYhXEK6FE0oh+VqP/hOZFwH2KWhbA/8wsPSCjvbUIl vPjPzXm6H4fRq0GlW78/mZiVghhvkOCfhMrtUUfnb4AhPyzK5Z3NGtXp70tTfNCrWyTJ rxLUl4pB3qwXy4ornx0tXZQo59rYSId+wzz/j+xpAZ1ditYt/d0+BENiozbBB2CNttLZ xJcuQjaCJPSHKPW4AqonI4MtFcRzLjfMMzHETv5nRC49t7nnZGJOvEQ+MqBUylj97KrP EBoQ== 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 nc35si16488977ejc.662.2021.11.12.08.33.45; Fri, 12 Nov 2021 08:33:45 -0800 (PST) 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 90CF868A778; Fri, 12 Nov 2021 18:33:09 +0200 (EET) 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 16EE068A1A7 for ; Fri, 12 Nov 2021 18:33:01 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 9115A240176 for ; Fri, 12 Nov 2021 17:33:00 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 27MBuGVFC4hT for ; Fri, 12 Nov 2021 17:32:59 +0100 (CET) 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 0A98F24017A for ; Fri, 12 Nov 2021 17:32:59 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 0734B3A0743; Fri, 12 Nov 2021 17:32:59 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 12 Nov 2021 17:32:53 +0100 Message-Id: <20211112163255.20522-4-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211112163255.20522-1-anton@khirnov.net> References: <20211112163255.20522-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/6] lavf: add "disposition" AVOption to AVStream AVClass 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: vkI7pDhdIn0A Use it to remove custom disposition parsing code from ffmpeg.c --- doc/APIchanges | 1 + fftools/ffmpeg.c | 40 ++++++++++++---------------------------- libavformat/utils.c | 24 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 28 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 53f229d41a..ad57ae29d6 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -18,6 +18,7 @@ API changes, most recent first: Add av_stream_get_class(). Schedule adding AVStream.av_class at libavformat major version 60. Add av_disposition_to_string() and av_disposition_from_string(). + Add "disposition" AVOption to AVStream's class. 2021-11-12 - xxxxxxxxxx - lavu 57.8.100 - hwcontext_vulkan.h Added AVFrame.sem_value, AVVulkanDeviceContext.queue_family_encode_index, diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 9d4f9d7a2b..b5fc1e845f 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3667,34 +3667,18 @@ static int init_output_stream(OutputStream *ost, AVFrame *frame, // parse user provided disposition, and update stream values if (ost->disposition) { - static const AVOption opts[] = { - { "disposition" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" }, - { "default" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEFAULT }, .unit = "flags" }, - { "dub" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DUB }, .unit = "flags" }, - { "original" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ORIGINAL }, .unit = "flags" }, - { "comment" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_COMMENT }, .unit = "flags" }, - { "lyrics" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_LYRICS }, .unit = "flags" }, - { "karaoke" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_KARAOKE }, .unit = "flags" }, - { "forced" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_FORCED }, .unit = "flags" }, - { "hearing_impaired" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_HEARING_IMPAIRED }, .unit = "flags" }, - { "visual_impaired" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_VISUAL_IMPAIRED }, .unit = "flags" }, - { "clean_effects" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CLEAN_EFFECTS }, .unit = "flags" }, - { "attached_pic" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ATTACHED_PIC }, .unit = "flags" }, - { "captions" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CAPTIONS }, .unit = "flags" }, - { "descriptions" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, .unit = "flags" }, - { "dependent" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEPENDENT }, .unit = "flags" }, - { "metadata" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "flags" }, - { NULL }, - }; - static const AVClass class = { - .class_name = "", - .item_name = av_default_item_name, - .option = opts, - .version = LIBAVUTIL_VERSION_INT, - }; - const AVClass *pclass = &class; - - ret = av_opt_eval_flags(&pclass, &opts[0], ost->disposition, &ost->st->disposition); +#if LIBAVFORMAT_VERSION_MAJOR >= 60 + ret = av_opt_set(ost->st, "disposition", ost->disposition, 0); +#else + { + const AVClass *class = av_stream_get_class(); + const AVOption *o = av_opt_find(&class, "disposition", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ); + + av_assert0(o); + ret = av_opt_eval_flags(&class, o, ost->disposition, &ost->st->disposition); + } +#endif + if (ret < 0) return ret; } diff --git a/libavformat/utils.c b/libavformat/utils.c index 9c38c60e81..af6805c27f 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -722,10 +722,34 @@ void avformat_free_context(AVFormatContext *s) av_free(s); } +static const AVOption stream_options[] = { + { "disposition", NULL, offsetof(AVStream, disposition), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, + .flags = AV_OPT_FLAG_ENCODING_PARAM, .unit = "disposition" }, + { "default", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEFAULT }, .unit = "disposition" }, + { "dub", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DUB }, .unit = "disposition" }, + { "original", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ORIGINAL }, .unit = "disposition" }, + { "comment", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_COMMENT }, .unit = "disposition" }, + { "lyrics", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_LYRICS }, .unit = "disposition" }, + { "karaoke", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_KARAOKE }, .unit = "disposition" }, + { "forced", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_FORCED }, .unit = "disposition" }, + { "hearing_impaired", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_HEARING_IMPAIRED }, .unit = "disposition" }, + { "visual_impaired", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_VISUAL_IMPAIRED }, .unit = "disposition" }, + { "clean_effects", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CLEAN_EFFECTS }, .unit = "disposition" }, + { "attached_pic", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ATTACHED_PIC }, .unit = "disposition" }, + { "timed_thumbnails", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_TIMED_THUMBNAILS }, .unit = "disposition" }, + { "captions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CAPTIONS }, .unit = "disposition" }, + { "descriptions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, .unit = "disposition" }, + { "metadata", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "disposition" }, + { "dependent", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEPENDENT }, .unit = "disposition" }, + { "still_image", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_STILL_IMAGE }, .unit = "disposition" }, + { NULL } +}; + static const AVClass stream_class = { .class_name = "AVStream", .item_name = av_default_item_name, .version = LIBAVUTIL_VERSION_INT, + .option = stream_options, }; const AVClass *av_stream_get_class(void) From patchwork Fri Nov 12 16:32:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 31390 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2053217iob; Fri, 12 Nov 2021 08:33:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxC2i99bgvosT4RWvlwYBo9QmdQblJaqEVv7U7pvoZ53u4QoX6V2dqH/RL3qK74PQneBcP3 X-Received: by 2002:a17:907:774d:: with SMTP id kx13mr21350212ejc.239.1636734836336; Fri, 12 Nov 2021 08:33:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636734836; cv=none; d=google.com; s=arc-20160816; b=HDcCFfgtHUQhqauV1pd7Xo0I6I5Yrq+CXrljVxdf91XFxUi9ARyKI9QfFcWwsih7Ox Pi4VPR2DtLqDl1j4BEYOTEOfMbTHK1jYZZA6NyJ/4drTAWPxC8hWh1gXG3MkJZB/3MVV FgYjR2I4emvIYt5PsGWnq6BxvERLkK8aeZXvwDKiwN8P74fwkrV9km5WH6ajp/0UYEGw fJJMywf4cyAVLdRWMHPGBd/iiY5jVivy9K7kcJTj0oxWaW//0mII2tCjsW12h0HsF+qY SYmMbI16ajdmypKJ0SZke4wH1h/I0CuNMWlQQGh7uF82DN/YbkeAwbTfF9ggRBjvJ/MK hIyw== 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=jV+bpSO/2dIe49H8h0USXJQPiTruLlUhp1FUlpu+qH4=; b=gOPGE9kJ4AedLu0l/SRLcFgVX4Bf4AjwHDODQ8azR6g9Ww2r/ygEmIasbKTpjb9AlW 96FDM7h8s4QALRPCb0jyResXsiZWqtTIyYbWXF7qTIa1fB3+xStADM7TcyiunEmCFgqL SBkh/EnSPgGCU3dSJbELULLQhXMFk8LJhyqsp1m+itewJd08JnJ7urqx9D/JzDgPCxqZ kXV3bJxAwQ1GNiqC75UBsETh6YCMJdppCKbfN5Q2VdyGOaoXIE9eVVU4fMDG7xMoGEpf 7oaPSsqVe13I7yK4TkoKcZABFCLb6l4MU0hKyBXBQWlrhYwnmijPsKlsO/DrvXEnas8p JtVA== 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 c20si11997814ejs.94.2021.11.12.08.33.55; Fri, 12 Nov 2021 08:33:56 -0800 (PST) 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 919D168AE4B; Fri, 12 Nov 2021 18:33:10 +0200 (EET) 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 90B8668A36E for ; Fri, 12 Nov 2021 18:33:01 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1BD7124017A for ; Fri, 12 Nov 2021 17:33:01 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 5Sbs_QXOshcZ for ; Fri, 12 Nov 2021 17:33:00 +0100 (CET) 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 0D63024017C for ; Fri, 12 Nov 2021 17:32:59 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 0BFE73A0746; Fri, 12 Nov 2021 17:32:59 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 12 Nov 2021 17:32:54 +0100 Message-Id: <20211112163255.20522-5-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211112163255.20522-1-anton@khirnov.net> References: <20211112163255.20522-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/6] cmdutils: add an option for listing stream dispositions 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: al32Om2iiuNc --- doc/fftools-common-opts.texi | 3 +++ fftools/cmdutils.c | 10 ++++++++++ fftools/cmdutils.h | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi index 7643dd8396..d9145704d6 100644 --- a/doc/fftools-common-opts.texi +++ b/doc/fftools-common-opts.texi @@ -167,6 +167,9 @@ Show available sample formats. @item -layouts Show channel names and standard channel layouts. +@item -dispositions +Show stream dispositions. + @item -colors Show recognized color names. diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 2c8e98982f..f650dc7aa7 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -1815,6 +1815,16 @@ int show_sample_fmts(void *optctx, const char *opt, const char *arg) return 0; } +int show_dispositions(void *optctx, const char *opt, const char *arg) +{ + for (int i = 0; i < 32; i++) { + const char *str = av_disposition_to_string(1 << i); + if (str) + printf("%s\n", str); + } + return 0; +} + static void show_help_codec(const char *name, int encoder) { const AVCodecDescriptor *desc; diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h index 30f0b79725..64dd7266bc 100644 --- a/fftools/cmdutils.h +++ b/fftools/cmdutils.h @@ -238,6 +238,7 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags, { "pix_fmts", OPT_EXIT, { .func_arg = show_pix_fmts }, "show available pixel formats" }, \ { "layouts", OPT_EXIT, { .func_arg = show_layouts }, "show standard channel layouts" }, \ { "sample_fmts", OPT_EXIT, { .func_arg = show_sample_fmts }, "show available audio sample formats" }, \ + { "dispositions", OPT_EXIT, { .func_arg = show_dispositions}, "show available stream dispositions" }, \ { "colors", OPT_EXIT, { .func_arg = show_colors }, "show available color names" }, \ { "loglevel", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \ { "v", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \ @@ -577,6 +578,11 @@ int show_layouts(void *optctx, const char *opt, const char *arg); */ int show_sample_fmts(void *optctx, const char *opt, const char *arg); +/** + * Print a listing containing all supported stream dispositions. + */ +int show_dispositions(void *optctx, const char *opt, const char *arg); + /** * Print a listing containing all the color names and values recognized * by the program. From patchwork Fri Nov 12 16:32:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 31392 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2053444iob; Fri, 12 Nov 2021 08:34:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6Ez59h7+GzBDe/3iJRgkU0JO4Zd/rYvMJQVeCplDMW0ffCTjP2YhKM6jqR60rlyGkSxa8 X-Received: by 2002:a05:6402:12d3:: with SMTP id k19mr207162edx.244.1636734848644; Fri, 12 Nov 2021 08:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636734848; cv=none; d=google.com; s=arc-20160816; b=liF/F0RrRq5DuqmQSGAIX1ryUI0I5qe9hd1DmAcnkoTnzkxSMLH3DiFQ0DnOsPKxI8 IN9uQtTaie7klNpWfeq0ixA8U7APaVO1yv/uBJ36P6qELZNJya2wS30mrkUFOBWM+y5f YeTIKSsuxH5Pob6nAVWU6kAUXkKPhF9P4QkwQawq/mk4wLUHS2kiv1+1eUsXncAb0ln8 5C1FEJu+lS/4JLoC7TX1KwvlvxulFWwUbFiXZ+9/h3OcyBz5RxE59QUyJKtb8QAfLd36 NiknZlYMITOiBE8NmdJVxFtvwUBvtREoUDUA+KaG1ywnn7iEC2E3Tk8Z6qV6p/ZyPrP2 hoGw== 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=u4AtF6QagfobI3UJS08BXTr6856madYE+4ZbXq5zt/w=; b=pAe8ZQw6WmoV8QDuLh5Lt9n82ovQ2Wl4mADDEWPnUDKneTLrsVvSbIvLhtvIFuFY5u ca/A2AqrH/Dj7P6KZ81vpYzEPFPilqnM54SiBiW+dLxaOLK7MWCQ6xYUVg4KXAd3j4PB ZKF1TImsm0gg/hSTK/Poyfj8IT6uAO1RkJuXK1CX0/gy0Jb6FBOHcWGVXloqNYw1UXq1 68qtDmffN703kSgNbLD368+2zgty9636Xjt5ody2Vf5b7vW4dJPbI+CBb8uW9miWDoDn R1AgO5SyXI4Z1uucdokKMPpgGoqIxDSDtfbm+/ijNkyUWq+MGxxnt9XTlQD4mew1NLHS tc7w== 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 x7si14881894edd.540.2021.11.12.08.34.08; Fri, 12 Nov 2021 08:34:08 -0800 (PST) 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 BB37E68AE36; Fri, 12 Nov 2021 18:33:11 +0200 (EET) 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 3703468AE4B for ; Fri, 12 Nov 2021 18:33:05 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 7EC1224017C for ; Fri, 12 Nov 2021 17:33:02 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 6ZWeFywJKRzk for ; Fri, 12 Nov 2021 17:33:00 +0100 (CET) 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 0FDE1240507 for ; Fri, 12 Nov 2021 17:32:59 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 119DE3A0769; Fri, 12 Nov 2021 17:32:59 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 12 Nov 2021 17:32:55 +0100 Message-Id: <20211112163255.20522-6-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211112163255.20522-1-anton@khirnov.net> References: <20211112163255.20522-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/6] ffmpeg: rewrite setting the stream disposition 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: x5MY+pg+Vyo2 Currently, the code doing this is spread over several places and may behave in unexpected ways. E.g. automatic 'default' marking is only done for streams fed by complex filtergraphs. It is also applied in the order in which the output streams are initialized, which is effectively random. Move processing the dispositions at the end of open_output_file(), when we already have all the necessary information. Apply the automatic default marking only if no explicit -disposition options were supplied by the user, and apply it to the first stream of each type (excluding attached pics) when there is more than one stream of that type and no default markings were copied from the input streams. Explicitly document the new behavior. Changes the results of some tests, where the output file gets a default disposition, while it previously did not. --- doc/ffmpeg.texi | 37 +++++----- fftools/ffmpeg.c | 35 +-------- fftools/ffmpeg_opt.c | 72 +++++++++++++++++++ tests/ref/fate/ffprobe_compact | 60 ++++++++-------- tests/ref/fate/ffprobe_csv | 60 ++++++++-------- tests/ref/fate/ffprobe_default | 62 ++++++++-------- tests/ref/fate/ffprobe_flat | 62 ++++++++-------- tests/ref/fate/ffprobe_ini | 62 ++++++++-------- tests/ref/fate/ffprobe_json | 62 ++++++++-------- tests/ref/fate/ffprobe_xml | 60 ++++++++-------- tests/ref/fate/ffprobe_xsd | 60 ++++++++-------- .../fate/matroska-mastering-display-metadata | 4 +- 12 files changed, 335 insertions(+), 301 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 62d9703b7a..8418573618 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -560,27 +560,22 @@ ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT @item -disposition[:stream_specifier] @var{value} (@emph{output,per-stream}) Sets the disposition for a stream. -This option overrides the disposition copied from the input stream. It is also -possible to delete the disposition by setting it to 0. - -The following dispositions are recognized: -@table @option -@item default -@item dub -@item original -@item comment -@item lyrics -@item karaoke -@item forced -@item hearing_impaired -@item visual_impaired -@item clean_effects -@item attached_pic -@item captions -@item descriptions -@item dependent -@item metadata -@end table +By default, the disposition is copied from the input stream, unless the output +stream this option applies to is fed by a complex filtergraph - in that case the +disposition is unset by default. + +@var{value} is a sequence of items separated by '+' or '-'. The first item may +also be prefixed with '+' or '-', in which case this option modifies the default +value. Otherwise (the first item is not prefixed) this options overrides the +default value. A '+' prefix adds the given disposition, '-' removes it. It is +also possible to clear the disposition by setting it to 0. + +If no @code{-disposition} options were specified for an output file, ffmpeg will +automatically set the 'default' disposition on the first stream of each type, +when there are multiple streams of this type in the output file and no stream of +that type is already marked as default. + +The @code{-dispositions} option lists the known dispositions. For example, to make the second audio stream the default stream: @example diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index b5fc1e845f..f755f44bd9 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3170,9 +3170,6 @@ static int init_output_stream_streamcopy(OutputStream *ost) if (ost->st->duration <= 0 && ist->st->duration > 0) ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base); - // copy disposition - ost->st->disposition = ist->st->disposition; - if (ist->st->nb_side_data) { for (i = 0; i < ist->st->nb_side_data; i++) { const AVPacketSideData *sd_src = &ist->st->side_data[i]; @@ -3360,7 +3357,7 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame) AVCodecContext *enc_ctx = ost->enc_ctx; AVCodecContext *dec_ctx = NULL; AVFormatContext *oc = output_files[ost->file_index]->ctx; - int j, ret; + int ret; set_encoder_id(output_files[ost->file_index], ost); @@ -3370,21 +3367,9 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame) av_dict_set(&ost->st->metadata, "rotate", NULL, 0); if (ist) { - ost->st->disposition = ist->st->disposition; - dec_ctx = ist->dec_ctx; enc_ctx->chroma_sample_location = dec_ctx->chroma_sample_location; - } else { - for (j = 0; j < oc->nb_streams; j++) { - AVStream *st = oc->streams[j]; - if (st != ost->st && st->codecpar->codec_type == ost->st->codecpar->codec_type) - break; - } - if (j == oc->nb_streams) - if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || - ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) - ost->st->disposition = AV_DISPOSITION_DEFAULT; } if (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) { @@ -3665,24 +3650,6 @@ static int init_output_stream(OutputStream *ost, AVFrame *frame, return ret; } - // parse user provided disposition, and update stream values - if (ost->disposition) { -#if LIBAVFORMAT_VERSION_MAJOR >= 60 - ret = av_opt_set(ost->st, "disposition", ost->disposition, 0); -#else - { - const AVClass *class = av_stream_get_class(); - const AVOption *o = av_opt_find(&class, "disposition", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ); - - av_assert0(o); - ret = av_opt_eval_flags(&class, o, ost->disposition, &ost->st->disposition); - } -#endif - - if (ret < 0) - return ret; - } - /* initialize bitstream filters for the output stream * needs to be done here, because the codec id for streamcopy is not * known until now */ diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index ab4c63a362..4685cf6435 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2150,6 +2150,72 @@ static int copy_chapters(InputFile *ifile, OutputFile *ofile, int copy_metadata) return 0; } +static int set_dispositions(OutputFile *of) +{ + int nb_streams[AVMEDIA_TYPE_NB] = { 0 }; + int have_default[AVMEDIA_TYPE_NB] = { 0 }; + int have_manual = 0; + + // first, copy the input dispositions + for (int i = 0; i< of->ctx->nb_streams; i++) { + OutputStream *ost = output_streams[of->ost_index + i]; + + nb_streams[ost->st->codecpar->codec_type]++; + + have_manual |= !!ost->disposition; + + if (ost->source_index >= 0) { + ost->st->disposition = input_streams[ost->source_index]->st->disposition; + + if (ost->st->disposition & AV_DISPOSITION_DEFAULT) + have_default[ost->st->codecpar->codec_type] = 1; + } + } + + if (have_manual) { + // process manually set dispositions - they override the above copy + for (int i = 0; i< of->ctx->nb_streams; i++) { + OutputStream *ost = output_streams[of->ost_index + i]; + int ret; + + if (!ost->disposition) + continue; + +#if LIBAVFORMAT_VERSION_MAJOR >= 60 + ret = av_opt_set(ost->st, "disposition", ost->disposition, 0); +#else + { + const AVClass *class = av_stream_get_class(); + const AVOption *o = av_opt_find(&class, "disposition", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ); + + av_assert0(o); + ret = av_opt_eval_flags(&class, o, ost->disposition, &ost->st->disposition); + } +#endif + + if (ret < 0) + return ret; + } + } else { + // For each media type with more than one stream, find a suitable stream to + // mark as default, unless one is already marked default. + // "Suitable" means the first of that type, skipping attached pictures. + for (int i = 0; i< of->ctx->nb_streams; i++) { + OutputStream *ost = output_streams[of->ost_index + i]; + enum AVMediaType type = ost->st->codecpar->codec_type; + + if (nb_streams[type] < 2 || have_default[type] || + ost->st->disposition & AV_DISPOSITION_ATTACHED_PIC) + continue; + + ost->st->disposition |= AV_DISPOSITION_DEFAULT; + have_default[type] = 1; + } + } + + return 0; +} + static void init_output_filter(OutputFilter *ofilter, OptionsContext *o, AVFormatContext *oc) { @@ -2857,6 +2923,12 @@ loop_end: } } + err = set_dispositions(of); + if (err < 0) { + av_log(NULL, AV_LOG_FATAL, "Error setting output stream dispositions\n"); + exit_program(1); + } + return 0; } diff --git a/tests/ref/fate/ffprobe_compact b/tests/ref/fate/ffprobe_compact index 12565d2600..911777069a 100644 --- a/tests/ref/fate/ffprobe_compact +++ b/tests/ref/fate/ffprobe_compact @@ -1,32 +1,32 @@ -packet|codec_type=audio|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=1024|duration_time=0.023220|size=2048|pos=647|flags=K_ -frame|media_type=audio|stream_index=0|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=647|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown -packet|codec_type=video|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|size=230400|pos=2722|flags=K_ -frame|media_type=video|stream_index=1|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=2722|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified -packet|codec_type=video|stream_index=2|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|size=30000|pos=233143|flags=K_ -frame|media_type=video|stream_index=2|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=233143|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified -packet|codec_type=audio|stream_index=0|pts=1024|pts_time=0.023220|dts=1024|dts_time=0.023220|duration=1024|duration_time=0.023220|size=2048|pos=263148|flags=K_ -frame|media_type=audio|stream_index=0|key_frame=1|pts=1024|pts_time=0.023220|pkt_dts=1024|pkt_dts_time=0.023220|best_effort_timestamp=1024|best_effort_timestamp_time=0.023220|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=263148|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown -packet|codec_type=video|stream_index=1|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|size=230400|pos=265226|flags=K_ -frame|media_type=video|stream_index=1|key_frame=1|pts=2048|pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|best_effort_timestamp=2048|best_effort_timestamp_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=265226|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified -packet|codec_type=video|stream_index=2|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|size=30000|pos=495650|flags=K_ -frame|media_type=video|stream_index=2|key_frame=1|pts=2048|pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|best_effort_timestamp=2048|best_effort_timestamp_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=495650|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified -packet|codec_type=audio|stream_index=0|pts=2048|pts_time=0.046440|dts=2048|dts_time=0.046440|duration=1024|duration_time=0.023220|size=2048|pos=525655|flags=K_ -frame|media_type=audio|stream_index=0|key_frame=1|pts=2048|pts_time=0.046440|pkt_dts=2048|pkt_dts_time=0.046440|best_effort_timestamp=2048|best_effort_timestamp_time=0.046440|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=525655|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown -packet|codec_type=audio|stream_index=0|pts=3072|pts_time=0.069660|dts=3072|dts_time=0.069660|duration=1024|duration_time=0.023220|size=2048|pos=527726|flags=K_ -frame|media_type=audio|stream_index=0|key_frame=1|pts=3072|pts_time=0.069660|pkt_dts=3072|pkt_dts_time=0.069660|best_effort_timestamp=3072|best_effort_timestamp_time=0.069660|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=527726|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown -packet|codec_type=video|stream_index=1|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|size=230400|pos=529804|flags=K_ -frame|media_type=video|stream_index=1|key_frame=1|pts=4096|pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|best_effort_timestamp=4096|best_effort_timestamp_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=529804|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified -packet|codec_type=video|stream_index=2|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|size=30000|pos=760228|flags=K_ -frame|media_type=video|stream_index=2|key_frame=1|pts=4096|pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|best_effort_timestamp=4096|best_effort_timestamp_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=760228|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified -packet|codec_type=audio|stream_index=0|pts=4096|pts_time=0.092880|dts=4096|dts_time=0.092880|duration=1024|duration_time=0.023220|size=2048|pos=790233|flags=K_ -frame|media_type=audio|stream_index=0|key_frame=1|pts=4096|pts_time=0.092880|pkt_dts=4096|pkt_dts_time=0.092880|best_effort_timestamp=4096|best_effort_timestamp_time=0.092880|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=790233|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown -packet|codec_type=audio|stream_index=0|pts=5120|pts_time=0.116100|dts=5120|dts_time=0.116100|duration=393|duration_time=0.008912|size=786|pos=792304|flags=K_ -frame|media_type=audio|stream_index=0|key_frame=1|pts=5120|pts_time=0.116100|pkt_dts=5120|pkt_dts_time=0.116100|best_effort_timestamp=5120|best_effort_timestamp_time=0.116100|pkt_duration=393|pkt_duration_time=0.008912|pkt_pos=792304|pkt_size=786|sample_fmt=s16|nb_samples=393|channels=1|channel_layout=unknown -packet|codec_type=video|stream_index=1|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=230400|pos=793120|flags=K_ -frame|media_type=video|stream_index=1|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=793120|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified -packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=30000|pos=1023544|flags=K_ -frame|media_type=video|stream_index=2|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=1023544|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified +packet|codec_type=audio|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=1024|duration_time=0.023220|size=2048|pos=669|flags=K_ +frame|media_type=audio|stream_index=0|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=669|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown +packet|codec_type=video|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|size=230400|pos=2744|flags=K_ +frame|media_type=video|stream_index=1|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=2744|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified +packet|codec_type=video|stream_index=2|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|size=30000|pos=233165|flags=K_ +frame|media_type=video|stream_index=2|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=233165|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified +packet|codec_type=audio|stream_index=0|pts=1024|pts_time=0.023220|dts=1024|dts_time=0.023220|duration=1024|duration_time=0.023220|size=2048|pos=263170|flags=K_ +frame|media_type=audio|stream_index=0|key_frame=1|pts=1024|pts_time=0.023220|pkt_dts=1024|pkt_dts_time=0.023220|best_effort_timestamp=1024|best_effort_timestamp_time=0.023220|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=263170|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown +packet|codec_type=video|stream_index=1|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|size=230400|pos=265248|flags=K_ +frame|media_type=video|stream_index=1|key_frame=1|pts=2048|pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|best_effort_timestamp=2048|best_effort_timestamp_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=265248|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified +packet|codec_type=video|stream_index=2|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|size=30000|pos=495672|flags=K_ +frame|media_type=video|stream_index=2|key_frame=1|pts=2048|pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|best_effort_timestamp=2048|best_effort_timestamp_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=495672|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified +packet|codec_type=audio|stream_index=0|pts=2048|pts_time=0.046440|dts=2048|dts_time=0.046440|duration=1024|duration_time=0.023220|size=2048|pos=525677|flags=K_ +frame|media_type=audio|stream_index=0|key_frame=1|pts=2048|pts_time=0.046440|pkt_dts=2048|pkt_dts_time=0.046440|best_effort_timestamp=2048|best_effort_timestamp_time=0.046440|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=525677|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown +packet|codec_type=audio|stream_index=0|pts=3072|pts_time=0.069660|dts=3072|dts_time=0.069660|duration=1024|duration_time=0.023220|size=2048|pos=527748|flags=K_ +frame|media_type=audio|stream_index=0|key_frame=1|pts=3072|pts_time=0.069660|pkt_dts=3072|pkt_dts_time=0.069660|best_effort_timestamp=3072|best_effort_timestamp_time=0.069660|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=527748|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown +packet|codec_type=video|stream_index=1|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|size=230400|pos=529826|flags=K_ +frame|media_type=video|stream_index=1|key_frame=1|pts=4096|pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|best_effort_timestamp=4096|best_effort_timestamp_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=529826|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified +packet|codec_type=video|stream_index=2|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|size=30000|pos=760250|flags=K_ +frame|media_type=video|stream_index=2|key_frame=1|pts=4096|pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|best_effort_timestamp=4096|best_effort_timestamp_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=760250|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified +packet|codec_type=audio|stream_index=0|pts=4096|pts_time=0.092880|dts=4096|dts_time=0.092880|duration=1024|duration_time=0.023220|size=2048|pos=790255|flags=K_ +frame|media_type=audio|stream_index=0|key_frame=1|pts=4096|pts_time=0.092880|pkt_dts=4096|pkt_dts_time=0.092880|best_effort_timestamp=4096|best_effort_timestamp_time=0.092880|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=790255|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown +packet|codec_type=audio|stream_index=0|pts=5120|pts_time=0.116100|dts=5120|dts_time=0.116100|duration=393|duration_time=0.008912|size=786|pos=792326|flags=K_ +frame|media_type=audio|stream_index=0|key_frame=1|pts=5120|pts_time=0.116100|pkt_dts=5120|pkt_dts_time=0.116100|best_effort_timestamp=5120|best_effort_timestamp_time=0.116100|pkt_duration=393|pkt_duration_time=0.008912|pkt_pos=792326|pkt_size=786|sample_fmt=s16|nb_samples=393|channels=1|channel_layout=unknown +packet|codec_type=video|stream_index=1|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=230400|pos=793142|flags=K_ +frame|media_type=video|stream_index=1|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=793142|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified +packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=30000|pos=1023566|flags=K_ +frame|media_type=video|stream_index=2|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=1023566|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_tag_string=PSD[16]|codec_tag=0x10445350|sample_fmt=s16|sample_rate=44100|channels=1|channel_layout=unknown|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=705600|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=6|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:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:E=mc²|tag:encoder=Lavc pcm_s16le -stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|coded_width=320|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|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=4|nb_read_packets=4|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:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:title=foobar|tag:duration_ts=field-and-tags-conflict-attempt|tag:encoder=Lavc rawvideo +stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|coded_width=320|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|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=4|nb_read_packets=4|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:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:title=foobar|tag:duration_ts=field-and-tags-conflict-attempt|tag:encoder=Lavc rawvideo stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=100|height=100|coded_width=100|coded_height=100|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|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=4|nb_read_packets=4|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:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:encoder=Lavc rawvideo -format|filename=tests/data/ffprobe-test.nut|nb_streams=3|nb_programs=0|format_name=nut|start_time=0.000000|duration=0.120000|size=1053624|bit_rate=70241600|probe_score=100|tag:title=ffprobe test file|tag:comment='A comment with CSV, XML & JSON special chars': |tag:comment2=I ♥ Üñîçød€ +format|filename=tests/data/ffprobe-test.nut|nb_streams=3|nb_programs=0|format_name=nut|start_time=0.000000|duration=0.120000|size=1053646|bit_rate=70243066|probe_score=100|tag:title=ffprobe test file|tag:comment='A comment with CSV, XML & JSON special chars': |tag:comment2=I ♥ Üñîçød€ diff --git a/tests/ref/fate/ffprobe_csv b/tests/ref/fate/ffprobe_csv index 0bbc15e4d5..fd6bb242c9 100644 --- a/tests/ref/fate/ffprobe_csv +++ b/tests/ref/fate/ffprobe_csv @@ -1,32 +1,32 @@ -packet,audio,0,0,0.000000,0,0.000000,1024,0.023220,2048,647,K_ -frame,audio,0,1,0,0.000000,0,0.000000,0,0.000000,1024,0.023220,647,2048,s16,1024,1,unknown -packet,video,1,0,0.000000,0,0.000000,2048,0.040000,230400,2722,K_ -frame,video,1,1,0,0.000000,0,0.000000,0,0.000000,2048,0.040000,2722,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified -packet,video,2,0,0.000000,0,0.000000,2048,0.040000,30000,233143,K_ -frame,video,2,1,0,0.000000,0,0.000000,0,0.000000,2048,0.040000,233143,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified -packet,audio,0,1024,0.023220,1024,0.023220,1024,0.023220,2048,263148,K_ -frame,audio,0,1,1024,0.023220,1024,0.023220,1024,0.023220,1024,0.023220,263148,2048,s16,1024,1,unknown -packet,video,1,2048,0.040000,2048,0.040000,2048,0.040000,230400,265226,K_ -frame,video,1,1,2048,0.040000,2048,0.040000,2048,0.040000,2048,0.040000,265226,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified -packet,video,2,2048,0.040000,2048,0.040000,2048,0.040000,30000,495650,K_ -frame,video,2,1,2048,0.040000,2048,0.040000,2048,0.040000,2048,0.040000,495650,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified -packet,audio,0,2048,0.046440,2048,0.046440,1024,0.023220,2048,525655,K_ -frame,audio,0,1,2048,0.046440,2048,0.046440,2048,0.046440,1024,0.023220,525655,2048,s16,1024,1,unknown -packet,audio,0,3072,0.069660,3072,0.069660,1024,0.023220,2048,527726,K_ -frame,audio,0,1,3072,0.069660,3072,0.069660,3072,0.069660,1024,0.023220,527726,2048,s16,1024,1,unknown -packet,video,1,4096,0.080000,4096,0.080000,2048,0.040000,230400,529804,K_ -frame,video,1,1,4096,0.080000,4096,0.080000,4096,0.080000,2048,0.040000,529804,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified -packet,video,2,4096,0.080000,4096,0.080000,2048,0.040000,30000,760228,K_ -frame,video,2,1,4096,0.080000,4096,0.080000,4096,0.080000,2048,0.040000,760228,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified -packet,audio,0,4096,0.092880,4096,0.092880,1024,0.023220,2048,790233,K_ -frame,audio,0,1,4096,0.092880,4096,0.092880,4096,0.092880,1024,0.023220,790233,2048,s16,1024,1,unknown -packet,audio,0,5120,0.116100,5120,0.116100,393,0.008912,786,792304,K_ -frame,audio,0,1,5120,0.116100,5120,0.116100,5120,0.116100,393,0.008912,792304,786,s16,393,1,unknown -packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,230400,793120,K_ -frame,video,1,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,793120,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified -packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,30000,1023544,K_ -frame,video,2,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,1023544,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified +packet,audio,0,0,0.000000,0,0.000000,1024,0.023220,2048,669,K_ +frame,audio,0,1,0,0.000000,0,0.000000,0,0.000000,1024,0.023220,669,2048,s16,1024,1,unknown +packet,video,1,0,0.000000,0,0.000000,2048,0.040000,230400,2744,K_ +frame,video,1,1,0,0.000000,0,0.000000,0,0.000000,2048,0.040000,2744,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified +packet,video,2,0,0.000000,0,0.000000,2048,0.040000,30000,233165,K_ +frame,video,2,1,0,0.000000,0,0.000000,0,0.000000,2048,0.040000,233165,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified +packet,audio,0,1024,0.023220,1024,0.023220,1024,0.023220,2048,263170,K_ +frame,audio,0,1,1024,0.023220,1024,0.023220,1024,0.023220,1024,0.023220,263170,2048,s16,1024,1,unknown +packet,video,1,2048,0.040000,2048,0.040000,2048,0.040000,230400,265248,K_ +frame,video,1,1,2048,0.040000,2048,0.040000,2048,0.040000,2048,0.040000,265248,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified +packet,video,2,2048,0.040000,2048,0.040000,2048,0.040000,30000,495672,K_ +frame,video,2,1,2048,0.040000,2048,0.040000,2048,0.040000,2048,0.040000,495672,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified +packet,audio,0,2048,0.046440,2048,0.046440,1024,0.023220,2048,525677,K_ +frame,audio,0,1,2048,0.046440,2048,0.046440,2048,0.046440,1024,0.023220,525677,2048,s16,1024,1,unknown +packet,audio,0,3072,0.069660,3072,0.069660,1024,0.023220,2048,527748,K_ +frame,audio,0,1,3072,0.069660,3072,0.069660,3072,0.069660,1024,0.023220,527748,2048,s16,1024,1,unknown +packet,video,1,4096,0.080000,4096,0.080000,2048,0.040000,230400,529826,K_ +frame,video,1,1,4096,0.080000,4096,0.080000,4096,0.080000,2048,0.040000,529826,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified +packet,video,2,4096,0.080000,4096,0.080000,2048,0.040000,30000,760250,K_ +frame,video,2,1,4096,0.080000,4096,0.080000,4096,0.080000,2048,0.040000,760250,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified +packet,audio,0,4096,0.092880,4096,0.092880,1024,0.023220,2048,790255,K_ +frame,audio,0,1,4096,0.092880,4096,0.092880,4096,0.092880,1024,0.023220,790255,2048,s16,1024,1,unknown +packet,audio,0,5120,0.116100,5120,0.116100,393,0.008912,786,792326,K_ +frame,audio,0,1,5120,0.116100,5120,0.116100,5120,0.116100,393,0.008912,792326,786,s16,393,1,unknown +packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,230400,793142,K_ +frame,video,1,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,793142,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified +packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,30000,1023566,K_ +frame,video,2,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,1023566,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified stream,0,pcm_s16le,unknown,audio,PSD[16],0x10445350,s16,44100,1,unknown,16,N/A,0/0,0/0,1/44100,0,0.000000,N/A,N/A,705600,N/A,N/A,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,mc²,Lavc pcm_s16le -stream,1,rawvideo,unknown,video,RGB[24],0x18424752,320,240,320,240,0,0,0,1:1,4:3,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,foobar,field-and-tags-conflict-attempt,Lavc rawvideo +stream,1,rawvideo,unknown,video,RGB[24],0x18424752,320,240,320,240,0,0,0,1:1,4:3,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,foobar,field-and-tags-conflict-attempt,Lavc rawvideo stream,2,rawvideo,unknown,video,RGB[24],0x18424752,100,100,100,100,0,0,0,1:1,1:1,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Lavc rawvideo -format,tests/data/ffprobe-test.nut,3,0,nut,0.000000,0.120000,1053624,70241600,100,ffprobe test file,"'A comment with CSV, XML & JSON special chars': ",I ♥ Üñîçød€ +format,tests/data/ffprobe-test.nut,3,0,nut,0.000000,0.120000,1053646,70243066,100,ffprobe test file,"'A comment with CSV, XML & JSON special chars': ",I ♥ Üñîçød€ diff --git a/tests/ref/fate/ffprobe_default b/tests/ref/fate/ffprobe_default index 54e992c406..d3d90fa5d6 100644 --- a/tests/ref/fate/ffprobe_default +++ b/tests/ref/fate/ffprobe_default @@ -8,7 +8,7 @@ dts_time=0.000000 duration=1024 duration_time=0.023220 size=2048 -pos=647 +pos=669 flags=K_ [/PACKET] [FRAME] @@ -23,7 +23,7 @@ best_effort_timestamp=0 best_effort_timestamp_time=0.000000 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=647 +pkt_pos=669 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -40,7 +40,7 @@ dts_time=0.000000 duration=2048 duration_time=0.040000 size=230400 -pos=2722 +pos=2744 flags=K_ [/PACKET] [FRAME] @@ -55,7 +55,7 @@ best_effort_timestamp=0 best_effort_timestamp_time=0.000000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=2722 +pkt_pos=2744 pkt_size=230400 width=320 height=240 @@ -83,7 +83,7 @@ dts_time=0.000000 duration=2048 duration_time=0.040000 size=30000 -pos=233143 +pos=233165 flags=K_ [/PACKET] [FRAME] @@ -98,7 +98,7 @@ best_effort_timestamp=0 best_effort_timestamp_time=0.000000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=233143 +pkt_pos=233165 pkt_size=30000 width=100 height=100 @@ -126,7 +126,7 @@ dts_time=0.023220 duration=1024 duration_time=0.023220 size=2048 -pos=263148 +pos=263170 flags=K_ [/PACKET] [FRAME] @@ -141,7 +141,7 @@ best_effort_timestamp=1024 best_effort_timestamp_time=0.023220 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=263148 +pkt_pos=263170 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -158,7 +158,7 @@ dts_time=0.040000 duration=2048 duration_time=0.040000 size=230400 -pos=265226 +pos=265248 flags=K_ [/PACKET] [FRAME] @@ -173,7 +173,7 @@ best_effort_timestamp=2048 best_effort_timestamp_time=0.040000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=265226 +pkt_pos=265248 pkt_size=230400 width=320 height=240 @@ -201,7 +201,7 @@ dts_time=0.040000 duration=2048 duration_time=0.040000 size=30000 -pos=495650 +pos=495672 flags=K_ [/PACKET] [FRAME] @@ -216,7 +216,7 @@ best_effort_timestamp=2048 best_effort_timestamp_time=0.040000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=495650 +pkt_pos=495672 pkt_size=30000 width=100 height=100 @@ -244,7 +244,7 @@ dts_time=0.046440 duration=1024 duration_time=0.023220 size=2048 -pos=525655 +pos=525677 flags=K_ [/PACKET] [FRAME] @@ -259,7 +259,7 @@ best_effort_timestamp=2048 best_effort_timestamp_time=0.046440 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=525655 +pkt_pos=525677 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -276,7 +276,7 @@ dts_time=0.069660 duration=1024 duration_time=0.023220 size=2048 -pos=527726 +pos=527748 flags=K_ [/PACKET] [FRAME] @@ -291,7 +291,7 @@ best_effort_timestamp=3072 best_effort_timestamp_time=0.069660 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=527726 +pkt_pos=527748 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -308,7 +308,7 @@ dts_time=0.080000 duration=2048 duration_time=0.040000 size=230400 -pos=529804 +pos=529826 flags=K_ [/PACKET] [FRAME] @@ -323,7 +323,7 @@ best_effort_timestamp=4096 best_effort_timestamp_time=0.080000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=529804 +pkt_pos=529826 pkt_size=230400 width=320 height=240 @@ -351,7 +351,7 @@ dts_time=0.080000 duration=2048 duration_time=0.040000 size=30000 -pos=760228 +pos=760250 flags=K_ [/PACKET] [FRAME] @@ -366,7 +366,7 @@ best_effort_timestamp=4096 best_effort_timestamp_time=0.080000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=760228 +pkt_pos=760250 pkt_size=30000 width=100 height=100 @@ -394,7 +394,7 @@ dts_time=0.092880 duration=1024 duration_time=0.023220 size=2048 -pos=790233 +pos=790255 flags=K_ [/PACKET] [FRAME] @@ -409,7 +409,7 @@ best_effort_timestamp=4096 best_effort_timestamp_time=0.092880 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=790233 +pkt_pos=790255 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -426,7 +426,7 @@ dts_time=0.116100 duration=393 duration_time=0.008912 size=786 -pos=792304 +pos=792326 flags=K_ [/PACKET] [FRAME] @@ -441,7 +441,7 @@ best_effort_timestamp=5120 best_effort_timestamp_time=0.116100 pkt_duration=393 pkt_duration_time=0.008912 -pkt_pos=792304 +pkt_pos=792326 pkt_size=786 sample_fmt=s16 nb_samples=393 @@ -458,7 +458,7 @@ dts_time=0.120000 duration=2048 duration_time=0.040000 size=230400 -pos=793120 +pos=793142 flags=K_ [/PACKET] [FRAME] @@ -473,7 +473,7 @@ best_effort_timestamp=6144 best_effort_timestamp_time=0.120000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=793120 +pkt_pos=793142 pkt_size=230400 width=320 height=240 @@ -501,7 +501,7 @@ dts_time=0.120000 duration=2048 duration_time=0.040000 size=30000 -pos=1023544 +pos=1023566 flags=K_ [/PACKET] [FRAME] @@ -516,7 +516,7 @@ best_effort_timestamp=6144 best_effort_timestamp_time=0.120000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=1023544 +pkt_pos=1023566 pkt_size=30000 width=100 height=100 @@ -619,7 +619,7 @@ bits_per_raw_sample=N/A nb_frames=N/A nb_read_frames=4 nb_read_packets=4 -DISPOSITION:default=0 +DISPOSITION:default=1 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 @@ -705,8 +705,8 @@ nb_programs=0 format_name=nut start_time=0.000000 duration=0.120000 -size=1053624 -bit_rate=70241600 +size=1053646 +bit_rate=70243066 probe_score=100 TAG:title=ffprobe test file TAG:comment='A comment with CSV, XML & JSON special chars': diff --git a/tests/ref/fate/ffprobe_flat b/tests/ref/fate/ffprobe_flat index 4b0b4b3881..e77dec6b84 100644 --- a/tests/ref/fate/ffprobe_flat +++ b/tests/ref/fate/ffprobe_flat @@ -7,7 +7,7 @@ packets_and_frames.packet.0.dts_time="0.000000" packets_and_frames.packet.0.duration=1024 packets_and_frames.packet.0.duration_time="0.023220" packets_and_frames.packet.0.size="2048" -packets_and_frames.packet.0.pos="647" +packets_and_frames.packet.0.pos="669" packets_and_frames.packet.0.flags="K_" packets_and_frames.frame.0.media_type="audio" packets_and_frames.frame.0.stream_index=0 @@ -20,7 +20,7 @@ packets_and_frames.frame.0.best_effort_timestamp=0 packets_and_frames.frame.0.best_effort_timestamp_time="0.000000" packets_and_frames.frame.0.pkt_duration=1024 packets_and_frames.frame.0.pkt_duration_time="0.023220" -packets_and_frames.frame.0.pkt_pos="647" +packets_and_frames.frame.0.pkt_pos="669" packets_and_frames.frame.0.pkt_size="2048" packets_and_frames.frame.0.sample_fmt="s16" packets_and_frames.frame.0.nb_samples=1024 @@ -35,7 +35,7 @@ packets_and_frames.packet.1.dts_time="0.000000" packets_and_frames.packet.1.duration=2048 packets_and_frames.packet.1.duration_time="0.040000" packets_and_frames.packet.1.size="230400" -packets_and_frames.packet.1.pos="2722" +packets_and_frames.packet.1.pos="2744" packets_and_frames.packet.1.flags="K_" packets_and_frames.frame.1.media_type="video" packets_and_frames.frame.1.stream_index=1 @@ -48,7 +48,7 @@ packets_and_frames.frame.1.best_effort_timestamp=0 packets_and_frames.frame.1.best_effort_timestamp_time="0.000000" packets_and_frames.frame.1.pkt_duration=2048 packets_and_frames.frame.1.pkt_duration_time="0.040000" -packets_and_frames.frame.1.pkt_pos="2722" +packets_and_frames.frame.1.pkt_pos="2744" packets_and_frames.frame.1.pkt_size="230400" packets_and_frames.frame.1.width=320 packets_and_frames.frame.1.height=240 @@ -74,7 +74,7 @@ packets_and_frames.packet.2.dts_time="0.000000" packets_and_frames.packet.2.duration=2048 packets_and_frames.packet.2.duration_time="0.040000" packets_and_frames.packet.2.size="30000" -packets_and_frames.packet.2.pos="233143" +packets_and_frames.packet.2.pos="233165" packets_and_frames.packet.2.flags="K_" packets_and_frames.frame.2.media_type="video" packets_and_frames.frame.2.stream_index=2 @@ -87,7 +87,7 @@ packets_and_frames.frame.2.best_effort_timestamp=0 packets_and_frames.frame.2.best_effort_timestamp_time="0.000000" packets_and_frames.frame.2.pkt_duration=2048 packets_and_frames.frame.2.pkt_duration_time="0.040000" -packets_and_frames.frame.2.pkt_pos="233143" +packets_and_frames.frame.2.pkt_pos="233165" packets_and_frames.frame.2.pkt_size="30000" packets_and_frames.frame.2.width=100 packets_and_frames.frame.2.height=100 @@ -113,7 +113,7 @@ packets_and_frames.packet.3.dts_time="0.023220" packets_and_frames.packet.3.duration=1024 packets_and_frames.packet.3.duration_time="0.023220" packets_and_frames.packet.3.size="2048" -packets_and_frames.packet.3.pos="263148" +packets_and_frames.packet.3.pos="263170" packets_and_frames.packet.3.flags="K_" packets_and_frames.frame.3.media_type="audio" packets_and_frames.frame.3.stream_index=0 @@ -126,7 +126,7 @@ packets_and_frames.frame.3.best_effort_timestamp=1024 packets_and_frames.frame.3.best_effort_timestamp_time="0.023220" packets_and_frames.frame.3.pkt_duration=1024 packets_and_frames.frame.3.pkt_duration_time="0.023220" -packets_and_frames.frame.3.pkt_pos="263148" +packets_and_frames.frame.3.pkt_pos="263170" packets_and_frames.frame.3.pkt_size="2048" packets_and_frames.frame.3.sample_fmt="s16" packets_and_frames.frame.3.nb_samples=1024 @@ -141,7 +141,7 @@ packets_and_frames.packet.4.dts_time="0.040000" packets_and_frames.packet.4.duration=2048 packets_and_frames.packet.4.duration_time="0.040000" packets_and_frames.packet.4.size="230400" -packets_and_frames.packet.4.pos="265226" +packets_and_frames.packet.4.pos="265248" packets_and_frames.packet.4.flags="K_" packets_and_frames.frame.4.media_type="video" packets_and_frames.frame.4.stream_index=1 @@ -154,7 +154,7 @@ packets_and_frames.frame.4.best_effort_timestamp=2048 packets_and_frames.frame.4.best_effort_timestamp_time="0.040000" packets_and_frames.frame.4.pkt_duration=2048 packets_and_frames.frame.4.pkt_duration_time="0.040000" -packets_and_frames.frame.4.pkt_pos="265226" +packets_and_frames.frame.4.pkt_pos="265248" packets_and_frames.frame.4.pkt_size="230400" packets_and_frames.frame.4.width=320 packets_and_frames.frame.4.height=240 @@ -180,7 +180,7 @@ packets_and_frames.packet.5.dts_time="0.040000" packets_and_frames.packet.5.duration=2048 packets_and_frames.packet.5.duration_time="0.040000" packets_and_frames.packet.5.size="30000" -packets_and_frames.packet.5.pos="495650" +packets_and_frames.packet.5.pos="495672" packets_and_frames.packet.5.flags="K_" packets_and_frames.frame.5.media_type="video" packets_and_frames.frame.5.stream_index=2 @@ -193,7 +193,7 @@ packets_and_frames.frame.5.best_effort_timestamp=2048 packets_and_frames.frame.5.best_effort_timestamp_time="0.040000" packets_and_frames.frame.5.pkt_duration=2048 packets_and_frames.frame.5.pkt_duration_time="0.040000" -packets_and_frames.frame.5.pkt_pos="495650" +packets_and_frames.frame.5.pkt_pos="495672" packets_and_frames.frame.5.pkt_size="30000" packets_and_frames.frame.5.width=100 packets_and_frames.frame.5.height=100 @@ -219,7 +219,7 @@ packets_and_frames.packet.6.dts_time="0.046440" packets_and_frames.packet.6.duration=1024 packets_and_frames.packet.6.duration_time="0.023220" packets_and_frames.packet.6.size="2048" -packets_and_frames.packet.6.pos="525655" +packets_and_frames.packet.6.pos="525677" packets_and_frames.packet.6.flags="K_" packets_and_frames.frame.6.media_type="audio" packets_and_frames.frame.6.stream_index=0 @@ -232,7 +232,7 @@ packets_and_frames.frame.6.best_effort_timestamp=2048 packets_and_frames.frame.6.best_effort_timestamp_time="0.046440" packets_and_frames.frame.6.pkt_duration=1024 packets_and_frames.frame.6.pkt_duration_time="0.023220" -packets_and_frames.frame.6.pkt_pos="525655" +packets_and_frames.frame.6.pkt_pos="525677" packets_and_frames.frame.6.pkt_size="2048" packets_and_frames.frame.6.sample_fmt="s16" packets_and_frames.frame.6.nb_samples=1024 @@ -247,7 +247,7 @@ packets_and_frames.packet.7.dts_time="0.069660" packets_and_frames.packet.7.duration=1024 packets_and_frames.packet.7.duration_time="0.023220" packets_and_frames.packet.7.size="2048" -packets_and_frames.packet.7.pos="527726" +packets_and_frames.packet.7.pos="527748" packets_and_frames.packet.7.flags="K_" packets_and_frames.frame.7.media_type="audio" packets_and_frames.frame.7.stream_index=0 @@ -260,7 +260,7 @@ packets_and_frames.frame.7.best_effort_timestamp=3072 packets_and_frames.frame.7.best_effort_timestamp_time="0.069660" packets_and_frames.frame.7.pkt_duration=1024 packets_and_frames.frame.7.pkt_duration_time="0.023220" -packets_and_frames.frame.7.pkt_pos="527726" +packets_and_frames.frame.7.pkt_pos="527748" packets_and_frames.frame.7.pkt_size="2048" packets_and_frames.frame.7.sample_fmt="s16" packets_and_frames.frame.7.nb_samples=1024 @@ -275,7 +275,7 @@ packets_and_frames.packet.8.dts_time="0.080000" packets_and_frames.packet.8.duration=2048 packets_and_frames.packet.8.duration_time="0.040000" packets_and_frames.packet.8.size="230400" -packets_and_frames.packet.8.pos="529804" +packets_and_frames.packet.8.pos="529826" packets_and_frames.packet.8.flags="K_" packets_and_frames.frame.8.media_type="video" packets_and_frames.frame.8.stream_index=1 @@ -288,7 +288,7 @@ packets_and_frames.frame.8.best_effort_timestamp=4096 packets_and_frames.frame.8.best_effort_timestamp_time="0.080000" packets_and_frames.frame.8.pkt_duration=2048 packets_and_frames.frame.8.pkt_duration_time="0.040000" -packets_and_frames.frame.8.pkt_pos="529804" +packets_and_frames.frame.8.pkt_pos="529826" packets_and_frames.frame.8.pkt_size="230400" packets_and_frames.frame.8.width=320 packets_and_frames.frame.8.height=240 @@ -314,7 +314,7 @@ packets_and_frames.packet.9.dts_time="0.080000" packets_and_frames.packet.9.duration=2048 packets_and_frames.packet.9.duration_time="0.040000" packets_and_frames.packet.9.size="30000" -packets_and_frames.packet.9.pos="760228" +packets_and_frames.packet.9.pos="760250" packets_and_frames.packet.9.flags="K_" packets_and_frames.frame.9.media_type="video" packets_and_frames.frame.9.stream_index=2 @@ -327,7 +327,7 @@ packets_and_frames.frame.9.best_effort_timestamp=4096 packets_and_frames.frame.9.best_effort_timestamp_time="0.080000" packets_and_frames.frame.9.pkt_duration=2048 packets_and_frames.frame.9.pkt_duration_time="0.040000" -packets_and_frames.frame.9.pkt_pos="760228" +packets_and_frames.frame.9.pkt_pos="760250" packets_and_frames.frame.9.pkt_size="30000" packets_and_frames.frame.9.width=100 packets_and_frames.frame.9.height=100 @@ -353,7 +353,7 @@ packets_and_frames.packet.10.dts_time="0.092880" packets_and_frames.packet.10.duration=1024 packets_and_frames.packet.10.duration_time="0.023220" packets_and_frames.packet.10.size="2048" -packets_and_frames.packet.10.pos="790233" +packets_and_frames.packet.10.pos="790255" packets_and_frames.packet.10.flags="K_" packets_and_frames.frame.10.media_type="audio" packets_and_frames.frame.10.stream_index=0 @@ -366,7 +366,7 @@ packets_and_frames.frame.10.best_effort_timestamp=4096 packets_and_frames.frame.10.best_effort_timestamp_time="0.092880" packets_and_frames.frame.10.pkt_duration=1024 packets_and_frames.frame.10.pkt_duration_time="0.023220" -packets_and_frames.frame.10.pkt_pos="790233" +packets_and_frames.frame.10.pkt_pos="790255" packets_and_frames.frame.10.pkt_size="2048" packets_and_frames.frame.10.sample_fmt="s16" packets_and_frames.frame.10.nb_samples=1024 @@ -381,7 +381,7 @@ packets_and_frames.packet.11.dts_time="0.116100" packets_and_frames.packet.11.duration=393 packets_and_frames.packet.11.duration_time="0.008912" packets_and_frames.packet.11.size="786" -packets_and_frames.packet.11.pos="792304" +packets_and_frames.packet.11.pos="792326" packets_and_frames.packet.11.flags="K_" packets_and_frames.frame.11.media_type="audio" packets_and_frames.frame.11.stream_index=0 @@ -394,7 +394,7 @@ packets_and_frames.frame.11.best_effort_timestamp=5120 packets_and_frames.frame.11.best_effort_timestamp_time="0.116100" packets_and_frames.frame.11.pkt_duration=393 packets_and_frames.frame.11.pkt_duration_time="0.008912" -packets_and_frames.frame.11.pkt_pos="792304" +packets_and_frames.frame.11.pkt_pos="792326" packets_and_frames.frame.11.pkt_size="786" packets_and_frames.frame.11.sample_fmt="s16" packets_and_frames.frame.11.nb_samples=393 @@ -409,7 +409,7 @@ packets_and_frames.packet.12.dts_time="0.120000" packets_and_frames.packet.12.duration=2048 packets_and_frames.packet.12.duration_time="0.040000" packets_and_frames.packet.12.size="230400" -packets_and_frames.packet.12.pos="793120" +packets_and_frames.packet.12.pos="793142" packets_and_frames.packet.12.flags="K_" packets_and_frames.frame.12.media_type="video" packets_and_frames.frame.12.stream_index=1 @@ -422,7 +422,7 @@ packets_and_frames.frame.12.best_effort_timestamp=6144 packets_and_frames.frame.12.best_effort_timestamp_time="0.120000" packets_and_frames.frame.12.pkt_duration=2048 packets_and_frames.frame.12.pkt_duration_time="0.040000" -packets_and_frames.frame.12.pkt_pos="793120" +packets_and_frames.frame.12.pkt_pos="793142" packets_and_frames.frame.12.pkt_size="230400" packets_and_frames.frame.12.width=320 packets_and_frames.frame.12.height=240 @@ -448,7 +448,7 @@ packets_and_frames.packet.13.dts_time="0.120000" packets_and_frames.packet.13.duration=2048 packets_and_frames.packet.13.duration_time="0.040000" packets_and_frames.packet.13.size="30000" -packets_and_frames.packet.13.pos="1023544" +packets_and_frames.packet.13.pos="1023566" packets_and_frames.packet.13.flags="K_" packets_and_frames.frame.13.media_type="video" packets_and_frames.frame.13.stream_index=2 @@ -461,7 +461,7 @@ packets_and_frames.frame.13.best_effort_timestamp=6144 packets_and_frames.frame.13.best_effort_timestamp_time="0.120000" packets_and_frames.frame.13.pkt_duration=2048 packets_and_frames.frame.13.pkt_duration_time="0.040000" -packets_and_frames.frame.13.pkt_pos="1023544" +packets_and_frames.frame.13.pkt_pos="1023566" packets_and_frames.frame.13.pkt_size="30000" packets_and_frames.frame.13.width=100 packets_and_frames.frame.13.height=100 @@ -560,7 +560,7 @@ streams.stream.1.bits_per_raw_sample="N/A" streams.stream.1.nb_frames="N/A" streams.stream.1.nb_read_frames="4" streams.stream.1.nb_read_packets="4" -streams.stream.1.disposition.default=0 +streams.stream.1.disposition.default=1 streams.stream.1.disposition.dub=0 streams.stream.1.disposition.original=0 streams.stream.1.disposition.comment=0 @@ -642,8 +642,8 @@ format.nb_programs=0 format.format_name="nut" format.start_time="0.000000" format.duration="0.120000" -format.size="1053624" -format.bit_rate="70241600" +format.size="1053646" +format.bit_rate="70243066" format.probe_score=100 format.tags.title="ffprobe test file" format.tags.comment="'A comment with CSV, XML & JSON special chars': " diff --git a/tests/ref/fate/ffprobe_ini b/tests/ref/fate/ffprobe_ini index f64c4e891d..cff7d96003 100644 --- a/tests/ref/fate/ffprobe_ini +++ b/tests/ref/fate/ffprobe_ini @@ -10,7 +10,7 @@ dts_time=0.000000 duration=1024 duration_time=0.023220 size=2048 -pos=647 +pos=669 flags=K_ [packets_and_frames.frame.0] @@ -25,7 +25,7 @@ best_effort_timestamp=0 best_effort_timestamp_time=0.000000 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=647 +pkt_pos=669 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -42,7 +42,7 @@ dts_time=0.000000 duration=2048 duration_time=0.040000 size=230400 -pos=2722 +pos=2744 flags=K_ [packets_and_frames.frame.1] @@ -57,7 +57,7 @@ best_effort_timestamp=0 best_effort_timestamp_time=0.000000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=2722 +pkt_pos=2744 pkt_size=230400 width=320 height=240 @@ -85,7 +85,7 @@ dts_time=0.000000 duration=2048 duration_time=0.040000 size=30000 -pos=233143 +pos=233165 flags=K_ [packets_and_frames.frame.2] @@ -100,7 +100,7 @@ best_effort_timestamp=0 best_effort_timestamp_time=0.000000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=233143 +pkt_pos=233165 pkt_size=30000 width=100 height=100 @@ -128,7 +128,7 @@ dts_time=0.023220 duration=1024 duration_time=0.023220 size=2048 -pos=263148 +pos=263170 flags=K_ [packets_and_frames.frame.3] @@ -143,7 +143,7 @@ best_effort_timestamp=1024 best_effort_timestamp_time=0.023220 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=263148 +pkt_pos=263170 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -160,7 +160,7 @@ dts_time=0.040000 duration=2048 duration_time=0.040000 size=230400 -pos=265226 +pos=265248 flags=K_ [packets_and_frames.frame.4] @@ -175,7 +175,7 @@ best_effort_timestamp=2048 best_effort_timestamp_time=0.040000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=265226 +pkt_pos=265248 pkt_size=230400 width=320 height=240 @@ -203,7 +203,7 @@ dts_time=0.040000 duration=2048 duration_time=0.040000 size=30000 -pos=495650 +pos=495672 flags=K_ [packets_and_frames.frame.5] @@ -218,7 +218,7 @@ best_effort_timestamp=2048 best_effort_timestamp_time=0.040000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=495650 +pkt_pos=495672 pkt_size=30000 width=100 height=100 @@ -246,7 +246,7 @@ dts_time=0.046440 duration=1024 duration_time=0.023220 size=2048 -pos=525655 +pos=525677 flags=K_ [packets_and_frames.frame.6] @@ -261,7 +261,7 @@ best_effort_timestamp=2048 best_effort_timestamp_time=0.046440 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=525655 +pkt_pos=525677 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -278,7 +278,7 @@ dts_time=0.069660 duration=1024 duration_time=0.023220 size=2048 -pos=527726 +pos=527748 flags=K_ [packets_and_frames.frame.7] @@ -293,7 +293,7 @@ best_effort_timestamp=3072 best_effort_timestamp_time=0.069660 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=527726 +pkt_pos=527748 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -310,7 +310,7 @@ dts_time=0.080000 duration=2048 duration_time=0.040000 size=230400 -pos=529804 +pos=529826 flags=K_ [packets_and_frames.frame.8] @@ -325,7 +325,7 @@ best_effort_timestamp=4096 best_effort_timestamp_time=0.080000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=529804 +pkt_pos=529826 pkt_size=230400 width=320 height=240 @@ -353,7 +353,7 @@ dts_time=0.080000 duration=2048 duration_time=0.040000 size=30000 -pos=760228 +pos=760250 flags=K_ [packets_and_frames.frame.9] @@ -368,7 +368,7 @@ best_effort_timestamp=4096 best_effort_timestamp_time=0.080000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=760228 +pkt_pos=760250 pkt_size=30000 width=100 height=100 @@ -396,7 +396,7 @@ dts_time=0.092880 duration=1024 duration_time=0.023220 size=2048 -pos=790233 +pos=790255 flags=K_ [packets_and_frames.frame.10] @@ -411,7 +411,7 @@ best_effort_timestamp=4096 best_effort_timestamp_time=0.092880 pkt_duration=1024 pkt_duration_time=0.023220 -pkt_pos=790233 +pkt_pos=790255 pkt_size=2048 sample_fmt=s16 nb_samples=1024 @@ -428,7 +428,7 @@ dts_time=0.116100 duration=393 duration_time=0.008912 size=786 -pos=792304 +pos=792326 flags=K_ [packets_and_frames.frame.11] @@ -443,7 +443,7 @@ best_effort_timestamp=5120 best_effort_timestamp_time=0.116100 pkt_duration=393 pkt_duration_time=0.008912 -pkt_pos=792304 +pkt_pos=792326 pkt_size=786 sample_fmt=s16 nb_samples=393 @@ -460,7 +460,7 @@ dts_time=0.120000 duration=2048 duration_time=0.040000 size=230400 -pos=793120 +pos=793142 flags=K_ [packets_and_frames.frame.12] @@ -475,7 +475,7 @@ best_effort_timestamp=6144 best_effort_timestamp_time=0.120000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=793120 +pkt_pos=793142 pkt_size=230400 width=320 height=240 @@ -503,7 +503,7 @@ dts_time=0.120000 duration=2048 duration_time=0.040000 size=30000 -pos=1023544 +pos=1023566 flags=K_ [packets_and_frames.frame.13] @@ -518,7 +518,7 @@ best_effort_timestamp=6144 best_effort_timestamp_time=0.120000 pkt_duration=2048 pkt_duration_time=0.040000 -pkt_pos=1023544 +pkt_pos=1023566 pkt_size=30000 width=100 height=100 @@ -627,7 +627,7 @@ nb_read_frames=4 nb_read_packets=4 [streams.stream.1.disposition] -default=0 +default=1 dub=0 original=0 comment=0 @@ -719,8 +719,8 @@ nb_programs=0 format_name=nut start_time=0.000000 duration=0.120000 -size=1053624 -bit_rate=70241600 +size=1053646 +bit_rate=70243066 probe_score=100 [format.tags] diff --git a/tests/ref/fate/ffprobe_json b/tests/ref/fate/ffprobe_json index a94776030b..9816700b53 100644 --- a/tests/ref/fate/ffprobe_json +++ b/tests/ref/fate/ffprobe_json @@ -11,7 +11,7 @@ "duration": 1024, "duration_time": "0.023220", "size": "2048", - "pos": "647", + "pos": "669", "flags": "K_" }, { @@ -27,7 +27,7 @@ "best_effort_timestamp_time": "0.000000", "pkt_duration": 1024, "pkt_duration_time": "0.023220", - "pkt_pos": "647", + "pkt_pos": "669", "pkt_size": "2048", "sample_fmt": "s16", "nb_samples": 1024, @@ -44,7 +44,7 @@ "duration": 2048, "duration_time": "0.040000", "size": "230400", - "pos": "2722", + "pos": "2744", "flags": "K_" }, { @@ -60,7 +60,7 @@ "best_effort_timestamp_time": "0.000000", "pkt_duration": 2048, "pkt_duration_time": "0.040000", - "pkt_pos": "2722", + "pkt_pos": "2744", "pkt_size": "230400", "width": 320, "height": 240, @@ -84,7 +84,7 @@ "duration": 2048, "duration_time": "0.040000", "size": "30000", - "pos": "233143", + "pos": "233165", "flags": "K_" }, { @@ -100,7 +100,7 @@ "best_effort_timestamp_time": "0.000000", "pkt_duration": 2048, "pkt_duration_time": "0.040000", - "pkt_pos": "233143", + "pkt_pos": "233165", "pkt_size": "30000", "width": 100, "height": 100, @@ -124,7 +124,7 @@ "duration": 1024, "duration_time": "0.023220", "size": "2048", - "pos": "263148", + "pos": "263170", "flags": "K_" }, { @@ -140,7 +140,7 @@ "best_effort_timestamp_time": "0.023220", "pkt_duration": 1024, "pkt_duration_time": "0.023220", - "pkt_pos": "263148", + "pkt_pos": "263170", "pkt_size": "2048", "sample_fmt": "s16", "nb_samples": 1024, @@ -157,7 +157,7 @@ "duration": 2048, "duration_time": "0.040000", "size": "230400", - "pos": "265226", + "pos": "265248", "flags": "K_" }, { @@ -173,7 +173,7 @@ "best_effort_timestamp_time": "0.040000", "pkt_duration": 2048, "pkt_duration_time": "0.040000", - "pkt_pos": "265226", + "pkt_pos": "265248", "pkt_size": "230400", "width": 320, "height": 240, @@ -197,7 +197,7 @@ "duration": 2048, "duration_time": "0.040000", "size": "30000", - "pos": "495650", + "pos": "495672", "flags": "K_" }, { @@ -213,7 +213,7 @@ "best_effort_timestamp_time": "0.040000", "pkt_duration": 2048, "pkt_duration_time": "0.040000", - "pkt_pos": "495650", + "pkt_pos": "495672", "pkt_size": "30000", "width": 100, "height": 100, @@ -237,7 +237,7 @@ "duration": 1024, "duration_time": "0.023220", "size": "2048", - "pos": "525655", + "pos": "525677", "flags": "K_" }, { @@ -253,7 +253,7 @@ "best_effort_timestamp_time": "0.046440", "pkt_duration": 1024, "pkt_duration_time": "0.023220", - "pkt_pos": "525655", + "pkt_pos": "525677", "pkt_size": "2048", "sample_fmt": "s16", "nb_samples": 1024, @@ -270,7 +270,7 @@ "duration": 1024, "duration_time": "0.023220", "size": "2048", - "pos": "527726", + "pos": "527748", "flags": "K_" }, { @@ -286,7 +286,7 @@ "best_effort_timestamp_time": "0.069660", "pkt_duration": 1024, "pkt_duration_time": "0.023220", - "pkt_pos": "527726", + "pkt_pos": "527748", "pkt_size": "2048", "sample_fmt": "s16", "nb_samples": 1024, @@ -303,7 +303,7 @@ "duration": 2048, "duration_time": "0.040000", "size": "230400", - "pos": "529804", + "pos": "529826", "flags": "K_" }, { @@ -319,7 +319,7 @@ "best_effort_timestamp_time": "0.080000", "pkt_duration": 2048, "pkt_duration_time": "0.040000", - "pkt_pos": "529804", + "pkt_pos": "529826", "pkt_size": "230400", "width": 320, "height": 240, @@ -343,7 +343,7 @@ "duration": 2048, "duration_time": "0.040000", "size": "30000", - "pos": "760228", + "pos": "760250", "flags": "K_" }, { @@ -359,7 +359,7 @@ "best_effort_timestamp_time": "0.080000", "pkt_duration": 2048, "pkt_duration_time": "0.040000", - "pkt_pos": "760228", + "pkt_pos": "760250", "pkt_size": "30000", "width": 100, "height": 100, @@ -383,7 +383,7 @@ "duration": 1024, "duration_time": "0.023220", "size": "2048", - "pos": "790233", + "pos": "790255", "flags": "K_" }, { @@ -399,7 +399,7 @@ "best_effort_timestamp_time": "0.092880", "pkt_duration": 1024, "pkt_duration_time": "0.023220", - "pkt_pos": "790233", + "pkt_pos": "790255", "pkt_size": "2048", "sample_fmt": "s16", "nb_samples": 1024, @@ -416,7 +416,7 @@ "duration": 393, "duration_time": "0.008912", "size": "786", - "pos": "792304", + "pos": "792326", "flags": "K_" }, { @@ -432,7 +432,7 @@ "best_effort_timestamp_time": "0.116100", "pkt_duration": 393, "pkt_duration_time": "0.008912", - "pkt_pos": "792304", + "pkt_pos": "792326", "pkt_size": "786", "sample_fmt": "s16", "nb_samples": 393, @@ -449,7 +449,7 @@ "duration": 2048, "duration_time": "0.040000", "size": "230400", - "pos": "793120", + "pos": "793142", "flags": "K_" }, { @@ -465,7 +465,7 @@ "best_effort_timestamp_time": "0.120000", "pkt_duration": 2048, "pkt_duration_time": "0.040000", - "pkt_pos": "793120", + "pkt_pos": "793142", "pkt_size": "230400", "width": 320, "height": 240, @@ -489,7 +489,7 @@ "duration": 2048, "duration_time": "0.040000", "size": "30000", - "pos": "1023544", + "pos": "1023566", "flags": "K_" }, { @@ -505,7 +505,7 @@ "best_effort_timestamp_time": "0.120000", "pkt_duration": 2048, "pkt_duration_time": "0.040000", - "pkt_pos": "1023544", + "pkt_pos": "1023566", "pkt_size": "30000", "width": 100, "height": 100, @@ -588,7 +588,7 @@ "nb_read_frames": "4", "nb_read_packets": "4", "disposition": { - "default": 0, + "default": 1, "dub": 0, "original": 0, "comment": 0, @@ -668,8 +668,8 @@ "format_name": "nut", "start_time": "0.000000", "duration": "0.120000", - "size": "1053624", - "bit_rate": "70241600", + "size": "1053646", + "bit_rate": "70243066", "probe_score": 100, "tags": { "title": "ffprobe test file", diff --git a/tests/ref/fate/ffprobe_xml b/tests/ref/fate/ffprobe_xml index 88623f0e11..4f702bc984 100644 --- a/tests/ref/fate/ffprobe_xml +++ b/tests/ref/fate/ffprobe_xml @@ -1,34 +1,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -38,7 +38,7 @@ - + @@ -49,7 +49,7 @@ - + diff --git a/tests/ref/fate/ffprobe_xsd b/tests/ref/fate/ffprobe_xsd index c4a6bf86d2..62d011ad9c 100644 --- a/tests/ref/fate/ffprobe_xsd +++ b/tests/ref/fate/ffprobe_xsd @@ -1,34 +1,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -38,7 +38,7 @@ - + @@ -49,7 +49,7 @@ - + diff --git a/tests/ref/fate/matroska-mastering-display-metadata b/tests/ref/fate/matroska-mastering-display-metadata index 627a8c103e..8f5d7b6a22 100644 --- a/tests/ref/fate/matroska-mastering-display-metadata +++ b/tests/ref/fate/matroska-mastering-display-metadata @@ -1,5 +1,5 @@ -4f97d718f706e241df9f6c95ac1c721a *tests/data/fate/matroska-mastering-display-metadata.matroska -1669701 tests/data/fate/matroska-mastering-display-metadata.matroska +542ababe5c088ab925ee49373d8b8a85 *tests/data/fate/matroska-mastering-display-metadata.matroska +1669695 tests/data/fate/matroska-mastering-display-metadata.matroska #extradata 0: 4, 0x040901a3 #extradata 3: 200, 0x506463a8 #tb 0: 1/1000