[FFmpeg-user] Need help with converting aax to mp3 or mp4

Robert Chalmers robert at chalmers.com.au
Sun Jan 10 14:58:36 CET 2016

I’m trying to convert an aax audible file to mp3 or mp4 with not success.

I’ve tried this command, and it fails.
ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4
and this one
ffmpeg -activation_bytes 62689101 -i Volume1.aax -vsync 2 -c:a copy output.mp4

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f8f3c808600] [aax] file checksum == d72f1f04e3c73d0bc68e742db1bc69b58dc3a500
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f8f3c808600] [aax] mismatch in checksums!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f8f3c808600] error reading header
Volume1.aax: Invalid data found when processing input

With the same error. Obviously the trick is the activation_code - where do I get that from ????

Now interestingly, when I try this command.

~/Downloads/ffmpeg  -i Volume1.aax -vsync 2 -c:a copy output.mp4

It … almost works … in that it produces a file that also contains the cover art, and loads in to a player - but is silent…

The first error/warning is this

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd3a1000800] [aax] file checksum == d72f1f04e3c73d0bc68e742db1bc69b58dc3a500
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd3a1000800] [aax] activation_bytes option is missing!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd3a1000800] stream 0, timescale not set
[mjpeg @ 0x7fd3a1804400] Changing bps to 8
[aac @ 0x7fd3a1802c00] Prediction is not allowed in AAC-LC.

the next set of warnings/errors is

File 'output.mp4' already exists. Overwrite ? [y/N] y
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x7fd3a1812c00] using SAR=1/1
[libx264 @ 0x7fd3a1812c00] MB rate (92160000) > level limit (2073600)
[libx264 @ 0x7fd3a1812c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x7fd3a1812c00] profile High, level 5.2
[libx264 @ 0x7fd3a1812c00] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x7fd3a1812000] Codec for stream 1 does not use global headers but container format requires global headers
[mp4 @ 0x7fd3a1812000] track 1: codec frame size is not set
Output #0, mp4, to 'output.mp4’:


    Side data:
      unknown side data type 10 (24 bytes)
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 125 kb/s (default)
      creation_time   : 2016-01-02 09:52:57
      handler_name    : ?Apple Sound Media Handler
Stream mapping:
  Stream #0:2 -> #0:0 (mjpeg (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x7fd3a1812000] aac bitstream error
    Last message repeated 5 times
[mp4 @ 0x7fd3a1812000] aac bitstream errortime=00:06:48.88 bitrate= 122.5kbits/s speed= 818x    
    Last message repeated 12 times

Repeated a lot of times …

then the end bit

frame=    1 fps=0.1 q=33.0 Lsize=  443791kB time=07:57:12.73 bitrate= 127.0kbits/s speed=1.51e+03x    
video:11kB audio:438957kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.098714%
[libx264 @ 0x7fd3a1812c00] frame I:1     Avg QP:33.49  size: 10513
[libx264 @ 0x7fd3a1812c00] mb I  I16..4: 16.2% 56.9% 26.9%
[libx264 @ 0x7fd3a1812c00] 8x8 transform intra:56.9%
[libx264 @ 0x7fd3a1812c00] coded y,uvDC,uvAC intra: 45.1% 29.0% 4.0%
[libx264 @ 0x7fd3a1812c00] i16 v,h,dc,p: 21% 46% 23%  9%
[libx264 @ 0x7fd3a1812c00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 33% 26%  3%  4%  2%  4%  2%  5%
[libx264 @ 0x7fd3a1812c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 33% 10%  4%  5%  6%  4%  4%  3%
[libx264 @ 0x7fd3a1812c00] i8c dc,h,v,p: 75% 19%  5%  1%
[libx264 @ 0x7fd3a1812c00] kb/s:7569360.00

So obviously I need to set something up a bit better. 

Thanks for any pointers

Robert Chalmers
robert at chalmers.com.au  Quantum Radio: http://tinyurl.com/lwwddov
Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of - 
Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay

More information about the ffmpeg-user mailing list