[FFmpeg-user] moov atom way too big + udta added

Mayescid Ocomance MayescidOcomance at gmail.com
Mon Jun 24 13:53:01 EEST 2019


Hi Carl,



we  weren't able to detect any advantages in the user experience from
streaming our videos, no matter which profile or size. The only difference
seems to be that the moov atom  of the files made with ffmpeg is a lot
bigger than with Expression Encoder 4 and that the loading of the moov at
the beginning of the streaming takes accordingly longer.



I'll try and give you comparative information for different exmples:



#1.1 Original File (mp4), Frame Size FHD, High Profile



  Metadata:

    major_brand     : avc1

    minor_version   : 0

    compatible_brands: avc1mp42

    creation_time   : 2019-02-04T21:41:57.000000Z

  Duration: 01:00:36.96, start: 0.000000, bitrate: 18403 kb/s

    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 17995 kb/s, 50 fps, 50 tbr, 50 tbn, 100 tbc
(default)

    Metadata:

      creation_time   : 2019-02-04T21:41:57.000000Z

      handler_name    : Video Media Handler

      encoder         : AVC Coding

    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 384 kb/s (default)

    Metadata:

      creation_time   : 2019-02-04T21:41:57.000000Z

      handler_name    : Sound Media Handler



Moov atom: 3.144.154 Bytes

Overall File Size : 8.170.666 KB



#1.2 FFMPEG Derivative from original, 1280x720, Main



 Metadata:

    major_brand     : isom

    minor_version   : 512

    compatible_brands: isomiso2avc1mp41

    encoder         : Lavf58.23.100

  Duration: 01:00:36.99, start: 0.000000, bitrate: 2110 kb/s

    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 1971 kb/s, 50 fps, 50 tbr, 12800 tbn, 100 tbc
(default)

    Metadata:

      handler_name    : Video Media Handler

    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 129 kb/s (default)

    Metadata:

      handler_name    : Sound Media Handler





Atom moov @ 32 of size: 4.664.186, ends @ 4664218

Overall File Size: 937.053 KB





#1.3. FFMPEG Derivative from original, 1280x720, Baseline



 Metadata:

    major_brand     : isom

    minor_version   : 512

    compatible_brands: isomiso2avc1mp41

    encoder         : Lavf58.23.100

  Duration: 01:00:36.99, start: 0.000000, bitrate: 2135 kb/s

    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1998 kb/s, 50 fps, 50
tbr, 12800 tbn, 100 tbc (default)

    Metadata:

      handler_name    : Video Media Handler

    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 129 kb/s (default)

    Metadata:

      handler_name    : Sound Media Handler





Atom moov @ 32 of size: 3.216.697, ends @ 3216729

Overall File Szize: 947.899 KB





#1.4 Win Expression Encoder derivative of original, 1280x720,



  Metadata:

    major_brand     : mp42

    minor_version   : 0

    compatible_brands: isommp42

    creation_time   : 2019-02-05T00:36:34.000000Z

  Duration: 01:00:36.96, start: 0.000000, bitrate: 2120 kb/s

    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 125 kb/s (default)

    Metadata:

      creation_time   : 2019-02-05T00:36:37.000000Z

      handler_name    : Mainconcept MP4 Sound Media Handler

    Stream #0:1(eng): Video: h264 (Baseline) (avc1 / 0x31637661),
yuv420p(tv), 1280x720 [SAR 1024:1024 DAR 16:9], 1990 kb/s, 50 fps, 50 tbr,
50k tbn, 100 tbc (default)

    Metadata:

      creation_time   : 2019-02-05T00:36:37.000000Z

      handler_name    : Mainconcept MP4 Video Media Handler

      encoder         : AVC Coding



Atom moov @ 24 of size: 1.678.539, ends @ 1678563

No udta etc.

Overall File Size: 941.342 KB







The over all file size doesn't change much, execpt of course for the high
quality original which is a lot bigger.
Also, using main profile for the #1.1 derivative reduces file size as
expected compared to the same file in #1.2 but encoded in baseline profile.

However, the moov atom of the Baseline Ffmpeg derivative is larger than
that of the original file and the Main Profile derivative's moov atom is
bigger by a factor of 1.48 while the EE derivative's moov atom is smaller
by 0.53 compared to the original. So the main profile derivative is 2.77
times bigger than the EE baseline and eben the ffmpeg Baseline derivative
is bigger than EE Baseline by 1.91.







The weirdest case we have , though I don't know if they are conntected as I
inherited the files, are mp4s made of a .wmv file + a .png still with
ffmepg (sadly, I wasn't given the code line for the parsing). There is no
changing in picture data whatsoever in the file, yet the moov atom is huge.





  Metadata:

    major_brand     : isom

    minor_version   : 512

    compatible_brands: isomiso2avc1mp41

    encoder         : Lavf56.31.100

  Duration: 01:26:14.72, start: 0.000000, bitrate: 158 kb/s

    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 24 kb/s, 25 fps, 25 tbr,
12800 tbn, 50 tbc (default)

    Metadata:

      handler_name    : VideoHandler

    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono,
fltp, 129 kb/s (default)

    Metadata:

      handler_name    : SoundHandler



 Major Brand: isom  -  version 512

 Compatible Brands: isom iso2 avc1 mp41

 Tagging schemes available:

   iTunes-style metadata allowed.

   ISO-copyright notices @ movie and/or track level allowed.

   uuid private user extension tags allowed.

Atom "©too" contains: Lavf56.31.100

---------------------------

free atom space: 8

padding available: 8 bytes

user data space: 98

media data space: 99251258



Atom moov @ 32 of size: 3.425.889, ends @ 3425921
overall File Size: 100.271 KB(!)







I understand that the moov atom grows when using B-Frames in Main profile
compared to mainly I-Frames in Baseline profiles. However, I don't
undestand the growth rate by such a big factor, especially as it also
affects the Baseline derivatives. I was expecting about half the size of
the moov atom of the original for Baseline derivatives.



Thanks!
Mayescid

Am Mi., 19. Juni 2019 um 15:38 Uhr schrieb Carl Eugen Hoyos <
ceffmpeg at gmail.com>:

> Am Mo., 17. Juni 2019 um 11:09 Uhr schrieb Mayescid Ocomance
> <MayescidOcomance at gmail.com>:
>
> > >> The file is fine, however, when I compare its structure using
> > >> AtomicParsley to a file with the same specifics but created
> > >> by another programm, I'm getting way too big moov atoms,
> > >> which seems to be caused by way too big stscm, stszm,
> > >> stco, (and ctts for audio) atoms in both streams.
> >
> > >How do you define "too big"?
> >
> > The files themselves are fine and work well. However, the basically same
> > files are created by another programm with up to 5 times smaller moov
> atoms.
>
> > The bigger moov atoms don't seem to add any advantage so their size seems
> > to be redundantly big.
>
> How do you know?
>
> > Either I need help spotting the advantages or I'd like some help reducing
> > the moov atom size in order to save data space.
>
> Could you elaborate on the numbers a bit?
> You write above that the moov atoms are five times bigger but what does
> that mean for the overall file size?
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list