[FFmpeg-devel] [PATCH v3 2/2] avformat/mux: Set AV_PKT_FLAG_KEY for is_intra_only packet

Limin Wang lance.lmwang at gmail.com
Tue Apr 21 17:42:42 EEST 2020


On Tue, Apr 21, 2020 at 05:34:09PM +0300, Jan Ekström wrote:
> On Tue, Apr 21, 2020 at 5:19 PM Limin Wang <lance.lmwang at gmail.com> wrote:
> >
> > On Tue, Apr 21, 2020 at 04:52:16PM +0300, Jan Ekström wrote:
> > > On Tue, Apr 21, 2020 at 4:19 PM Limin Wang <lance.lmwang at gmail.com> wrote:
> > > >
> > > > On Tue, Apr 21, 2020 at 01:08:05PM +0200, Nicolas George wrote:
> > > > > Limin Wang (12020-04-21):
> > > > > > OK, below is the commit log, please help to review whether it's your expected log:
> > > > > >
> > > > > > NOTE about the testing effect:
> > > > > > subtitle packet will be marked as keyframe, it'll change below testing reference
> > > > > > files:
> > > > > > tests/ref/fate/binsub-movtextenc and tests/ref/fate/sub2video
> > > > > >
> > > > > > audio packet will be marked as keyframe, it'll change below testing reference file
> > > > > > tests/ref/fate/movenc
> > > > >
> > > > > You are writing in the future tense, meaning you are making a
> > > > > prediction.
> > > > >
> > > > > You need to explain what you did, and the results. For example, did you
> > > > > re-run the tests with -w, as suggested in
> > > > > https://ffmpeg.org/pipermail/ffmpeg-devel/2020-April/260837.html
> > > > > to examine the files before and after the change?
> > > >
> > > > I have checked with one of non-empty-moov.mp4, and have observed one byte difference
> > > > only(02 and 01).  I haven't tool to dump every box in detail. If you think it's necessary,
> > > > I can looked at the movenc muxer further and figure out which field it's.
> > > >
> > > > [lmwang at vpn ffmpeg]$ hexdump -C non-empty-moov.mp4 > non-empty-moov.hex
> > > > [lmwang at vpn ffmpeg]$ hexdump -C non-empty-moov1.mp4 > non-empty-moov1.hex
> > > > [lmwang at vpn ffmpeg]$ diff non-empty-moov.hex non-empty-moov1.hex
> > > > 162c162
> > > > < 00000a10  08 02 00 00 00 00 00 00  14 74 66 64 74 01 00 00  |.........tfdt...|
> > > > ---
> > > > > 00000a10  08 01 01 00 00 00 00 00  14 74 66 64 74 01 00 00  |.........tfdt...|
> > > >
> > >
> > > As noted elsewhere before in a related thread, L-SMASH's
> > > (https://github.com/l-smash/l-smash) boxdumper is a nice tool to get a
> > > text representation of MOV/MP4/etc boxes. utilize the --box parameter
> > > and dump stdout to a file. Then you can diff -u or otherwise.
> > Thanks, I'll try to build the tool to use. By the ffmpeg trace log, the
> > difference is frag flags of tfhd:
> >
> > [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2ff02c0] type:'tfhd' parent:'traf' sz: 36 8 76
> > [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2ff02c0] frag flags 0x1010000
> >
> >
> > [mov,mp4,m4a,3gp,3g2,mj2 @ 0x295c2c0] type:'tfhd' parent:'traf' sz: 36 8 76
> > [mov,mp4,m4a,3gp,3g2,mj2 @ 0x295c2c0] frag flags 0x2000000
> >
> 
> If I recall correctly, boxdumper will give you what these flags mean
> in a more readable manner.

Yes, I have download and build it, below is the different result. For audio packet
is set as keyframe, so it'll look as sync sample.

[lmwang at vpn ffmpeg]$ ../l-smash/cli/boxdumper --box non-empty-moov.mp4  > non-empty-moov.box
[lmwang at vpn ffmpeg]$ ../l-smash/cli/boxdumper --box non-empty-moov1.mp4  > non-empty-moov1.box
[lmwang at vpn ffmpeg]$ diff -u non-empty-moov.box non-empty-moov1.box
--- non-empty-moov.box  2020-04-21 22:39:30.502512430 +0800
+++ non-empty-moov1.box 2020-04-21 22:39:43.992870378 +0800
@@ -661,9 +661,9 @@
                 base_data_offset = 2425
                 default_sample_duration = 1024
                 default_sample_size = 8
-                default_sample_flags = 0x02000000
-                    independent
-                    sync sample
+                default_sample_flags = 0x01010000
+                    dependent
+                    non-sync sample
                     degradation_priority = 0
             [tfdt: Track Fragment Base Media Decode Time Box]
                 position = 2581


> 
> Jan
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list