From: Vignesh Venkatasubramanian <vigneshv-at-google.com@ffmpeg.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] avformat/mov: Only read the primary item for AVIF Date: Fri, 10 Jun 2022 10:37:23 -0700 Message-ID: <CAOJaEPKAgBE7q0Y1Wz7YVzNCFshHw0qM6sq=q0TxoboCK7MzKA@mail.gmail.com> (raw) In-Reply-To: <DB6PR0101MB221470090792F185E3D2B92B8FA69@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> On Fri, Jun 10, 2022 at 10:33 AM Andreas Rheinhardt <andreas.rheinhardt@outlook.com> wrote: > > Vignesh Venkatasubramanian: > > Update the still AVIF parser to only read the primary item. With this > > patch, AVIF still images with exif/icc/alpha channel will no longer > > fail to parse. > > > > For example, this patch enables parsing of files in: > > https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Microsoft > > > > Adding two fate tests: > > 1) demuxing of still image with 1 item - this test will pass regardlesss > > of this patch. > > 2) demuxing of still image with 2 items - this test will fail without > > this patch and will pass with patch applied. > > > > Partially fixes trac ticket #7621 > > > > Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> > > --- > > libavformat/isom.h | 1 + > > libavformat/mov.c | 41 ++++++++++--------- > > tests/fate/mov.mak | 9 ++++ > > .../fate/mov-avif-demux-still-image-1-item | 11 +++++ > > .../mov-avif-demux-still-image-multiple-items | 11 +++++ > > 5 files changed, 53 insertions(+), 20 deletions(-) > > create mode 100644 tests/ref/fate/mov-avif-demux-still-image-1-item > > create mode 100644 tests/ref/fate/mov-avif-demux-still-image-multiple-items > > > > diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak > > index 2fae054423..842c7f9aa1 100644 > > --- a/tests/fate/mov.mak > > +++ b/tests/fate/mov.mak > > @@ -17,6 +17,8 @@ FATE_MOV = fate-mov-3elist \ > > fate-mov-bbi-elst-starts-b \ > > fate-mov-neg-firstpts-discard-frames \ > > fate-mov-stream-shorter-than-movie \ > > + fate-mov-avif-demux-still-image-1-item \ > > + fate-mov-avif-demux-still-image-multiple-items \ > > > > FATE_MOV_FFPROBE = fate-mov-neg-firstpts-discard \ > > fate-mov-neg-firstpts-discard-vorbis \ > > @@ -138,6 +140,13 @@ FATE_MOV_FFMPEG_FFPROBE-$(call TRANSCODE, TTML SUBRIP, MP4 MOV, SRT_DEMUXER TTML > > fate-mov-mp4-ttml-stpp: CMD = transcode srt $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt mp4 "-map 0:s -c:s ttml -time_base:s 1:1000" "-map 0 -c copy" "-of json -show_entries packet:stream=index,codec_type,codec_tag_string,codec_tag,codec_name,time_base,start_time,duration_ts,duration,nb_frames,nb_read_packets:stream_tags" > > fate-mov-mp4-ttml-dfxp: CMD = transcode srt $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt mp4 "-map 0:s -c:s ttml -time_base:s 1:1000 -tag:s dfxp -strict unofficial" "-map 0 -c copy" "-of json -show_entries packet:stream=index,codec_type,codec_tag_string,codec_tag,codec_name,time_base,start_time,duration_ts,duration,nb_frames,nb_read_packets:stream_tags" > > > > +# avif demuxing - still image with 1 item. > > +fate-mov-avif-demux-still-image-1-item: CMD = framemd5 -i $(TARGET_SAMPLES)/avif/still_image.avif -c:v copy > > + > > +# avif demuxing - still image with multiple items. only the primary item will be > > +# parsed. > > +fate-mov-avif-demux-still-image-multiple-items: CMD = framemd5 -i $(TARGET_SAMPLES)/avif/still_image_exif.avif -c:v copy > > Can we create such files with our muxer? In this case one could use a > remux test, i.e. a test that creates the file and the demuxes the just > created file. > Unfortunately, the file with exif cannot be created using the ffmpeg's muxer as of now. So we will have to get that externally (i made that with MP4Box). The other still image file however can be creating using our muxer. I will add another test that does remuxing for the 1-item case in a separate patch if that's alright (since it's not directly related to what this patch is doing). I was also going to add some fate tests for animated AVIF muxing/parsing, so i will include that in the other patch as well. > > + > > # Resulting remux should have: > > # 1. first audio stream with AV_DISPOSITION_HEARING_IMPAIRED > > # 2. second audio stream with AV_DISPOSITION_VISUAL_IMPAIRED | DESCRIPTIONS > > diff --git a/tests/ref/fate/mov-avif-demux-still-image-1-item b/tests/ref/fate/mov-avif-demux-still-image-1-item > > new file mode 100644 > > index 0000000000..93773afd4e > > --- /dev/null > > +++ b/tests/ref/fate/mov-avif-demux-still-image-1-item > > @@ -0,0 +1,11 @@ > > +#format: frame checksums > > +#version: 2 > > +#hash: MD5 > > +#extradata 0, 13, b52ae298d37128862ef1918cf916239c > > +#tb 0: 1/1 > > +#media_type 0: video > > +#codec_id 0: av1 > > +#dimensions 0: 352x288 > > +#sar 0: 1/1 > > +#stream#, dts, pts, duration, size, hash > > +0, 0, 0, 1, 36265, 235b0c6e389c4084845981e08d60db04 > > diff --git a/tests/ref/fate/mov-avif-demux-still-image-multiple-items b/tests/ref/fate/mov-avif-demux-still-image-multiple-items > > new file mode 100644 > > index 0000000000..93773afd4e > > --- /dev/null > > +++ b/tests/ref/fate/mov-avif-demux-still-image-multiple-items > > @@ -0,0 +1,11 @@ > > +#format: frame checksums > > +#version: 2 > > +#hash: MD5 > > +#extradata 0, 13, b52ae298d37128862ef1918cf916239c > > +#tb 0: 1/1 > > +#media_type 0: video > > +#codec_id 0: av1 > > +#dimensions 0: 352x288 > > +#sar 0: 1/1 > > +#stream#, dts, pts, duration, size, hash > > +0, 0, 0, 1, 36265, 235b0c6e389c4084845981e08d60db04 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". -- Vignesh _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-06-10 17:37 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-24 18:35 Vignesh Venkatasubramanian 2022-05-02 21:39 ` Vignesh Venkatasubramanian 2022-05-09 16:32 ` Vignesh Venkatasubramanian 2022-05-16 16:59 ` Vignesh Venkatasubramanian 2022-05-19 16:13 ` Vignesh Venkatasubramanian 2022-05-31 19:11 ` Vignesh Venkatasubramanian 2022-06-01 17:30 ` James Zern 2022-06-01 20:38 ` Vignesh Venkatasubramanian 2022-06-02 20:34 ` James Zern 2022-06-08 17:21 ` Vignesh Venkatasubramanian 2022-06-09 7:50 ` Gyan Doshi 2022-06-10 17:30 ` Vignesh Venkatasubramanian 2022-06-10 17:33 ` Andreas Rheinhardt 2022-06-10 17:37 ` Vignesh Venkatasubramanian [this message] 2022-06-10 17:34 ` Vignesh Venkatasubramanian 2022-06-13 16:32 ` Vignesh Venkatasubramanian 2022-06-21 17:12 ` Vignesh Venkatasubramanian 2022-06-27 16:44 ` Vignesh Venkatasubramanian 2022-06-28 18:21 ` James Zern 2022-06-28 18:56 ` Vignesh Venkatasubramanian 2022-06-28 19:02 ` James Zern 2022-06-29 19:20 ` James Zern 2022-06-28 18:58 ` Vignesh Venkatasubramanian
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAOJaEPKAgBE7q0Y1Wz7YVzNCFshHw0qM6sq=q0TxoboCK7MzKA@mail.gmail.com' \ --to=vigneshv-at-google.com@ffmpeg.org \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git