[FFmpeg-devel] [PATCH 2/2] avformat/movenc: Support merging h264 fields into field pairs

Michael Niedermayer michaelni at gmx.at
Thu Mar 13 02:50:12 CET 2014


On Tue, Mar 11, 2014 at 12:07:28PM +0900, Yusuke Nakamura wrote:
> 2014-03-11 10:59 GMT+09:00 Michael Niedermayer <michaelni at gmx.at>:
> 
> > On Tue, Mar 11, 2014 at 05:07:00AM +0900, Yusuke Nakamura wrote:
> > > 2014-03-10 20:15 GMT+09:00 Michael Niedermayer <michaelni at gmx.at>:
> > >
> > > > On Mon, Mar 10, 2014 at 01:18:16PM +0900, Yusuke Nakamura wrote:
> > > > > 2014-03-10 12:48 GMT+09:00 Timothy Gu <timothygu99 at gmail.com>:
> > > > >
> > > > > > On Mar 9, 2014 6:59 PM, "Michael Niedermayer" <michaelni at gmx.at>
> > > > wrote:
> > > > > > >
> > > > > > > Fixes Ticket3393
> > > > > > >
> > > > > > > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > > > > > > ---
> > > > > > >  libavformat/movenc.c |   12 ++++++++++++
> > > > > > >  libavformat/movenc.h |    3 +++
> > > > > > >  2 files changed, 15 insertions(+)
> > > > > >
> > > > > > Missing documentation:
> > > > > >
> > > > > > Set to 1 merge field pairs into one packet. This option is only
> > valid
> > > > for
> > > > > > H.264 codec. If the codec is not H.264, then this option would be
> > > > silently
> > > > > > ignored.
> > > > > >
> > > > > > Also I wonder if it's a good idea to print a warning if this
> > option is
> > > > set
> > > > > > but codec isn't H.264.
> > > > > >
> > > > > > Does this work with stream copying? If so, then more documentation
> > is
> > > > > > needed.
> > > > > >
> > > > > > How about HEVC?
> > > > > >
> > > > > > [...]
> > > > > >
> > > > > > Timothy
> > > > > > _______________________________________________
> > > > > > ffmpeg-devel mailing list
> > > > > > ffmpeg-devel at ffmpeg.org
> > > > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > > > > >
> > > > >
> > > > > WTF!?
> > > > >
> > > > > This patch allows to generate files which violate 14496-15.
> > > > > According to 14496-15, a sample is an access unit.
> > > > > An access unit can contain only one primary coded picture.
> > > > >
> > > > > What spec allows this?
> > > >
> > > > The quicktime spec probably does allow it. At least i dont see
> > > > anything in it that would disallow it.
> > > >
> > > > And AFAIK some encoders like mainconcept use it, i dont have that
> > > > encoder so my knowledge here is based on people who do ...
> > > >
> > > > Do you object to this patch or have suggestions on how it can be
> > > > improved ?
> > > >
> > > > [...]
> > > > --
> > > > Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> > > >
> > > > No great genius has ever existed without some touch of madness. --
> > > > Aristotle
> > > >
> > > > _______________________________________________
> > > > ffmpeg-devel mailing list
> > > > ffmpeg-devel at ffmpeg.org
> > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > > >
> > > >
> > > I object to this patch unless any spec of derived file format based on
> > > 14496-12 or quicktime allows it.
> >
> > quicktime probably allows it, in the sense that qt probably allows
> > anything
> >
> >
> A possibility gives no guarantee.
> 
> I don't think qt allows anything.

> Even so, I think there shall be something to indicate that a pair of two
> field coded pictures is in a sample.

I would have hoped that too but iam not aware of anything like that
also if you want to take a look at the files yourself, just say so

mp4box -v shows this for one of the files:

