Coder Social home page Coder Social logo

aax2mp3-easy's Introduction

Snap Status

To install the snap:

sudo snap install aax2mp3-easy --devmode --edge

aax2mp3_easy



Convert Audible AAX files (.aax) to MP3 (.mp3) with no effort.

In short, aax2mp3_easy automates the two-step process that AAXtoMP3 requires to convert files, this way you just need to run a single script that you make everything for you (including install all dependencies).

Based on a fork from Audible Activator* and AAXtoMP3, this script provide an easier way to convert Audible AAX files to MP3.

How to Use

In order to convert Audible AAX files to any other format it's needed an "Activation Code" from your Audible account. This activation code is used to break Audible DRM and to convert your audiobooks into MP3 files. Currently there's no other way to convert Audible AAX files without an activation code, as you can see here and here.

1 Step) First of all, download this script and set it as executable:

wget https://github.com/paladini/aax2mp3-easy/archive/master.zip
unzip master.zip
cd aax2mp3-easy-master/
chmod +x aax2mp3_easy.sh

2 Step) Suppose that you login to Audible using [email protected] with the password hpK1abc. To convert, let's say, TheFilterBubble.aax to a MP3 file, run the following:

./aax2mp3_easy.sh [email protected] hpK1abc TheFilterBubble.aax

3 Step) The process itself can take a while, because dependencies has to be downloaded and Audible Activator needs to login to your account and check out what's the correct activation code for your account. While this happens a browser should appear - just ignore and wait for the process to finish; the browser will be automatically closed in the end.

After getting your activation code, the script will start converting TheFilterBubble.aax to a MP3 file, that will be located inside a folder called Audiobooks in the aax2mp3_easy folder. Check out this folder and you'll find your audiobook converted to .mp3 with an awesome cover.

Roadmap

  • Reorganize project structure.
  • Support for MacOS.

Notes

* The forked version of Audible Activator is used by this project because I have to implement a version of this program where you can pass Audible username and password as command line arguments. This new feature I've implemented was not accepted by the creator of Audible Activator until now. If the maintener of this project accept my Pull Request I'll start using it instead of my own fork.

aax2mp3-easy's People

Contributors

algiras avatar elifiner avatar garfieldnate avatar jmiahman1 avatar kz6fittycent avatar paladini avatar ssaric avatar vanson44 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aax2mp3-easy's Issues

A few suggestions

Found your repo by checking the referral links in my repo to your (??) blog. Not a bad implementation and makes it much easier to use overall. I am, however, concerned by a few things:

  1. #!/bin/bash shebang could break on some systems that don't use standard bash location (some distros of Linux do this for some reason). #!/usr/bin/env bash would be better here
  2. Consider adding checks for pip, wget, and ffmpeg. My repo now automatically checks ffmpeg installation thanks to work done by danielhoherd so that can be used to check style for the script. I don't know if libmp3lame is also needed, it is used in mp3 conversion in my script.
  3. You should trap ctrl+c and exit the script altogether if encountered, again danielhoherd did this for AAXtoMP3.
  4. Consider adding checks to make sure the repos were successfully extracted using wget. That chromedriver site crashed a few times while I was attempting to figure out the ffmpeg stuff for AAXtoMP3 so that is a potential weak point.

All that being said, do I have your permission to link your project in my README markdown? I think it could be useful for newer users. I don't anticipate many github Linux users that are attempting to decode an Audible file to fall into that category but you can never be sure.

audible activator no such directory error?

