From patchwork Fri Aug 20 11:42:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan Doshi X-Patchwork-Id: 29635 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1179033iov; Fri, 20 Aug 2021 04:43:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQrQOE7jUbDmToouTCXIlWuk8UC3EPx/nqCZlYo4FTn/iFNF8dbrBqQhRuOh1/Hde6vAvp X-Received: by 2002:a17:906:5855:: with SMTP id h21mr20495185ejs.230.1629459820264; Fri, 20 Aug 2021 04:43:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629459820; cv=none; d=google.com; s=arc-20160816; b=Y3fW9jQA4YP1bYLBPvGYJB3gDkLS83zREvw2WT9/KHrzpx90moG9iXe7hyH2R4GkL0 yAxrbxUrN6OUmyqy0PwnpHfy7ogPpWr1CLW4njtF0rG2J4F44UCH/P5mPHu7kmTPQJm/ VgIfAvpFOL1zJhTPhFvSy6QxqkNLOXs5F4LLU6T7Pl09HdcJubDUDL21LfoBXnISucXc T91lsvMaUFWUYuojKA12Q9nlIsMuXIBaMMfXKZTmprTqxMAwEn9XUftRVJFEXQINnGCF OfhaIs9NnD5fil9VSxoTSFsi9D4ahBtRn1Bj6Vaf1BY/905cjvOFJ+T28aVsFlnDhbik pubA== 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=mBA3AXjicFu/vjy4GKqJH91o3FXR5tp/Uyo/XPV4l6g=; b=s/EfGDnCvzdZ/3DffI6p/NqnnRgghg0z3i40EwJ34oDZFQTIBMlUyCAR9UhbU7bWM4 v7lMu7n+YbpcI5hBCM/GpCzjzESod1r3h0RaDaLWZWjInCMx4p1vU9xU0Hwi9eq1Rvm2 J9RnA/m6GMyjPjw8y3On7QFmLlV6eR/BrS4mq2Lv2ZvDwoO3Vdk1jiMwnnMvTw9uhnzQ bnWOLyTZ+3icSS21o83rZa6BUQkgMpJZaLId8SUIv//HuKYoo+LNGJjwblI32NXOR+qR 5bMI8VT9n0Bzl1cTnVxvSg41/sFWZVBhLst9ISD50bBNJhn+uiO8lt38FRB1QYdSztnC 3jEw== 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 d26si5999249edy.388.2021.08.20.04.43.34; Fri, 20 Aug 2021 04:43:40 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6338568A199; Fri, 20 Aug 2021 14:43:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 57282680C0A for ; Fri, 20 Aug 2021 14:43:23 +0300 (EEST) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4GrfsQ6jlfzQkBg for ; Fri, 20 Aug 2021 13:43:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id 0iB7BcEe8R2G for ; Fri, 20 Aug 2021 13:43:19 +0200 (CEST) From: Gyan Doshi To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 Aug 2021 17:12:52 +0530 Message-Id: <20210820114252.7058-1-ffmpeg@gyani.pro> MIME-Version: 1.0 X-Rspamd-Queue-Id: 1E6E318BF X-Rspamd-UID: 4a0af2 Subject: [FFmpeg-devel] [PATCH] avformat/mov: add AVFMT_SHOW_IDS flag 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: ytTJQpREvGwr The MOV muxer can store streamids as track ids but they aren't visible when probing the result via lavf/dump or ffprobe due to lack of this flag in the demuxer. --- libavformat/mov.c | 2 +- tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov | 2 +- tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov | 2 +- tests/ref/fate/mov-zombie | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) ons=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:creation_time=2008-05-12T20:59:27.000000Z|tag:language=eng|tag:handler_name=Apple Video Media Handler|tag:vendor_id=appl|tag:encoder=H.264 side_data|side_data_type=Display Matrix|displaymatrix=\n00000000: 131072 0 0\n00000001: 0 65536 0\n00000002: 0 0 1073741824\n|rotation=0 diff --git a/libavformat/mov.c b/libavformat/mov.c index 46bc7b5aa3..c556390525 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8216,5 +8216,5 @@ const AVInputFormat ff_mov_demuxer = { .read_packet = mov_read_packet, .read_close = mov_read_close, .read_seek = mov_read_seek, - .flags = AVFMT_NO_BYTE_SEEK | AVFMT_SEEK_TO_PTS, + .flags = AVFMT_NO_BYTE_SEEK | AVFMT_SEEK_TO_PTS | AVFMT_SHOW_IDS, }; diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov index 4ef569df89..8d21c396fc 100644 --- a/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov @@ -36,7 +36,7 @@ color_primaries=unknown chroma_location=unspecified field_order=unknown refs=1 -id=N/A +id=0x1 r_frame_rate=25/1 avg_frame_rate=25/1 time_base=1/12800 diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov index 70e7cdc943..6f1f7c543f 100644 --- a/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov @@ -36,7 +36,7 @@ color_primaries=unknown chroma_location=unspecified field_order=unknown refs=1 -id=N/A +id=0x1 r_frame_rate=25/1 avg_frame_rate=25/1 time_base=1/12800 diff --git a/tests/ref/fate/mov-zombie b/tests/ref/fate/mov-zombie index 6e6d43d563..b6656de744 100644 --- a/tests/ref/fate/mov-zombie +++ b/tests/ref/fate/mov-zombie @@ -194,5 +194,5 @@ frame|media_type=video|stream_index=0|key_frame=0|pts=188623|pts_time=2.095811|p packet|codec_type=video|stream_index=0|pts=197632|pts_time=2.195911|dts=191625|dts_time=2.129167|duration=3003|duration_time=0.033367|size=580|pos=101820|flags=__ frame|media_type=video|stream_index=0|key_frame=0|pts=191626|pts_time=2.129178|pkt_dts=N/A|pkt_dts_time=N/A|best_effort_timestamp=191626|best_effort_timestamp_time=2.129178|pkt_duration=3003|pkt_duration_time=0.033367|pkt_pos=99180|pkt_size=1666|width=160|height=240|pix_fmt=yuv420p|sample_aspect_ratio=2:1|pict_type=P|coded_picture_number=63|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=tv|color_space=smpte170m|color_primaries=smpte170m|color_transfer=bt709|chroma_location=topleftside_data|side_data_type=H.26[45] User Data Unregistered SEI message -stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|closed_captions=0|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=unknown|refs=2|is_avc=true|nal_length_size=4|id=N/A|r_frame_rate=30000/1001|avg_frame_rate=6372000/212521|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=2125200|duration=23.613333|bit_rate=333874|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=708|nb_read_frames=65|nb_read_packets=66|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:capti ons=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:creation_time=2008-05-12T20:59:27.000000Z|tag:language=eng|tag:handler_name=Apple Video Media Handler|tag:vendor_id=appl|tag:encoder=H.264 +stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|closed_captions=0|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=unknown|refs=2|is_avc=true|nal_length_size=4|id=0x1|r_frame_rate=30000/1001|avg_frame_rate=6372000/212521|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=2125200|duration=23.613333|bit_rate=333874|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=708|nb_read_frames=65|nb_read_packets=66|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:capti