itayperl/aa2mp3

abnormal program termination

craigchambers opened this issue · 10 comments

Attempted to use the script, and even just the exe piped to wav file, but always fails with the error:

abnormal program termination

Any ideas?

I'm attempting to convert an aa file (of course).

Please compile with debugging enabled and see what is printed. You can do this by changing

#define DEBUG 0

to

#define DEBUG 1

in dump.c.

Hi,

Thanks for the quick response. Output is:

AAXOpenFileWinA(&aax, filename) = 0
AAXGetFileType(aax, &filetype) = 0
AAXGetDRMType(aax, &drmtype) = 0
AAXAuthenticateWin(aax) = -32

abnormal program termination

It looks like a failure to log in to the audible account. Before using aa2mp3 you must run AudibleManager once under wine and set it up with your account.

Apologies, I had a feeling it might be this. I'm new to Audible, I'm trying to log in using the manager in WINE but the log in page keeps refreshing without logging in. I've tried 64 bit and a 32 bit prefix, but to no avail.

Thanks for your help. I eventually got it working by logging into the podcast login on the Download Manager. Audio is now played on the built in player in the app.

Unfortunately, I don't have any idea what format is extracted but it does not seem to be anything that I can handle. I made an assumption that ffmpeg could be used in place of avconv but ffmpeg complains about the piped input and thinks that it has 7 channels before bombing out. I have a compiled version of ffpeg, but no avconv (neither are in the Linux Mint repos).
Again, any help is appreciated.

Thanks,
Craig

Well, at least there's progress!

Did you edit the shell script to run ffmpeg instead of avconv? If not - you should try that, as the script should pass the correct parameters. If you did, please send me the full stderr output of the script, the output of

wine dump.exe -i file.aa

and possibly the errors from ffmpeg as well.

Hi,

Thanks again for your response.
I've now got avconv installed as well as ffmpeg.

Using the command
wine dump.exe infile.aa | avconv -i - -ab 96 out.mp3

avconv gives an error as follows.
pipe:: Invalid data found when processing input

When run in debug mode, it spits out a lot of the following:
AAXDecodePCMFrame(aax, buffer, outsize, wavebuffer + read, frame_size - read, &processed) = 0
AAXGetEncodedAudio(aax, buffer, sizeof(buffer), &outsize) = 0

I'm a little confused by the syntax above. Did you mean to add -i after dump.exe?
Also, in the shell script you seem to be piping the output into avconv, then passing the wine executable and filename in again as $PARAMS. Is this correct?

Here is some of the ouptput from ffmpeg:

[aac @ 0x2c2f680] SSR is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x2c2f680] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[aac @ 0x2c2f680] Reserved bit set.
[aac @ 0x2c2f680] Number of bands (26) exceeds limit (14).
[aac @ 0x2c2f680] channel element 2.6 is not allocated
[aac @ 0x2c2f680] Number of scalefactor bands in group (45) exceeds limit (41).
[aac @ 0x2c2f680] Reserved bit set.
[aac @ 0x2c2f680] Number of scalefactor bands in group (62) exceeds limit (41).
[aac @ 0x2c2f680] channel element 1.13 is not allocated
[aac @ 0x2c2f680] channel element 2.11 is not allocated
[aac @ 0x2c2f680] Reserved bit set.
[aac @ 0x2c2f680] invalid band type
[aac @ 0x2c2f680] channel element 2.10 is not allocated
[aac @ 0x2c2f680] Assuming an incorrectly encoded 7.1 channel layout instead of a spec-compliant 7.1(wide) layout, use -strict 1 to decode according to the specification instead.
[aac @ 0x2c2f680] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x2c2f680] Inconsistent channel configuration.
[aac @ 0x2c2f680] get_buffer() failed
[aac @ 0x2c2f680] channel element 2.11 is not allocated

You're calling avconv directly, and it can't autodetect the media format. The script handles this for you, and gives avconv the correct parameters. Could you try using the script rather than running dump.exe manually?

As for how this works - when dump.exe gets the -i parameter (as in the command I mentioned in my previous comment) it spits the correct arguments for avconv (according to the metadata in the .aa file) and then quits, without dumping the audio itself.

The script runs dump.exe twice. Once with -i to get the avconv parameters into PARAMS, and again to get the data itself and pipe it into avconv.

Sorry, i was trying to get this working until 01.45 so my thought processes may not have been very good by the end. Once I started doing something to debug, I forgot to go back to the main process once I had cleared a hurdle.
Thanks for the explanation about the -i flag, now that I understand that the PARAMS section is actually doing something different.I can see where things were going wrong in the later stages.

I can definitely confirm that I have a working audio file, now I just need to see if the output has SBR or Parametric stereo that gets lost in the avconv conversion, or if Audible's output is always so low quality.

Thanks for all your help,

Regards,
Craig