[iso file] Read Box type ftyp size 28 start 0
[iso file] Read Box type moov size 3646 start 28
[iso file] Read Box type mvhd size 108 start 36
[iso file] Read Box type trak size 1191 start 144
[iso file] Read Box type tkhd size 92 start 152
[iso file] Read Box type mdia size 1091 start 244
[iso file] Read Box type mdhd size 32 start 252
[iso file] Read Box type hdlr size 37 start 284
[iso file] Read Box type minf size 1014 start 321
[iso file] Read Box type smhd size 16 start 329
[iso file] Read Box type dinf size 36 start 345
[iso file] Read Box type dref size 28 start 353
[iso file] Read Box type url  size 12 start 369
[iso file] Read Box type stbl size 954 start 381
[iso file] Read Box type stsd size 106 start 389
[iso file] Read Box type mp4a size 90 start 405
[iso file] Read Box type esds size 54 start 441
[iso file] Read Box type stts size 64 start 495
[iso file] Read Box type stsc size 28 start 559
[iso file] Read Box type stsz size 376 start 587
[iso file] Read Box type stco size 372 start 963
[iso file] Read Box type trak size 1260 start 1335
[iso file] Read Box type tkhd size 92 start 1343
[iso file] Read Box type mdia size 1160 start 1435
[iso file] Read Box type mdhd size 32 start 1443
[iso file] Read Box type hdlr size 37 start 1475
[iso file] Read Box type minf size 1083 start 1512
[iso file] Read Box type vmhd size 20 start 1520
[iso file] Read Box type dinf size 36 start 1540
[iso file] Read Box type dref size 28 start 1548
[iso file] Read Box type url  size 12 start 1564
[iso file] Read Box type stbl size 1019 start 1576
[iso file] Read Box type stsd size 187 start 1584
[iso file] Read Box type avc1 size 171 start 1600
[iso file] Read Box type avcC size 57 start 1686
[iso file] Read Box type uuid size 28 start 1743
[iso file] Read Box type stts size 24 start 1771
[iso file] Read Box type ctts size 296 start 1795
[iso file] Read Box type stsc size 28 start 2091
[iso file] Read Box type stsz size 228 start 2119
[iso file] Read Box type stco size 224 start 2347
[iso file] Read Box type stss size 24 start 2571
[iso file] Read Box type iods size 42 start 2595
[iso file] Read Box type udta size 187 start 2637
[iso file] Read Box type meta size 179 start 2645
[iso file] Read Box type hdlr size 33 start 2657
[iso file] Read Box type ilst size 134 start 2690
[iso file] Read Box type cpil size 25 start 2698
[iso file] Read Box type data size 17 start 2706
[iso file] Read Box type tmpo size 26 start 2723
[iso file] Read Box type data size 18 start 2731
[iso file] Read Box type .too size 40 start 2749
[iso file] Read Box type data size 32 start 2757
[iso file] Read Box type .cmt size 35 start 2789
[iso file] Read Box type data size 27 start 2797
[iso file] Read Box type trak size 417 start 2824
[iso file] Read Box type tkhd size 92 start 2832
[iso file] Read Box type mdia size 317 start 2924
[iso file] Read Box type mdhd size 32 start 2932
[iso file] Read Box type hdlr size 37 start 2964
[iso file] Read Box type minf size 240 start 3001
[iso file] Read Box type nmhd size 12 start 3009
[iso file] Read Box type dinf size 36 start 3021
[iso file] Read Box type dref size 28 start 3029
[iso file] Read Box type url  size 12 start 3045
[iso file] Read Box type stbl size 184 start 3057
[iso file] Read Box type stsd size 84 start 3065
[iso file] Read Box type mp4s size 68 start 3081
[iso file] Read Box type esds size 52 start 3097
[iso file] Read Box type stts size 24 start 3149
[iso file] Read Box type stsc size 28 start 3173
[iso file] Read Box type stsz size 20 start 3201
[iso file] Read Box type stco size 20 start 3221
[iso file] Read Box type trak size 433 start 3241
[iso file] Read Box type tkhd size 92 start 3249
[iso file] Read Box type mdia size 309 start 3341
[iso file] Read Box type mdhd size 32 start 3349
[iso file] Read Box type hdlr size 37 start 3381
[iso file] Read Box type minf size 232 start 3418
[iso file] Read Box type nmhd size 12 start 3426
[iso file] Read Box type dinf size 36 start 3438
[iso file] Read Box type dref size 28 start 3446
[iso file] Read Box type url  size 12 start 3462
[iso file] Read Box type stbl size 176 start 3474
[iso file] Read Box type stsd size 76 start 3482
[iso file] Read Box type mp4s size 60 start 3498
[iso file] Read Box type esds size 44 start 3514
[iso file] Read Box type stts size 24 start 3558
[iso file] Read Box type stsc size 28 start 3582
[iso file] Read Box type stsz size 20 start 3610
[iso file] Read Box type stco size 20 start 3630
[iso file] Read Box type tref size 24 start 3650
[iso file] Read Box type mpod size 16 start 3658
[iso file] Read Box type mdat size 272431 start 3674

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140313/f3e0e5d2/attachment.asc>


More information about the ffmpeg-devel mailing list