RFG-MbProR15T:aax2mp3-easy-master rgranholm$ ./aax2mp3_easy.sh [email protected] ERASED BOOKTITLES.axx
Downloading AAXtoMP3...
--2018-10-29 13:34:34-- https://github.com/KrumpetPirate/AAXtoMP3/archive/master.zip
Resolving github.com... 192.30.253.113, 192.30.253.112
Connecting to github.com|192.30.253.113|:443... connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.
Archive: aaxtomp3.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of aaxtomp3.zip or
aaxtomp3.zip.zip, and cannot find aaxtomp3.zip.ZIP, period.
Downloading audible-activator...
--2018-10-29 13:34:34-- https://github.com/paladini/audible-activator/archive/feature_login_as_arg.zip
Resolving github.com... 192.30.253.113, 192.30.253.112
Connecting to github.com|192.30.253.113|:443... connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.
Archive: audible-activator.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of audible-activator.zip or
audible-activator.zip.zip, and cannot find audible-activator.zip.ZIP, period.
Downloading Chrome-Driver-Latest...
Error: No available formula with the name "chromedriver"
It was migrated from homebrew/core to homebrew/cask.
You can access it again by running:
brew tap homebrew/cask
And then you can install it by running:
brew cask install chromedriver
sudo: pip: command not found
sudo: pip: command not found
python: can't open file 'audible-activator-feature_login_as_arg/audible-activator.py': [Errno 2] No such file or directory
bash: AAXtoMP3-master/AAXtoMP3: No such file or directory
RFG-MbProR15T:aax2mp3-easy-master rgranholm$

aax2mp3-easy not working for German Audible accounts

I just installed aax2mp3-easy on Debian 10. Installation seems to work fine (no errors reported).
But I cannot decode my aax file.

I think this is because I have a German Audible account and the aax2mp3-easy is logging into audible.com.
I think adding the following lines to audible-activation-master/audible-activator.py would fix the problem:

elif lang == "de":
login_url = login_url.replace('.com', ".de")
base_url = base_url.replace('.com', ".de")

With this "change" aax2mp3-easy does log into my German Audible account....but somehow the tool then exits with the error message: "2021-01-19 16:43:15+0100 ERROR File NOT Found: 9e4b7803".

I am not sure what to do in that case.

Not working with new aax2mp3 (Missing authcode)

ERROR Missing authcode

Usage: AAXtoMP3 [--flac] [--aac] [--opus ] [--single] [--chaptered]
[-e:mp3] [-e:m4a] [-e:m4b] [--authcode <AUTHCODE>]
[--output_dir <PATH>] [--complete_dir <PATH>] [--validate]
{FILES}

It looks aax2mp3 changed how they accept Auth code.

I fixed it locally with manually reverting this change in aax2mp3.

audiobooks not there

hi ther i have a small problem after the conversion i cant find the audiobook file anywhere i cant find my completed file after conversion thnk you

0500 ERROR File NOT Found: Player

Hello,

I think I'm close to it, but aax2mp3_easy ends up with the ERROR mentioned above.
Heres the output:

Traceback (most recent call last):
File "audible-activator-feature_login_as_arg/audible-activator.py", line 148, in
fetch_activation_bytes(username, password, options)
File "audible-activator-feature_login_as_arg/audible-activator.py", line 57, in fetch_activation_bytes
executable_path=chromedriver_path)
File "/usr/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 75, in init
desired_capabilities=desired_capabilities)
File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in init
self.start_session(desired_capabilities, browser_profile)
File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 311, in execute
self.error_handler.check_response(response)
File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

2019-11-05 14:38:06-0500 ERROR File NOT Found: Player

Any Ideas? Thank you so far.

ERROR File NOT Found: Player

this is the message I get everytime I try running the script . Don't really know what to do. I running Ubuntu 19.10.

line 74: python: command not found

Hello on macos 13.6.1 when running the script as explained i'm getting this error
./aax2mp3_easy.sh: line 74: python: command not found

Thanks for your help

ERROR File NOT Found: Player

Script was working great until a month or so ago. Now I get this error when running:

  File "audible-activator-master/audible-activator.py", line 182, in <module>
    fetch_activation_bytes(username, password, options)
  File "audible-activator-master/audible-activator.py", line 82, in fetch_activation_bytes
    executable_path=chromedriver_path)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
    self.service.start()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 83, in start
    os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

2020-03-24 00:43:25-0700 ERROR File NOT Found: Player

If I copy chromedriver into /bin/ then I get:

Traceback (most recent call last):
  File "audible-activator-master/audible-activator.py", line 182, in <module>
    fetch_activation_bytes(username, password, options)
  File "audible-activator-master/audible-activator.py", line 117, in fetch_activation_bytes
    + 'customer_token=' + data["playerToken"] + "&action=de-register"
