ruffnex
Apr 1 2008, 12:29
Hello, I have been given some files which are supposedly valid AAC files, but QuickTime and VLC, both on the Mac, refuse to play the files. Just wondering if anybody recognizes the file format and can suggest tools to examine/repair the header and extract/play the audio...
Here is how the file starts:
ftypmp42....mp42isom3gp63g2a3gp4..i,moov...lmvhd......._..._...X....................................................@..................................!iods..........O................h.trak...\tkhd......._..._............................................................@.............h3mdia... mdhd......._..._...D....U......%hdlr........soun............soun...g.minf....smhd...........$dinf....dref............url ......g.stbl....stts...........^.......jstsd...........Zmp4a.........................D.....6esds........%........@...................V..........].stsz...........^
Any pointers appreciated. Thanks.
File should start with 4 bytes containing 0x00000024
ruffnex
Apr 1 2008, 14:39
Ah, the header is missing. Thx. Fixed it.
VLC can play it, but both QuickTime and iTunes crash on opening the file.
faad -i reports:
LC AAC 118.074 secs, 2 ch, 44100 Hz
VLC Reports:
Codec: mp4a
Bits per sample: 16
Bitrate: 1411 kb/s
AAC extension: SBR
AtomicParsley reports:
Atom ftyp @ 0 of size: 36, ends @ 36
Atom moov @ 36 of size: 22984, ends @ 23020
Atom mvhd @ 44 of size: 108, ends @ 152
Atom iods @ 152 of size: 33, ends @ 185
Atom trak @ 185 of size: 22835, ends @ 23020
Atom tkhd @ 193 of size: 92, ends @ 285
Atom mdia @ 285 of size: 22735, ends @ 23020
Atom mdhd @ 293 of size: 32, ends @ 325
Atom hdlr @ 325 of size: 37, ends @ 362
Atom minf @ 362 of size: 22658, ends @ 23020
Atom smhd @ 370 of size: 16, ends @ 386
Atom dinf @ 386 of size: 36, ends @ 422
Atom dref @ 394 of size: 28, ends @ 422
Atom stbl @ 422 of size: 22598, ends @ 23020
Atom stts @ 430 of size: 24, ends @ 454
Atom stsd @ 454 of size: 106, ends @ 560
Atom mp4a @ 470 of size: 90, ends @ 560
Atom esds @ 506 of size: 54, ends @ 560
Atom stsz @ 560 of size: 20380, ends @ 20940
Atom stsc @ 20940 of size: 28, ends @ 20968
Atom stco @ 20968 of size: 2052, ends @ 23020
Atom mdat @ 23020 of size: 1891042, ends @ 1914062
------------------------------------------------------
Total size: 1914062 bytes; 21 atoms total. AtomicParsley version: 0.9.0 (utf8)
Media data: 1891042 bytes; 23020 bytes all other atoms (1.203% atom overhead).
Total free atom space: 0 bytes; 0.000% waste.
------------------------------------------------------
However using AtomicParsley to try and tag the file results in a bus error.
If I want the audio contained in the file, extracted, and then to build a new MP4 AAC file, properly tagged, which will playback in iTunes and an iPod, what tools/approach should I take? Thanks.
ruffnex
Apr 13 2008, 10:32
I can now convert the input data to a .m4a, with the aac data being copied over:
faad -a test.aac ./inputData
mp4creator -create=./test.aac test.m4a
However, I want to use ffmpeg to do this, but can't get it to work/produce a file that plays. Here is what I have tried:
ffmpeg -vn -acodec copy -i ./inputData test.m4a
Does anybody know how to get ffmpeg to do a copy/pass-through of aac data into a valid Mp4 container?
Try:
CODE
ffmpeg -f mp4 -vn -acodec copy -i ./inputData test.m4a
It'll force ffmpeg to use a MP4 container.
ruffnex
Apr 13 2008, 12:13
Thanks. That seems to do the trick.
If I were to only use ffmpeg in this fashion, where there isn't any decoding or encoding with ffmpeg, can I distribute ffmpeg with my app, or is there a patent issue?