[FFmpeg-user] Problem editing m4a files with ffmpeg

richard richard at richsim900.plus.com
Sat May 28 11:11:42 CEST 2011


Can anyone shed any light on this problem. 

Why does ffmpeg moves the mdat atoms from the back to the near the front
of an m4a file? Is this a bug in ffmpeg?

Below are extracts of the atom trees of an m4a test file. See how the
mdat atoms change position when the m4a file is edited by ffmpeg.

 
Filename.m4a
Atom ftyp @ 0 of size: 24, ends @ 24 
Atom free @ 24 of size: 8, ends @ 32 
Atom moov @ 32 of size: 625505, ends @ 625537 
Atom others ......
Atom free @ 625537 of size: 2048, ends @ 627585
Atom mdat @ 627585 of size: 28800925, ends @ 29428510
Total size: 29428510 bytes; 56 atoms total. AtomicParsley version:0.9.0
(utf8)
Media data: 28800925 bytes; 627585 bytes all other atoms (2.133% atom
overhead).
Total free atom space: 2056 bytes; 0.007% waste. Padding available: 2048
bytes. 


Filename_edited_with_ffmpeg.m4a
Atom ftyp @ 0 of size: 24, ends @ 24
Atom free @ 24 of size: 8, ends @ 32
Atom mdat @ 32 of size: 26928081, ends @ 26928113
Atom moov @ 26928113 of size: 581094, ends @ 27509207
Atom others ......
Total size: 27509207 bytes; 47 atoms total. AtomicParsley version: 0.9.0
(utf8)
Media data: 26928081 bytes; 581126 bytes all other atoms (2.112% atom
overhead).
Total free atom space: 8 bytes; 0.000% waste. 


Filename_edited_with_ffmpeg_optimized_with_mp4creator.m4a
Atom ftyp @ 0 of size: 24, ends @ 24 
Atom moov @ 24 of size: 581094, ends @ 581118 
Atom others .......
Atom mdat @ 581118 of size: 26928081, ends @ 27509199
Total size: 27509199 bytes; 46 atoms total. AtomicParsley version: 0.9.0
(utf8)
Media data: 26928081 bytes; 581118 bytes all other atoms (2.112% atom
overhead).
Total free atom space: 0 bytes; 0.000% waste. 




More information about the ffmpeg-user mailing list