KeyError: 'playerToken'
2020-03-24 00:44:20-0700 ERROR File NOT Found: Running

Invalid data found when processing input

$ [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f8e642e2c0] [aax] mismatch in checksums!
$ [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f8e642e2c0] error reading header audiobook.aax: Invalid data found when processing input

chromedriver unexpectedly exited

I've put your code in to a docker container and run the following

$ docker run -it aussidavid/aax2mp3-easy ./aax2mp3_easy.sh [email protected] hpK1abc TheFilterBubble.aax

and get the following output:

Davids-MacBook-Air-6:aax David$ docker run -it aussidavid/aax2mp3-easy ./aax2mp3_easy.sh [email protected] hpK1abc TheFilterBubble.aax
Downloading AAXtoMP3...
--2018-02-05 02:07:32--  https://github.com/KrumpetPirate/AAXtoMP3/archive/master.zip
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/KrumpetPirate/AAXtoMP3/zip/master [following]
--2018-02-05 02:07:37--  https://codeload.github.com/KrumpetPirate/AAXtoMP3/zip/master
Resolving codeload.github.com (codeload.github.com)... 192.30.253.121, 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4260 (4.2K) [application/zip]
Saving to: 'aaxtomp3.zip'

aaxtomp3.zip                        100%[==================================================================>]   4.16K  --.-KB/s    in 0.001s

2018-02-05 02:07:38 (3.61 MB/s) - 'aaxtomp3.zip' saved [4260/4260]

Archive:  aaxtomp3.zip
de01589b94dad479571fc79112182343a1f93af5
   creating: AAXtoMP3-master/
 extracting: AAXtoMP3-master/.gitignore
  inflating: AAXtoMP3-master/AAXtoMP3
  inflating: AAXtoMP3-master/LICENSE
  inflating: AAXtoMP3-master/README.md
Downloading audible-activator...
--2018-02-05 02:07:38--  https://github.com/paladini/audible-activator/archive/feature_login_as_arg.zip
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/paladini/audible-activator/zip/feature_login_as_arg [following]
--2018-02-05 02:07:39--  https://codeload.github.com/paladini/audible-activator/zip/feature_login_as_arg
Resolving codeload.github.com (codeload.github.com)... 192.30.253.121, 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20892 (20K) [application/zip]
Saving to: 'audible-activator.zip'

audible-activator.zip               100%[==================================================================>]  20.40K  81.3KB/s    in 0.3s

2018-02-05 02:07:41 (81.3 KB/s) - 'audible-activator.zip' saved [20892/20892]

Archive:  audible-activator.zip
949bff7fe217e32dd8a50d4a1c371411efa96868
   creating: audible-activator-feature_login_as_arg/
  inflating: audible-activator-feature_login_as_arg/.gitignore
  inflating: audible-activator-feature_login_as_arg/AAS-parser.py
  inflating: audible-activator-feature_login_as_arg/AudibleGeneratePCPlayerID.c
  inflating: audible-activator-feature_login_as_arg/LICENSE
  inflating: audible-activator-feature_login_as_arg/README.md
  inflating: audible-activator-feature_login_as_arg/audible-activator.py
  inflating: audible-activator-feature_login_as_arg/common.py
  inflating: audible-activator-feature_login_as_arg/extract-activation-bytes.py
   creating: audible-activator-feature_login_as_arg/unused/
  inflating: audible-activator-feature_login_as_arg/unused/.gitconfig
Downloading Chrome-Driver-Latest...
--2018-02-05 02:07:41--  https://chromedriver.storage.googleapis.com/LATEST_RELEASE
Resolving chromedriver.storage.googleapis.com (chromedriver.storage.googleapis.com)... 216.58.199.48, 2404:6800:4006:803::2010
Connecting to chromedriver.storage.googleapis.com (chromedriver.storage.googleapis.com)|216.58.199.48|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5 [application/octet-stream]
Saving to: 'chromedriver-latest-release.txt'

chromedriver-latest-release.txt     100%[==================================================================>]       5  --.-KB/s    in 0s

2018-02-05 02:07:41 (163 KB/s) - 'chromedriver-latest-release.txt' saved [5/5]

--2018-02-05 02:07:41--  https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip
Resolving chromedriver.storage.googleapis.com (chromedriver.storage.googleapis.com)... 216.58.199.48, 2404:6800:4006:803::2010
Connecting to chromedriver.storage.googleapis.com (chromedriver.storage.googleapis.com)|216.58.199.48|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3721349 (3.5M) [application/zip]
Saving to: 'chrome-driver-latest.zip'

chrome-driver-latest.zip            100%[==================================================================>]   3.55M  4.60MB/s    in 0.8s

2018-02-05 02:07:42 (4.60 MB/s) - 'chrome-driver-latest.zip' saved [3721349/3721349]

Archive:  chrome-driver-latest.zip
  inflating: chromedriver
Collecting requests
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
    100% |################################| 92kB 2.0MB/s
Collecting certifi>=2017.4.17 (from requests)
  Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB)
    100% |################################| 153kB 2.5MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests)
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |################################| 143kB 3.2MB/s
Collecting idna<2.7,>=2.5 (from requests)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |################################| 61kB 5.2MB/s
Collecting urllib3<1.23,>=1.21.1 (from requests)
  Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |################################| 133kB 4.1MB/s
Installing collected packages: certifi, chardet, idna, urllib3, requests
Successfully installed certifi-2018.1.18 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22
Collecting selenium
  Downloading selenium-3.8.1-py2.py3-none-any.whl (942kB)
    100% |################################| 952kB 1.0MB/s
Installing collected packages: selenium
Successfully installed selenium-3.8.1
Traceback (most recent call last):
  File "audible-activator-feature_login_as_arg/audible-activator.py", line 148, in <module>
    fetch_activation_bytes(username, password, options)
  File "audible-activator-feature_login_as_arg/audible-activator.py", line 57, in fetch_activation_bytes
    executable_path=chromedriver_path)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
    self.service.start()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 98, in start
    self.assert_process_still_running()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
    % (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service ./chromedriver unexpectedly exited. Status code was: 127

2018-02-05 02:07:46+0000 Decoding Player with auth code [*]...
Davids-MacBook-Air-6:aax David$

On running script >> ModuleNotFoundError: No module named 'selenium'

Output of Bash:

Installing collected packages: selenium
Successfully installed selenium-3.8.0
Traceback (most recent call last):
  File "audible-activator-feature_login_as_arg/audible-activator.py", line 8, in <module>
    from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'

Any suggestions why the import from selenium no longer works?

Selenium : cannot find Chrome

elementary OS 0.4.1 Loki - Ubuntu 16.04.5 LTS
Command line : ./aax2mp3_easy.sh [email protected] xxxxxx livre.aax
Error :
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
2020-03-31 16:15:21+0200 ERROR File NOT Found: Player

AAXtoMP3.sh called by aax2mp3_easy.sh but the name is AAXtoMP3

The script crashed with the following error message:

 bash: AAXtoMP3-master/AAXtoMP3.sh: No such file or directory

Solution:

mv AAXtoMP3-master/AAXtoMP3 AAXtoMP3-master/AAXtoMP3.sh

Now the script stops with the message

2017-07-05 22:54:14+0200 Decoding Player with auth code [*]...

but no mp3 is created. I am investigating.

Docker image?

Great project probably. But I'm struggling creating a working docker-image with this project, spend already hours and just reach error after error. It would be fantastic if @paladini could add a working Dockerfile, this way it's working for everyone and we don't need to care about dependencies, OS, etc. Everyone could then simply use it without installing anything locally.

My last try will be now to install the snap on an ubuntu docker image. If this doesn't work I'll give up and hope for help.

Thanks for your feedback!

ERROR File Not Found

Hi,

I'm trying to use this on UBUNTU and had issues with couple of things, but I finally got to the point that chrome opens up and asks for password, and after that I get the error of File Not Found: e09****. Do you know what could have caused this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.