Compare commits

...

319 Commits
v1.0 ... master

Author SHA1 Message Date
Krumpet Pirate
e66c51dbfa
Merge pull request #211 from utf8please/patch-1
Limit result to one line when parsing cover size.
2023-01-29 11:29:36 -06:00
Krumpet Pirate
f6ec8aa867
Merge pull request #222 from jarrodcolburn/patch-1
fix: typo '--aac' not '-aac'
2023-01-29 11:28:44 -06:00
Krumpet Pirate
f9bc150775
Merge pull request #227 from damajor/patch-2
Change cover.jpg to $currentFileNameScheme.jpg
2023-01-29 11:27:43 -06:00
Krumpet Pirate
61cfc08886
Merge pull request #231 from FreedomBen/fix-typo-in-docs
Fix incorrect variable name bug
2023-01-29 11:27:05 -06:00
Benjamin Porter
1338f1e5c1 Fix incorrect variable name bug
Fix misleading variable name.  `$author` -> `$artist`

This took 30 mins of head pounding to figure out what was wrong :-)
2023-01-02 15:48:00 -07:00
-_-
2a5a208a2d
Change cover.jpg to $currentFileNameScheme.jpg
This change allow multiple covers of different audiobooks in the same target directory.
2022-10-17 16:54:21 +02:00
JarrodCColburn
8fc5e360d3
fix: typo '--aac' not '-aac'
usage example has 'aac' prefixed with single dash '-' (but should be double dashes '--')
2022-07-07 17:49:45 -05:00
Krumpet Pirate
1544a89249
Merge pull request #220 from FreedomBen/fix-typo
Fix typo in comment: FFMGEP -> FFMPEG
2022-06-10 19:09:24 -05:00
Benjamin Porter
c289c10cd7 Fix typo in comment: FFMGEP -> FFMPEG 2022-06-10 18:03:41 -06:00
utf8please
1ac6979885
Limit result to one line when parsing cover size. 2022-03-27 20:04:49 -07:00
Krumpet Pirate
f65fddebc2
Merge pull request #207 from bismark/fix-chapters-jq
Fixes for jq command generating chapters.txt
2022-03-02 13:14:40 -05:00
Ryan Johnson
cab6394c02 Fixes for jq command generating chapters.txt
Fixes #184

Adds a reduce + flatten step to generate a flat list of chapters.

Fixes #206

Support for emitting timestamps greater than 24 hours.
2022-03-01 21:45:28 -08:00
Krumpet Pirate
3e42539812
Merge pull request #205 from nysasounds/cover-art
Cover art
2022-02-09 17:49:20 -05:00
jcat
c103d4899b feat: Use ffmpeg for cover art on non mpeg-4 containers instead of mp4art from deprecated mp4v2-utils package
Closes: https://github.com/KrumpetPirate/AAXtoMP3/issues/203
2022-02-09 21:24:22 +00:00
jcat
be8473ffba Revert "feat: Use ffmpeg to cover add instead of mp4art from deprecated mp4v2-utils package"
This reverts commit 72794b678545faf37e083ee5975bf986ef9a6a88.

This broke cover art addition for MPEG-4 containers
2022-02-09 21:06:47 +00:00
Krumpet Pirate
6d659ade72
Merge pull request #202 from nysasounds/front-cover-typo
fix: video stream metadata for front cover comment should be lower ca…
2022-02-06 21:10:42 -05:00
jcat
b07737f5c4 fix: video stream metadata for front cover comment should be lower case _front_ 2022-02-06 20:29:20 +00:00
Krumpet Pirate
9a1f0fae49
Merge pull request #201 from nysasounds/ffmpeg-from-snap
feat: Add support for ffmpeg via snap package
2022-02-06 14:25:20 -05:00
Krumpet Pirate
bf7d405d3e
Merge pull request #199 from nysasounds/ffmpeg-cover-art
feat: Use ffmpeg to cover add instead of mp4art
2022-02-06 14:24:18 -05:00
jcat
1ce836f5a2 feat: Add support for ffmpeg via snap package, requires ability to specify custom ffmpeg binary names if required
closes: https://github.com/KrumpetPirate/AAXtoMP3/issues/200
2022-02-06 00:06:54 +00:00
jcat
72794b6785 feat: Use ffmpeg to cover add instead of mp4art from deprecated mp4v2-utils package
closes: https://github.com/KrumpetPirate/AAXtoMP3/issues/198
2022-02-05 23:31:12 +00:00
Krumpet Pirate
c9bcf2326b
Merge pull request #192 from bensaufley/fix/single_cover_art
Attempt to fix missing cover art for single output
2022-01-21 17:17:06 -05:00
Krumpet Pirate
bee00b9c58
Merge pull request #196 from Muxelmann/patch-2
Fixing `,000` issue with mp4chaps
2022-01-21 17:15:56 -05:00
Krumpet Pirate
00fd4d552a
Merge pull request #195 from Muxelmann/patch-1
Changing uses of `grep` to `$GREP` for non-linux
2022-01-21 17:14:33 -05:00
Ben Saufley
aa702cb97a
Remove redundant loglevel check 2022-01-21 17:09:43 -05:00
Krumpet Pirate
31507139c8
Merge pull request #190 from bensaufley/fix/consistent_grep
Use GREP variable everywhere
2022-01-21 17:05:30 -05:00
Max Zangs
2272d9ce99
Fixing ,000 issue with mp4chaps
Replaces the `,000` in the chapters.txt file with `.000` to allow processing with `mp4chaps`
2022-01-20 11:59:10 +01:00
Max Zangs
e4f92461d3
Changing uses of grep to $GREP for non-linux 2022-01-20 11:45:49 +01:00
Ben Saufley
4dd095da2a
Attempt to fix missing cover art for single output
Solves #191 for me anecdotaly, but I don't know if there's a better solution or a different way to go about it.
2022-01-12 09:34:59 -05:00
Ben Saufley
20289a1774
One sed/gsed as well 2022-01-12 00:28:52 -05:00
Ben Saufley
048e15a476
Use GREP variable everywhere 2022-01-12 00:15:14 -05:00
Krumpet Pirate
d5e32478c7
Merge pull request #189 from jkuettner/feature/audible-library-series
Add optional possibility to extract the series from the audible library
2022-01-09 08:47:22 -05:00
Jerome Küttner
5010927559 fix "syntax error in expression" 2022-01-08 21:45:03 +01:00
Jerome Küttner
b87b08ee6a fix continuing for existing files 2022-01-08 21:13:28 +01:00
Jerome Küttner
7f1f3df020 Add possibility to read the series from the audible library 2022-01-08 16:38:29 +01:00
Krumpet Pirate
fb56087a72
Merge pull request #182 from Natrinicle/extra-crop-cover-check
Add extra_crop_cover to All Odd Cover Widths
2022-01-07 18:13:35 -05:00
Krumpet Pirate
c8870e29fd
Merge pull request #187 from jkuettner/feature/continue-on-existing
Continue if the current file already exists
2022-01-07 18:05:26 -05:00
Jerome Küttner
45fd0d4852 remove temp metadata_file on continue 2022-01-07 20:58:54 +01:00
Jerome Küttner
12435d3e24 Continue if target directory already exists 2022-01-07 17:48:04 +01:00
Nate Bohman
ab91343dd5
Add extra_crop_cover to All Odd Cover Widths
When attempting to convert
https://www.audible.com/pd/Stephen-Fry-Presents-a-Selection-of-Anton-Chekhovs-Short-Stories-Audiobook/B0036GPPWS
using this tool and chaptered mode, ffmpeg fails out with

[libx264 @ 0x5588ef28d780] width not divisible by 2 (483x500)
Error initializing output stream 0:1 -- Error while opening encoder
for output stream #0:1 - maybe incorrect parameters such as bit_rate,
rate, width or height
Conversion failed!

This is because the cover file embedded in the downloaded mp4 file
from Audible has the dimensions 483x500. Found the extra_crop_cover
that's currently being used only for covers from the Audible CLI
tool and extended the script to instead check the dimensions of the
cover file and include the extra_crop_cover anytime the cover has an
odd width.
2021-11-09 11:36:23 -07:00
Krumpet Pirate
c6e8a06f10
Merge pull request #181 from fabh2o/fix-180
Sanitize the chapters name
2021-11-08 07:50:19 -05:00
fabh2o
a45c6245fe delete '/' and ':' from chapter names 2021-11-08 10:50:52 +01:00
Krumpet Pirate
9b24aa1be3
Merge pull request #177 from fabh2o/fix-176
Fix 176
2021-09-28 19:15:11 -04:00
Krumpet Pirate
43d96f0118
Merge pull request #178 from fabh2o/ffmpeg44-path
ffmpeg custom path
2021-09-28 19:14:38 -04:00
fabh2o
ce62e832ee fix anchor link 2021-09-28 22:06:33 +02:00
fabh2o
d645e616fe updated readme 2021-09-28 20:16:52 +02:00
fabh2o
bf1f384341 fix tmp_chapter_file: unbound variable 2021-09-28 19:56:14 +02:00
fabh2o
f1c4b97bc1 use custom path for ffmpeg/ffprobe binaries 2021-09-28 19:55:16 +02:00
fabh2o
68a91bbbbb --aac is identical to -e:m4a 2021-09-26 18:30:44 +02:00
fabh2o
58ecfbc72b remove useless / in output_folder definition 2021-09-26 18:28:59 +02:00
Krumpet Pirate
0bd127ad06
Merge pull request #175 from fabh2o/fix-174
instruction to update ffmpeg
2021-09-20 23:00:36 -04:00
fabh2o
fb86d4291c instruction to update ffmpeg 2021-09-20 23:05:15 +02:00
Krumpet Pirate
b549f57228
Merge pull request #173 from suntorytimed/master
Fix #172 by adding parsing step to save_metadata
2021-09-19 14:04:33 -04:00
Stefan Weiberg
e76b5442c1
Apply suggestions from code review
Remove padding for chapter number

Co-authored-by: fabh2o <fabrice.h2o@gmail.com>
2021-09-16 11:47:20 +02:00
Stefan Weiberg
aab2045959
Remove padding for chapter number
Co-authored-by: fabh2o <fabrice.h2o@gmail.com>
2021-09-16 11:46:43 +02:00
Stefan Weiberg
56ca165063 Fix #172 by adding parsing step to save_metadata
* creates a correctly formatted chapter.txt file
  with titles from audible-cli .json
* uses this chapter.txt instead of ffprobe output
  in case audible-cli data should be used
2021-09-16 10:40:57 +02:00
KrumpetPirate
5ea4bd10a4 Update for GNU find, README cleanup 2021-09-03 13:25:30 -04:00
KrumpetPirate
596108d56e
Merge pull request #171 from fabh2o/aaxc
AAXC support, audible-cli integration
2021-09-03 10:08:27 -04:00
fabh2o
63ffc47aa5 use the var $decrypt_param with all ffmpeg and ffprobe call 2021-09-02 20:11:12 +02:00
fabh2o
b7fbe831c7 invert authcode required 2021-09-02 19:59:37 +02:00
fabh2o
1663daebdc add jq as dependency 2021-09-02 19:57:54 +02:00
fabh2o
78d6e931ff docs about aaxc 2021-09-02 19:35:14 +02:00
fabh2o
9e2d84cb25 updated docs to automatic source file format switch 2021-09-02 19:21:41 +02:00
fabh2o
b78e4b59b9 auto format selection, fix typo 2021-09-02 19:13:02 +02:00
fabh2o
99864fe428 docs 2021-09-02 18:24:57 +02:00
fabh2o
e9b111aa8a fully support aaxc 2021-09-02 17:49:36 +02:00
fabh2o
3d062fdba7 --aaxc flag, validate voucher and get key and id 2021-09-02 16:16:14 +02:00
fabh2o
eff626ee95 move info after req 2021-07-10 21:20:43 +02:00
fabh2o
64713e23ea Merge branch 'master' of github.com:fabh2o/AAXtoMP3 into all-in-one 2021-07-09 22:45:04 +02:00
KrumpetPirate
0f2180da3c
Merge pull request #162 from Nicko98/master
Call AAXtoMP3 interactively
2021-03-09 17:38:10 -05:00
Nicko98
051f37b3ff
Made savefile invisible 2021-03-09 22:49:54 +01:00
Nicko98
2206cf9dd8
Updated Readme.md 2021-03-09 22:44:26 +01:00
Nicko98
88c9b1701f
Save chosen options for next time
Now this script creates a save-file from which it loads the option the next time the script is used
Additionally aax-File drag'n'drop works now, at least on Ubuntu.
2021-03-09 22:26:48 +01:00
KrumpetPirate
c6c5b5ee97
Merge pull request #157 from katyavera/patch-1
Use the current filename scheme
2021-03-02 08:56:21 -05:00
KrumpetPirate
1d225d7fe2
Merge pull request #158 from katyavera/patch-2
Allow spaces in the .aax filename
2021-03-02 08:55:43 -05:00
KrumpetPirate
d0a9ba392c
Merge pull request #161 from katyavera/patch-3
Fix typo, reword
2021-03-02 08:54:56 -05:00
Nicko98
4537c7d01d
Just a little correction regarding sed 2021-03-02 01:51:12 +01:00
Nicko98
4dfb59e091
Updated README.md 2021-03-02 01:28:47 +01:00
Nicko98
7f2309248f
Some little improvements 2021-03-02 01:06:45 +01:00
Nicko98
4698f7728a
Call AAXtoMP3 Interactively
This script interactively asks you for the options to call AAXtoMP3 with.
2021-03-01 04:31:39 +01:00
Katya Vera
951146022f
Fix typo, reword 2021-02-28 18:36:01 +01:00
Katya Vera
f9b855ea1d
Allow spaces in the .aax filename 2021-02-28 15:29:02 +01:00
Katya Vera
2aa1d05040
Use the current filename scheme
The `fileNameScheme` is empty by default, so the file generated is named only `.chapters.txt` if -F is not specified.
Provided with the filename `mp4file`, mp4chaps searches for a file named `<mp4file>.chapters.txt`.
2021-02-28 15:25:40 +01:00
KrumpetPirate
7310e16222
Merge pull request #156 from Nicko98/master
Fix for issue KrumpetPirate#155
2021-02-25 22:03:22 -05:00
Nicko98
a68353f4eb
Fix for issue KrumpetPirate#155 2021-02-25 23:21:29 +01:00
KrumpetPirate
70ae2cef12
Merge pull request #153 from Nicko98/master
Fix for issue #145
2021-02-21 18:23:29 -05:00
Nicko98
9058cf144e
Fix for KrumpetPirate/AAXtoMP3 issue #145
This reverses pull request #139 if ffmpeg version is below 4.
2021-02-21 23:17:17 +01:00
KrumpetPirate
1e9c42aa83
Merge pull request #151 from fabh2o/custom-output-folder
Custom naming scheme
2021-02-11 19:31:39 -05:00
fabh2o
af880305dd Merge branch 'custom-output-folder' of github.com:fabh2o/AAXtoMP3 into all-in-one 2021-02-11 11:11:58 +01:00
fabh2o
ab5d7c7f7c Merge branch 'posix-filenames' of github.com:fabh2o/AAXtoMP3 into all-in-one 2021-02-11 10:47:44 +01:00
fabh2o
96d9d4aa9d Merge branch 'fix-log-level-time-as-octal' of github.com:fabh2o/AAXtoMP3 into audible-cli-integration 2021-02-11 10:38:54 +01:00
fabh2o
cb17d422f3 Merge branch 'master' of github.com:KrumpetPirate/AAXtoMP3 into audible-cli-integration 2021-02-11 10:38:20 +01:00
fabh2o
82c0ef0f6b Merge branch 'master' of github.com:KrumpetPirate/AAXtoMP3 into custom-output-folder 2021-02-11 09:26:23 +01:00
KrumpetPirate
c3584923ca
Merge pull request #148 from fabh2o/keep-n-author
Author customization
2021-02-10 17:42:38 -05:00
fabh2o
f6661862de mediainfo install in README 2021-02-10 21:22:46 +01:00
fabh2o
b5408310a2 Merge branch 'fix-log-level-time-as-octal' of github.com:fabh2o/AAXtoMP3 into custom-output-folder 2021-02-10 21:08:23 +01:00
fabh2o
3c909baf5e Merge branch 'master' of github.com:KrumpetPirate/AAXtoMP3 into custom-output-folder 2021-02-10 20:59:48 +01:00
fabh2o
012749071e force base-10 2021-02-10 20:48:14 +01:00
fabh2o
36839646c4 deleted empty line 2021-02-10 09:26:25 +01:00
fabh2o
68168f6495
Merge branch 'master' into keep-n-author 2021-02-10 09:20:37 +01:00
KrumpetPirate
aaaea1515f
Merge pull request #150 from Nicko98/loglevels
Loglevels
2021-02-09 16:02:29 -05:00
fabh2o
836c6b0722 use 2021-02-09 20:55:38 +01:00
fabh2o
4a8df563eb fix short flags 2021-02-09 20:53:53 +01:00
fabh2o
184cece622 fix space 2021-02-09 20:49:44 +01:00
fabh2o
1c4d67202a fix space 2021-02-09 20:49:12 +01:00
fabh2o
93478c797d Merge branch 'master' of github.com:KrumpetPirate/AAXtoMP3 into custom-output-folder 2021-02-09 20:47:34 +01:00
Nicko98
6646b84e72
Added different loglevels
I added different loglevels and (for loglevel 0 and 1) a progress bar for chapter splitting.
0 = show progress only, chapter splitting shown as progress bar
1 (default) = fewer information, chapter splitting shown as progress bar
2 = as it has been up until now
3 = debug mode
2021-02-09 20:21:55 +01:00
Nicko98
2805aca990
Added different loglevels
I added different loglevels and (for loglevel 0 and 1) a progress bar for chapter splitting.
0 = show progress only, chapter splitting shown as progress bar
1 (default) = fewer information, chapter splitting shown as progress bar
2 = as it has been up until now
3 = debug mode
2021-02-09 20:19:53 +01:00
Nicko98
7bef1bd569
Readme updated for loglevels 2021-02-09 20:05:43 +01:00
Nicko98
9e1b33904a
Added different loglevels
I added different loglevels and (for loglevel 0 and 1) a progress bar for chapter splitting.
0 = show progress only, chapter splitting shown as progress bar
1 (default) = fewer information, chapter splitting shown as progress bar
2 = as it has been up until now
3 = debug mode
2021-02-09 20:00:11 +01:00
fabh2o
fb48899cb7 precedence 2021-02-09 19:03:55 +01:00
fabh2o
239ae1aa3f remove leading space after cut 2021-02-09 18:54:37 +01:00
fabh2o
fcef788bc4 artist --> author 2021-02-09 17:48:21 +01:00
fabh2o
33a8d254bd Merge branch 'master' of github.com:KrumpetPirate/AAXtoMP3 into keep-n-author 2021-02-09 17:40:43 +01:00
KrumpetPirate
de3fbadab6
Merge pull request #147 from Nicko98/faster-chapter-splitting
Faster chapter splitting
2021-02-09 10:11:13 -05:00
Nicko98
e6f34b5f97
faster chapter splitting
Since there is an issue with this fix when applied on flac option, the changes dont take effect on flac.
For more information have a look in KrumpetPirate/AAXtoMP3 issue #142.
2021-02-09 12:39:15 +01:00
Nicko98
2b31c7defa
faster chapter splitting
Since there is an issue with this fix when applied on flac option, the changes dont take effect on flac.
For more information have a look in KrumpetPirate/AAXtoMP3 issue #142.
2021-02-09 03:24:20 +01:00
Nicko98
c4c5470b6b
faster chapter splitting
Since there is an issue with this fix when applied on flac option, the changes dont take effect on flac.
For more information have a look in KrumpetPirate/AAXtoMP3 issue #142.
2021-02-09 03:15:22 +01:00
fabh2o
1e7802ac3f force author name 2021-02-08 22:04:32 +01:00
fabh2o
ad2bbe5da4 typo in sed 2021-02-08 21:46:57 +01:00
fabh2o
0a5813e7db rephrased flag description 2021-02-08 21:39:10 +01:00
fabh2o
ad86f187f8 keep n-th artist only 2021-02-08 21:29:26 +01:00
fabh2o
afb852fdf1 cut title to 128 char + no - or : subsitution 2021-02-07 16:51:51 +01:00
fabh2o
ffbc592bf8 correct playlist name? 2021-02-07 11:32:18 +01:00
fabh2o
8f0f8ec3e1 forgot ; 2021-02-07 11:24:23 +01:00
fabh2o
7b602eaf5d proper multi file support i hope 2021-02-07 11:21:07 +01:00
fabh2o
d199d875bb Debugvar chapter, restored chapter number format 2021-02-07 10:26:29 +01:00
fabh2o
1afa763999 restored default output dir struct 2021-02-07 10:20:06 +01:00
fabh2o
45bd9e666f remove all apprnd-narrator traces 2021-02-07 10:15:34 +01:00
fabh2o
bcaec020ce first commit 2021-02-06 22:27:52 +01:00
fabh2o
c45a4ac610 reformat usage + auduble-cli flag 2021-02-06 19:06:56 +01:00
fabh2o
0972886b58 Merge branch 'append-narrator' of github.com:fabh2o/AAXtoMP3 into audible-cli-integration 2021-02-06 18:51:01 +01:00
fabh2o
822f5c3409 forgot to update help message 2021-02-06 18:38:03 +01:00
fabh2o
b8bef58122 fix indentation 2021-02-06 18:34:09 +01:00
fabh2o
f98ded7ca7 debugvar audibleCli 2021-02-06 18:27:13 +01:00
fabh2o
60b762bb29 append narrator name to the output folder 2021-02-06 18:26:14 +01:00
fabh2o
3c1f3692d4 Merge branch 'master' of github.com:KrumpetPirate/AAXtoMP3 into audible-cli-integration 2021-02-06 13:03:31 +01:00
KrumpetPirate
440c6302fb
Merge pull request #144 from fabh2o/mediainfo
Mediainfo tags
2021-02-05 20:52:19 -05:00
fabh2o
f74ec2e75a removed Audiobook (genre) dir from the output 2021-02-05 21:00:39 +01:00
fabh2o
f94cf1baa7 fix for find command: use basename 2021-02-05 16:53:43 +01:00
fabh2o
3fb377a107 debug var publisher 2021-02-05 16:13:06 +01:00
fabh2o
7aa50019a8 textwidth 80, note about dev stage of the a-cli package, rewrote file requirement 2021-02-05 16:10:38 +01:00
fabh2o
1f0b44d455 Merge branch 'master' of github.com:KrumpetPirate/AAXtoMP3 into audible-cli-integration 2021-02-05 15:38:35 +01:00
fabh2o
9ea5bf0899 restore ffmpeg to be silent 2021-02-05 15:33:07 +01:00
KrumpetPirate
ce3b5a5c18
Merge pull request #141 from Nicko98/master
Added compression levels for mp3, opus and flac
2021-02-05 08:58:52 -05:00
fabh2o
4870dc334a use publisher tag 2021-02-05 10:42:14 +01:00
fabh2o
712b69d8ec get metadata value 2021-02-05 10:39:00 +01:00
fabh2o
7be5ee8749 extract only some tags, not all 2021-02-05 10:37:23 +01:00
fabh2o
047d7eb6f3 validate_extra_files final touchs, mediainfo get only useful infos,
save chapter infos from audible-cli json, publisher tag,
cover crop, real track title
2021-02-05 10:22:12 +01:00
Nicko98
d11257410b
Added remark, that quality can't be increased.
Added a remark, that quality can't be increased over the quality of the original file.
2021-02-05 01:09:51 +01:00
fabh2o
5f390b4f59 Merge branch 'master' of github.com:fabh2o/AAXtoMP3 into audible-cli-integration 2021-02-04 14:27:54 +01:00
KrumpetPirate
8a82d9f661
Merge pull request #143 from fabh2o/exit-if-no-aax-found
Exit if no aax file is found
2021-02-04 07:46:57 -05:00
fabh2o
b7e978c8bb better HQ cover processing 2021-02-04 13:45:42 +01:00
fabh2o
d0b5bda46d fixed anchor 2021-02-04 13:39:20 +01:00
fabh2o
6171eab4f1 description of flag in options 2021-02-04 13:36:40 +01:00
Nicko98
db65efaf67
Added Compression levels for mp3, opus and flac 2021-02-04 11:20:13 +01:00
fabh2o
bcfdf0ac06 ignore jpg (cover) and json (chapters) files 2021-02-04 10:21:58 +01:00
fabh2o
0c9fa05aab return 1 if no aax file found 2021-02-04 10:09:33 +01:00
fabh2o
02e1132301 validate files 2021-02-04 09:59:19 +01:00
Nicko98
fd8a51d474
Added Compression levels for mp3, opus and flac 2021-02-04 01:06:33 +01:00
Nicko98
cbf75faa58
Added Compression levels for mp3, opus and flac 2021-02-04 01:02:03 +01:00
fabh2o
eceb4e2f09 flag 2021-02-03 16:47:19 +01:00
fabh2o
4080018295 Info about audible.cli integration 2021-02-03 16:44:47 +01:00
KrumpetPirate
d56369d45a
Merge pull request #140 from Nicko98/master
Updated README since chaptered mode works for flac as well
2021-02-03 10:01:58 -05:00
KrumpetPirate
277bbaec13
Add mediainfo as optional requirement to README 2021-02-03 09:09:20 -05:00
KrumpetPirate
84fb5bf004
Merge pull request #138 from fabh2o/master
Use mediainfo to parse additional metadata
2021-02-03 09:06:16 -05:00
fabh2o
82b865f55f comments about the reading of chapter infos 2021-02-03 14:24:02 +01:00
Nicko98
87a7a53352
updated README since chaptered flac works
--chaptered does work for flac as well, maybe my last pull-request fixed this.
2021-02-03 14:18:52 +01:00
Nicko98
c0fa0489cd
updated README, since chaptered flac works
--chaptered does work for flac as well, maybe my last pull-request fixed this.
2021-02-03 14:14:20 +01:00
fabh2o
d16a47049b
Merge branch 'master' into master 2021-02-03 11:07:56 +01:00
KrumpetPirate
3b4648519b
Merge pull request #139 from Nicko98/master
Way faster chapter splitting
2021-02-02 18:29:46 -05:00
Nicko98
ffb7e40961
Way faster chapter splitting
Just a little change in the ffmpeg call, but this massively increases the speed of chapter splitting. (In my first test approximately by a factor of 10.)
2021-02-02 23:01:23 +01:00
Nicko98
dc5309ebc3
Way faster chapter splitting
Just a little change in the ffmpeg call, but this massively increases the speed of chapter splitting. (In my first test approximately by a factor of 10.)
2021-02-02 22:56:09 +01:00
fabh2o
9a674d0127 Use mediainfo to parse additional metadata 2021-02-02 10:53:10 +01:00
KrumpetPirate
9e3a2a3787
Merge pull request #137 from Gelma/typo_28
Typo 28
2021-01-28 15:28:12 -05:00
Andrea Gelmini
9989aa5ad6 Add note about package install on Ubuntu 20.04
gelma@gopt:/tmp/AudioLibro$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

gelma@gopt:/tmp/AudioLibro$ sudo apt-get install ffmpeg libav-tools x264 x265 bc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libav-tools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  ffmpeg:i386 ffmpeg

E: Package 'libav-tools' has no installation candidate
2021-01-28 19:05:00 +01:00
Andrea Gelmini
b9f21a54f1 Fix typos 2021-01-28 19:01:38 +01:00
KrumpetPirate
a6f19f8aa1
Merge pull request #136 from Nicko98/master
Continue after interruption
2021-01-26 19:58:39 -05:00
Nicko98
d007e21227
Added --continue to README.md 2021-01-26 23:44:05 +01:00
Nicko98
32aacd2b42
Continue after interrupt
Until now, when the conversion of a audiobook gets interrrupted during the splitting phase, one has to delete all the output files and restart from beginning.
This can be very uncomfy, especially if it's a long audiobook and the computer did work on it for several hours.
I added some changes, so that one only has to delete the last (incompletely generated) chapter and add "--continue " to the command where CHAPTERNUMBER is the chapter, that has been interrupted while splitting of.
For this to work I mainly just skipped the steps which were already done before interruption with if-conditions.
2021-01-26 23:32:14 +01:00
KrumpetPirate
c4f2da205a
Merge pull request #134 from andreasziegl/patch-1
Print total chapter count when extracting chapters
2021-01-26 16:30:11 -05:00
andreasziegl
04b7d9ff45
Print total chapter count when extracting chapters 2021-01-18 11:11:51 +01:00
KrumpetPirate
2ef05cda00
Merge pull request #129 from NicoVIII/master
Remove chapter metadata in "chaptered mode"
2020-07-14 18:46:07 -04:00
Nico Linder
84d708f217 Remove chapters in "chaptered mode" 2020-07-14 10:21:26 +02:00
KrumpetPirate
60bf8b0d87
Merge pull request #122 from Gelma/typo
Fix typos
2020-04-17 19:59:35 -04:00
Andrea Gelmini
624ca434e0 Fix typos 2020-04-17 10:11:51 +02:00
KrumpetPirate
71f54b35e5
Merge pull request #121 from simcop2387/master
Small updates for Opus and metadata
2020-04-16 23:27:15 -04:00
Ryan Voots
a3ac4fb834 Small updates for Opus and metadata
Forcibly add the track and title metadata to the audio stream.  Fixes missing meta-data with Plex and possibly other programs.
Use the .opus file extension and ogg container for opus files to match recommended practice, and correct detection of opus files in Plex and other programs
2020-04-15 18:27:31 -07:00
KrumpetPirate
640ba915a9
Merge pull request #119 from 73k05/master
Fix mkdir: cannot create directory : File name too long
2020-03-05 20:14:52 -05:00
73k05
2d5902ed6e Fix mkdir: cannot create directory : File name too long On linux file name max is 143 characters. Fix max name to 100 characters 2020-03-05 23:43:53 +01:00
KrumpetPirate
1dfd8ae755 Default noclobber off 2019-10-06 00:00:54 -04:00
KrumpetPirate
9f8cda5899
Merge pull request #112 from FreedomBen/no-clobber
Add no-clobber option to CLI
2019-10-01 18:08:35 -04:00
Benjamin Porter
7b77b944cf Add no-clobber option to CLI
So the user can abort if the target directory would be overwritten.

Pork:  Remove trailing whitespace
2019-10-01 13:17:18 -06:00
KrumpetPirate
7d7dd0f91c
Merge pull request #105 from yzhernand/chaptered-mp4s
Create chaptered single-file m4a's/m4b's
2019-06-08 22:49:00 -04:00
Yozen Hernandez
3edb1b2fc8 Create chaptered single-file m4a's/m4b's
- Changes "container" for m4a and m4b to "mp4" as that is
the official container type.
- Changes "extension" checks for m4b to "container" checks
which check for "mp4". This makes it possible to produce
chaptered m4a files as well.
- Needs awk, but I think portable awk code is used. This
should probably be tested on other platforms, like macOS.
- Adds a check for mp4chaps, but that should be included
in the same package as mp4art.
- Only adds chapter data to mp4 files if using single-file
output mode.
2019-05-23 20:22:22 -04:00
KrumpetPirate
93ea984a53
Merge pull request #102 from mithomas/master
Fixed minor doc typos.
2019-03-17 16:28:39 -04:00
KrumpetPirate
29a6481664
Merge pull request #101 from javabrett/doc-fixes
Fixed minor doc-typos, some EOL whitespace. Fixed #95, fixed #96.
2019-03-17 16:28:28 -04:00
Michael Thomas
010dd7fb2d Fixed minor doc typos. 2019-03-17 16:07:11 +01:00
Brett Randall
abafa6285c Fixed minor doc-typos, some EOL whitespace. Fixed #95, fixed #96. 2019-03-16 23:43:41 +11:00
KrumpetPirate
5c2afd7d6c
Merge pull request #99 from javabrett/add-bc-in-script-prompt
Also add bc to apt-get install list as prompted by script
2019-03-10 12:03:17 -04:00
Brett Randall
243289c3ab Also add bc to apt-get install list as prompted by script. 2019-03-10 20:55:20 +11:00
KrumpetPirate
847f5fb721
Merge pull request #93 from supremesyntax/fix/m3ufile
fix file extension in m3u file
2018-11-30 18:19:00 -06:00
supremesyntax
13c240ab53
fix file extension in m3u file
Use file extension in m3u file rather than container format.
2018-11-30 08:50:13 +00:00
KrumpetPirate
3c7a5f1ac1
Merge pull request #90 from gorillamoe/fix/readme-chaptered-usage-example
Fix --chaptered usage example
2018-10-03 19:19:27 -05:00
Marco Kellershoff
06d49e9f27
Fix --chaptered usage example
The arguments `-aac` and `-em4b` did not exist.
Just changed them to the according options: `--aac` and `-e:m4b`.
2018-10-03 16:22:07 +02:00
KrumpetPirate
8b0f9a4989
Merge pull request #87 from pbowyer/patch-1
Add bc to Ubuntu package list
2018-08-27 18:09:13 -05:00
Peter Bowyer
61cb5b43d8
Add bc to Ubuntu package list
On a stock Ubuntu 16.04 server install, bc is not present, and splitting into chapter files fails.
2018-08-27 20:42:51 +01:00
KrumpetPirate
0d5f3b4098
Merge pull request #85 from upuv/master
README.md update to reflect recent changes in AAXtoMP3
2018-07-26 07:35:12 -05:00
upuv
b506b7a12a updated README.md to reflect changes. 2018-07-25 14:03:27 +10:00
upuv
09e82c0ed6
Merge pull request #5 from KrumpetPirate/master
Merge Krumpet Changes.
2018-07-25 13:58:23 +10:00
KrumpetPirate
7a78db51a8
Merge pull request #84 from Jamstah/master
Fix bad argument name in usage
2018-07-23 11:02:33 -05:00
James Hewitt
67a190b0a6
Fix bad argument name in usage 2018-07-22 21:46:15 +01:00
KrumpetPirate
e9f06c8089
Merge pull request #82 from dehylton/osx-gsed
check for GNU sed, recommend gnu-sed for mac os x if missing
2018-07-02 19:06:57 -05:00
Dewey Hylton
35308ccb11 check for GNU sed, recommend gnu-sed for mac os x if missing 2018-07-02 19:26:15 -04:00
KrumpetPirate
4040fb7ab9
Merge pull request #79 from upuv/master
Big Pull Request # 2
2018-06-29 18:05:52 -05:00
upuv
a92705fbbf Forced merge 2018-06-25 14:44:53 +10:00
upuv
8de33e9c10
Merge pull request #3 from b0wter/fedora_install
Added up-to-date instructions for Fedora/RHEL/CentOS
2018-06-25 14:31:31 +10:00
upuv
a6da4412b8 Fixing Bad Merge. 2018-06-25 14:17:30 +10:00
KrumpetPirate
3b66ef4443
Merge pull request #78 from KrumpetPirate/revert-57-master
Revert "Large Pull request"
2018-06-24 20:28:35 -05:00
KrumpetPirate
89ab63a235
Revert "Large Pull request" 2018-06-24 20:28:09 -05:00
KrumpetPirate
1c108acf4b
Merge pull request #57 from upuv/master
Large Pull request
2018-06-24 20:10:34 -05:00
Joe
fab6141ccf Added up-to-date instructions for how to install ffmpeg on Fedora and
RHEL/CentOS.
2018-06-23 00:21:52 +02:00
upuv
6d2768613c
Merge branch 'master' into master 2018-06-21 17:25:02 +10:00
upuv
101861f41c Fix for chapter length. 2018-06-21 17:21:18 +10:00
upuv
1af3f0ebcc Added checks for ffmpeg and ffprobe. 2018-06-21 17:07:47 +10:00
KrumpetPirate
2f8bb35b68
Merge pull request #61 from reidar-cederqvist/master
AAXtoMP3: fix how .authcode is located fix issue #60
2018-06-13 08:10:44 -05:00
Reidar Cederqvist
8ebd16ae8b AAXtoMP3: fix possition of dash when replacing colon 2018-06-07 09:26:38 +02:00
Reidar Cederqvist
db48c6a970 AAXtoMP3: fix how .authcode is located fix issue #60 2018-06-07 09:11:47 +02:00
upuv
03f1a58638 Verify aax files options Improvements 2018-06-06 00:39:33 +10:00
upuv
9d20609f3c More Refactor, Setting up for user defined file naming using variable names. 2018-06-04 17:11:12 +10:00
upuv
71e140259b Refactor some variables for readability. 2018-06-04 16:10:00 +10:00
upuv
c2082ccfc0 Big change to DEBUG Output. It now handles lists of vars to dump. Makes the code a little cleaner. 2018-06-03 23:15:31 +10:00
upuv
de6d5db3f2 Enhanced DEBUG output for command line options 2018-06-03 15:49:19 +10:00
upuv
8327f15ac2 Adding --complete_dir option and documentation 2018-06-03 15:34:56 +10:00
upuv
1727d10be3 Fixed usage string 2018-05-26 16:23:12 +10:00
upuv
09145b4df2 Fixed an issue with container setting. 2018-05-26 16:16:00 +10:00
upuv
84335828d9 Bug Fix, added --chaptered, Readme updates. 2018-05-26 15:27:39 +10:00
upuv
eaf75eb2e2 Fixed a regression. m4a and m4b now have coverart. 2018-05-24 15:36:05 +10:00
upuv
11292dc4c4 Cleaned up some more Readme 2018-05-23 23:49:34 +10:00
upuv
6d1a751b81 Cleaned up some more Readme 2018-05-23 23:23:40 +10:00
upuv
1f2cd830d6 Woops left reference to m4b script in readme. 2018-05-23 23:19:36 +10:00
upuv
67d4d05b52 Added in support for m4b, Removed old m4b script. 2018-05-23 23:18:23 +10:00
upuv
6f343c9191
Merge branch 'master' into master 2018-05-21 22:19:51 +10:00
upuv
ac656f9723 Inserting code comments for the next guy. 2018-05-20 00:50:48 +10:00
upuv
f2c78da132 Tweeking Part 2 Readme.md 2018-05-20 00:25:47 +10:00
upuv
5e8cffd0ae Tweeking Readme.md 2018-05-20 00:22:14 +10:00
upuv
73f8b3c1da Woops angle brackets in Readme 2018-05-19 23:53:32 +10:00
upuv
fdf9a08f67 Merge branch 'master' of https://github.com/upuv/AAXtoM4B 2018-05-19 23:47:59 +10:00
upuv
c3b53b6e56
Merge pull request #2 from upuv/tiddy
Tiddy merge Master
2018-05-19 23:47:30 +10:00
upuv
5cca255ae5 Merge branch 'tiddy' of https://github.com/upuv/AAXtoM4B 2018-05-19 23:42:41 +10:00
upuv
e848404d06 Merge branch 'master' of https://github.com/upuv/AAXtoM4B 2018-05-19 23:41:26 +10:00
upuv
e754e83b6b Added big FAT metadata to DEBUG output. 2018-05-19 23:35:11 +10:00
upuv
cd60926a58 Merge branch 'tiddy' of https://github.com/upuv/AAXtoM4B into tiddy 2018-05-19 23:12:16 +10:00
upuv
2ac1ba67ec remove redundant AAXtoM4A 2018-05-19 23:09:38 +10:00
upuv
b952cab104 Nuked redundant m4a script 2018-05-19 23:08:11 +10:00
upuv
0efe3fa28e
Redundant AAXtoMP3 now does this. 2018-05-19 23:07:04 +10:00
upuv
5ec1fcd2d9
Updated .gitignore
Attempting to avoid any accidental uploading to github of copyright material that only the user owns.
2018-05-19 23:04:08 +10:00
upuv
66dc8953ad Enhanced debug flag. 2018-05-19 23:01:34 +10:00
upuv
e69b212982 diferentiated between a log and debug message 2018-05-19 21:29:20 +10:00
upuv
aa1509b6ca
Merge pull request #1 from upuv/getopts
Getopts
2018-05-19 16:06:16 +10:00
upuv
ccfaf07021 some cleanup 2018-05-19 15:52:38 +10:00
upuv
dee0d7e9a0 some cleanup 2018-05-19 15:51:40 +10:00
upuv
41a2803e18 some cleanup 2018-05-19 15:48:08 +10:00
upuv
10ca1e53e3 some cleanup 2018-05-19 15:41:23 +10:00
upuv
f976940798 getopts update 2018-05-19 15:08:57 +10:00
Josta Yee
710ce0dfbe
Merge pull request #2 from KrumpetPirate/master
merge upstream
2018-04-18 16:34:02 +08:00
KrumpetPirate
8887bee900
Merge pull request #55 from thunder-hammer/patch-1
Corrected usage spelling
2018-04-16 17:12:33 -05:00
thunder-hammer
6ed19fcde2
Update AAXtoMP3
Corrected spelling in usage prompt
2018-04-16 16:09:47 -06:00
KrumpetPirate
219255826b Removed chaptered support from AAC encoding, doesn't seem to function 2018-04-06 11:12:47 -05:00
KrumpetPirate
ee0c971544 Set theme jekyll-theme-slate 2018-04-06 11:03:33 -05:00
KrumpetPirate
a691b5fd54
Merge pull request #53 from SendSpams/master
Fixed HOME environment variable missing under Windows
2018-04-06 10:55:32 -05:00
SendSpams
db014f8f51
Update AAXtoMP3 2018-04-06 07:04:19 +01:00
SendSpams
1d1f738713
Update AAXtoMP3 2018-04-06 07:03:25 +01:00
SendSpams
120f02fe07
Modified to work with missing HOME environment variable under Windows
The HOME environment variable is not set on Windows by default. Instead Windows uses USERPROFILE. It is possible for HOME to be set on Windows but for users who have not done this they will get: `HOME: unbound variable`. I have added a line that sets HOME to USERPROFILE if HOME is missing and USERPROFILE is found. This solves the unbound variable error.
2018-04-06 07:02:00 +01:00
KrumpetPirate
2ae7e326bb Renabled AAC for copy with no re-encode step 2018-03-22 14:06:19 -05:00
KrumpetPirate
e3d9a9ea35
Merge pull request #51 from corbolais/master
chg: use authcode file located in HOME dir.
2018-03-14 19:40:34 -05:00
Me
15945b18b1 chg: search HOME and local dir for authcode file in this order, first occurence accepted.
Signed-off-by: Me <corbolais@gmail.com>
2018-03-15 00:35:57 +01:00
Me
1031e3ae1d chg: use authcode file located in HOME dir.
Signed-off-by: Me <corbolais@gmail.com>
2018-03-14 16:46:45 +01:00
KrumpetPirate
626bab226a Updated readme for OPUS convertion, gitignore to ignore aax files in directory and output dir 2018-03-13 19:39:02 -05:00
KrumpetPirate
83e83d959f
Merge pull request #50 from bladegunner/add_opus
add support for the opus codec
2018-03-11 10:08:10 -05:00
Blade Gunner
d7752b4779 add support for the opus codec
it seems like ffmpeg still has some issues with the native opus
container format (*.opus), so let's use the OGG container format for
now.
2018-03-03 18:09:53 +01:00
upuv
214dd5a46c Updating README 2018-02-20 23:21:19 +11:00
upuv
76baaac18a Updating README 2018-02-20 23:19:58 +11:00
upuv
e5d1588825 Updating README 2018-02-20 23:18:25 +11:00
upuv
639940a497 Updating README 2018-02-20 23:16:34 +11:00
upuv
004094f842 Updating README 2018-02-20 23:13:27 +11:00
upuv
30cbe5d0f0 Updating README 2018-02-20 23:12:00 +11:00
upuv
cd0e5546f4 Updating README 2018-02-20 23:10:29 +11:00
upuv
e5c45ed119 Updating README 2018-02-20 23:03:52 +11:00
upuv
cfaa5b94ff Updating README 2018-02-20 22:50:34 +11:00
Mark Daku
5a7078bc99 Updating README 2018-02-20 22:43:54 +11:00
Mark Daku
c4eb954e11 Updating README 2018-02-20 22:43:02 +11:00
Mark Daku
8b391a0bd0 Updating README 2018-02-20 22:41:55 +11:00
Mark Daku
d0eb3540ed Updating README 2018-02-20 22:30:34 +11:00
Mark Daku
ab8db09eed Updating README 2018-02-20 22:27:52 +11:00
Josta Yee
bacdde31e3
Merge pull request #1 from upuv/master
Added m3u playlist support
2018-02-20 11:04:05 +08:00
KrumpetPirate
0c2c439d55 Removed AAX, causes issues with some audiobooks 2018-02-18 01:13:00 -06:00
KrumpetPirate
ed084692a2 Updated README 2018-02-18 00:34:33 -06:00
KrumpetPirate
da3ca76930
Merge pull request #40 from voltagex/aac
Add support for copying to m4b (no reencode)
2018-02-18 00:29:17 -06:00
KrumpetPirate
a09e502574 Fixed ':' in input file name protocol error 2018-02-18 00:27:31 -06:00
Mark Daku
304594e845 Added m3u playlist support 2018-02-18 17:26:45 +11:00
jostyee
bcd6ffd14b Convert aax to m4b 2017-11-22 16:31:42 +08:00
Adam Baxter
1132602f65 Add support for copying to m4b (no reencode) 2017-11-16 00:16:24 +11:00
Francis Chong
176c30c42c add m4a conversion script 2017-11-03 11:33:21 +08:00
KrumpetPirate
de01589b94 Merge pull request #38 from dloeckx/master
Add cover art + improve track metadata
2017-10-22 21:40:38 -05:00
Dirk Loeckx
972123a932 Update metadata: track number = chapternum, appended chapter number to track title
track number was eg "Chapter 03", and is now eg 3 . This fits better in most mp3 players.
track title was the book title for all tracks, now it is eg "Book Title - 01 Chapter 1" (same as filename)
2017-10-22 22:54:10 +02:00
Dirk Loeckx
1ac66d1a94 Embedded cover art to (chapter) MP3's 2017-10-22 22:51:41 +02:00
KrumpetPirate
15abb34c0e Merge pull request #36 from thecb1/better-chapter-names
Update of chapter titles with sortable 0padded numbers
2017-10-21 18:51:30 -05:00
KrumpetPirate
6c33459f24 Merge branch 'master' into better-chapter-names 2017-10-21 18:51:21 -05:00
KrumpetPirate
f06b768c55 Merge pull request #34 from thecb1/patch-1
Fix chaptercount for 0-padding
2017-10-21 18:48:55 -05:00
cb1
2fc7329bf5 Update of chapter titles with sortable 0padded numbers
* Removed chapter_padding()
* Fixed $chaptercount
* Redone 0-padded chapter titles with printf()
2017-10-20 14:44:32 +02:00
cb1
f7c4d0dce8 Fix chaptercount for 0-padding 2017-10-18 17:55:19 +02:00
KrumpetPirate
1017f9a6e7 Updated grep detection with README changes and better colon support 2017-10-12 20:27:04 -05:00
Travis Neeley
c500062c96 Added ggrep detection for OSX 2017-10-09 18:09:43 -05:00
Travis Neeley
05274634d4 Removed strange _config.yml file... 2017-09-08 08:51:49 -05:00
KrumpetPirate
240068be87 Merge pull request #28 from 2001db8/patch-1
Added chapter padding
2017-09-07 21:01:09 -05:00
Jens
ee01461f9a Added chapter padding
As discussed in https://github.com/KrumpetPirate/AAXtoMP3/issues/26 I've added a quick and dirty fix to add chapter padding (for audio books containing up to 999 chapters) for non-single conversion mode.
2017-09-06 19:39:02 +02:00
KrumpetPirate
8002baf1c5 Set theme jekyll-theme-midnight 2017-06-29 13:17:41 -05:00
KrumpetPirate
56b6b6ad98 Set theme jekyll-theme-slate 2017-06-29 12:28:17 -05:00
5 changed files with 1437 additions and 116 deletions

4
.gitignore vendored
View File

@ -1,2 +1,6 @@
ACTIVATION
.authcode
*aax
*jpg
*json
Audiobook/*

1082
AAXtoMP3

File diff suppressed because it is too large Load Diff

307
README.md
View File

@ -1,8 +1,8 @@
# AAXtoMP3
The purpose of this software is to convert AAX files to a more common MP3 format
The purpose of this software is to convert AAX (or AAXC) files to common MP3, M4A, M4B, flac and ogg formats
through a basic bash script frontend to FFMPEG.
Audible uses this file format to maintain DRM restrictions on their audio
Audible uses the AAX file format to maintain DRM restrictions on their audio
books and if you download your book through your library it will be
stored in this format.
@ -12,48 +12,291 @@ your **personal** Audible account. The purpose of this software is to
create a method for you to download and store your books just in case
Audible fails for some reason.
## Setup
You will need your four byte authentication code that comes from Audible's
servers. This will be used by ffmpeg to perform the initial audio convert. You
can obtain this string from a tool like [audible-activator](https://github.com/inAudible-NG/audible-activator).
## Requirements
* bash 4.3.42 or later tested
* ffmpeg version 2.8.3 or later
* libmp3lame (came from lame package on Arch, not sure where else this is stored)
* bash 3.2.57 or later tested
* ffmpeg version 2.8.3 or later (4.4 or later if the input file is `.aaxc`)
* libmp3lame - (typically 'lame' in your system's package manager)
* GNU grep - macOS or BSD users may need to install through package manager
* GNU sed - see above
* GNU find - see above
* jq - only if `--use-audible-cli-data` is set or if converting an .aaxc file
* mp4art used to add cover art to m4a and m4b files. Optional
* mediainfo used to add additional media tags like narrator. Optional
## OSX
Thanks to thibaudcolas, this script has been tested on OSX 10.11.6 El Capitan. YMMV, but it should work for
conversions in OSX.
## AUR
Thanks to kbabioch, this script has also been packaged in the [AUR](https://aur.archlinux.org/packages/aaxtomp3-git/). Note that you will still need to extract your activation bytes before use.
## Usage
## Usage(s)
```
bash AAXtoMP3 <AUTHCODE> {INPUT_FILES}
bash AAXtoMP3 [-f|--flac] [-o|--opus] [-a|--aac] [-s|--single] [--level <COMPRESSIONLEVEL>] [-c|--chaptered] [-e:mp3] [-e:m4a] [-e:m4b] [-A|--authcode <AUTHCODE>] [-n|--no-clobber] [-t|--target_dir <PATH>] [-C|--complete_dir <PATH>] [-V|--validate] [--use-audible-cli-data]] [-d|--debug] [-h|--help] [--continue <CHAPTERNUMBER>] <AAX/AAXC INPUT_FILES>...
```
or if you want to get guided through the options
```
bash interactiveAAXtoMP3 [-a|--advanced] [-h|--help]
```
* AUTHCODE: **your** Audible auth code (it won't correctly decode otherwise) (required)
* Everything else is considered an input file, useful for batching!
You can also convert the output to FLAC encoding instead of MP3 by doing the following *in order*:
```
bash AAXtoMP3 --flac <AUTHCODE> {INPUT_FILES}
```
Note that FLAC encoding is typically a little faster, at the cost of compatibility with some players.
* **&lt;AAX INPUT_FILES&gt;**... are considered input file(s), useful for batching!
If you wish to convert to a single file you can add --single to the input. This will prevent chaptered content from being extracted.
## Options for AAXtoMP3
* **-f** or **--flac** Flac Encoding and as default produces a single file.
* **-o** or **--opus** Ogg/Opus Encoding defaults to multiple file output by chapter. The extension is .ogg
* **-a** or **--aac** AAC Encoding and produce a m4a single files output.
* **-A** or **--authcode &lt;AUTHCODE&gt;** for this execution of the command use the provided &lt;AUTHCODE&gt; to decode the AAX file. Not needed if the source file is .aaxc.
* **-n** or **--no-clobber** If set and the target directory already exists, AAXtoMP3 will exit without overwriting anything.
* **-t** or **--target_dir &lt;PATH&gt;** change the default output location to the named &lt;PATH&gt;. Note the default location is ./Audiobook of the directory to which each AAX file resides.
* **-C** or **--complete_dir &lt;PATH&gt;** a directory to place aax files after they have been decoded successfully. Note make a back up of your aax files prior to using this option. Just in case something goes wrong.
* **-V** or **--validate** Perform 2 validation tests on the supplied aax files. This is more extensive than the normal validation as we attempt to transcode the aax file to a null file. This can take a long period of time. However it is useful when inspecting a large set of aax files prior to transcoding. As download errors are common with Audible servers.
* **-e:mp3** Identical to defaults.
* **-e:m4a** Create a m4a audio file. This is identical to --aac
* **-e:m4b** Create a m4b audio file. This is the book version of the m4a format.
* **-s** or **--single** Output a single file for the entire book. If you only want a single ogg file for instance.
* **-c** or **--chaptered** Output a single file per chapter. The `--chaptered` will only work if it follows the `--aac -e:m4a -e:m4b --flac` options.
* **--continue &lt;CHAPTERNUMBER&gt;** If the splitting into chapters gets interrupted (e.g. by a weak battery on your laptop) you can go on where the process got interrupted. Just delete the last chapter (which was incompletely generated) and redo the task with "--continue &lt;CHAPTERNUMBER&gt;" where CHAPTERNUMBER is the chapter that got interrupted.
* **--level &lt;COMPRESSIONLEVEL&gt;** Set compression level. May be given for mp3, flac and opus.
* **--keep-author &lt;FIELD&gt;** If a book has multiple authors and you don't want all of them in the metadata, with this flag you can specify a specific author (1 is the first, 2 is the second...) to keep while discarding the others.
* **--author &lt;AUTHOR&gt;** Manually set the author metadata field, useful if you have multiple books of the same author but the name reported is different (eg. spacing, accents..). Has precedence over `--keep-author`.
* **-l** or **--loglevel &lt;LOGLEVEL&gt;** Set loglevel: 0 = progress only, 1 (default) = more information, output of chapter splitting progress is limitted to a progressbar, 2 = more information, especially on chapter splitting, 3 = debug mode
* **--dir-naming-scheme &lt;STRING&gt;** or **-D** Use a custom directory naming scheme, with variables. See [below](#custom-naming-scheme) for more info.
* **--file-naming-scheme &lt;STRING&gt;** or **-F** Use a custom file naming scheme, with variables. See [below](#custom-naming-scheme) for more info.
* **--chapter-naming-scheme &lt;STRING&gt;** Use a custom chapter naming scheme, with variables. See [below](#custom-naming-scheme) for more info.
* **--use-audible-cli-data** Use additional data got with mkb79/audible-cli. See [below](#audible-cli-integration) for more info. Needed for the files in the `aaxc` format.
* **--audible-cli-library-file** or **-L** Path of the library-file, generated by mkb79/audible-cli (`audible library export -o ./library.tsv`). Only available if `--use-audible-cli-data` is set. This file is required to parse additional metadata such as `$series` or `$series_sequence`.
* **--ffmpeg-path** Set the ffmpeg/ffprobe binaries folder. Both of them must be executable and in the same folder.
* **--ffmpeg-name** Set a custom name for the ffmpeg binary. Must be executable and in path, or in custom path specified by --ffmpeg-path.
* **--ffprobe-name** Set a custom name for the ffprobe binary. Must be executable and in path, or in custom path specified by --ffmpeg-path.
Additionally, if you have a .authcode file available in the current working directory, it will read the first line of
that line and treat it like your auth_code. When you do this you do not need to specify an AUTHCODE input.
## Options for interactiveAAXtoMP3
* **-a** or **--advanced** Get more options to choose. Not used right now.
* **-h** or **--help** Get a help prompt.
This script presents you the options you chose last time as default.
When you get asked for the aax-file you may just drag'n'drop it to the terminal.
Here is the full usage (NOTE: Order matters!)
### AUTHCODE
**Your** Audible auth code (it won't correctly decode otherwise) (not required to decode the `aaxc` format).
#### Determining your own AUTHCODE
You will need your authentication code that comes from Audible's servers. This
will be used by ffmpeg to perform the initial audio convert. You can obtain
this string from a tool like
[audible-activator](https://github.com/inAudible-NG/audible-activator) or like [audible-cli](https://github.com/mkb79/audible-cli).
#### Specifying the AUTHCODE.
In order of __precidence__.
1. __--authcode [AUTHCODE]__ The command line option. With the highest precedence.
2. __.authcode__ If this file is placed in the current working directory and contains only the authcode it is used if the above is not.
3. __~/.authcode__ a global config file for all the tools. And is used as the default if none of the above are specified.
__Note:__ At least one of the above must be exist if converting `aax` files. The code must also match the encoding for the user that owns the AAX file(s). If the authcode does not match the AAX file no transcoding will occur.
### MP3 Encoding
* This is the **default** encoding
* Produces 1 or more mp3 files for the AAX title.
* The default mode is **chaptered**
* If you want a mp3 file per chapter do not use the **--single** option.
* A m3u playlist file will also be created in this instance in the case of **default** chaptered output.
* **--level** has to be in range 0-9, where 9 is fastest and 0 is highest quality. Please note: The quality can **never** become higher than the qualitiy of the original aax file!
### Ogg/Opus Encoding
* Can be done by using the **-o** or **--opus** command line switches
* The default mode is **chaptered**
* Opus coded files are stored in the ogg container format for better compatibility.
* **--level** has to be in range 0-10, where 0 is fastest and 10 is highest quality. Please note: The quality can **never** become higher than the qualitiy of the original aax file!
### AAC Encoding
* Can be done by using the **-a** or **--aac** command line switches
* The default mode is **single**
* Designed to be the successor of the MP3 format
* Generally achieves better sound quality than MP3 at the same bit rate.
* This will only produce 1 audio file as output.
### FLAC Encoding
* Can be done by using the **-f** or **--flac** command line switches
* The default mode is **single**
* FLAC is an open format with royalty-free licensing
* This will only produce 1 audio file as output. If you want a flac file per chapter do use **-c** or **--chaptered**.
* **--level** has to be in range 0-12, where 0 is fastest and 12 is highest compression. Since flac is lossless, the quality always remains the same.
### M4A and M4B Containers
* These containers were created by Apple Inc. They were meant to be the successor to mp3.
* M4A is a container that is meant to hold music and is typically of a higher bitrate.
* M4B is a container that is meant to hold audiobooks and is typically has bitrates of 64k and 32k.
* Both formats are chaptered
* Both support coverart internal
* The default mode is **single**
### Validating AAX files
* The **--validate** option will result in only a validation pass over the supplied aax file(s). No transcoding will occur. This is useful when you wish to ensure you have a proper download of your personal Audible audio books. With this option all supplied books are validated.
* If you do NOT supply the **--validate** option all audio books are still validated when they are processed. However if there is an invalid audio book in the supplied list of books the processing will stop at that point.
* A third test is performed on the file where the entire file is inspected to see if it is valid. This is a lengthy process. However it will not break the script when an invalid file is found.
* The 3 test current are:
1. aax present
1. meta data header in file is valid and complete
1. entire file is valid and complete. _only executed with the **--validate** option._
### Defaults
* Default out put directory is the base directory of each file listed. Plus the genre, Artist and Title of the Audio Book.
* The default codec is mp3
* The default output is by chapter.
### Custom naming scheme
The following flags can modify the default naming scheme:
* **--dir-naming-scheme** or **-D**
* **--file-naming-scheme** or **-F**
* **--chapter-naming-scheme**
Each flag takes a string as argument. If the string contains a variable defined in the script (eg. artist, title, chapter, narrator...), the corresponding value is used.
The default options correspond to the following flags:
* `--dir-naming-scheme '$genre/$artist/$title'`
* `--file-naming-scheme '$title'`
* `--chapter-naming-scheme '$title-$(printf %0${#chaptercount}d $chapternum) $chapter'`
Additional notes:
* If a command substitution is present in the passed string, (for example `$(printf %0${#chaptercount}d $chapternum)`, used to pad with zeros the chapter number), the commands are executed.
So you can use `--dir-naming-scheme '$(date +%Y)/$artist'`, but using `--file-naming-scheme '$(rm -rf /)'` is a really bad idea. Be careful.
* You can use basic text, like `--dir-naming-scheme 'Converted/$title'`
* You can also use shell variables as long as you escape them properly: `CustomGenre=Horror ./AAXtoMP3 --dir-naming-scheme "$CustomGenre/\$artist/\$title" *.aax`
* If you want shorter chapter names, use `--chapter-naming-scheme '$(printf %0${#chaptercount}d $chapternum) $chapter'`: only chapter number and chapter name
* If you want to append the narrator name to the title, use `--dir-naming-scheme '$genre/$artist/$title-$narrator' --file-naming-scheme '$title-$narrator'`
* If you don't want to have the books separated by author, use `--dir-naming-scheme '$genre/$title'`
* To be able to use `$series` or `$series_sequence` in the schemes the following is required:
* `--use-audible-cli-data` is set
* you have pre-generated the library-file via `audible library export -o ./library.tsv`
* you have set the path to the generated library-file via `--audible-cli-library-file ./library.tsv`
### Installing Dependencies.
In general, take a look at [command-not-found.com](https://command-not-found.com/)
#### FFMPEG,FFPROBE
__Ubuntu, Linux Mint, Debian__
```
bash AAXtoMP3 [--flac] [--single] AUTHCODE {FILES}
sudo apt-get update
sudo apt-get install ffmpeg libav-tools x264 x265 bc
```
In Debian-based system's repositories the ffmpeg version is often outdated. If you want
to convert .aaxc files, you need at least ffmpeg 4.4. So if your installed version
needs to be updated, you can either install a custom repository that has the newer version,
compile ffmpeg from source or download pre-compiled binaries.
You can then tell AAXtoMP3 to use the compiled binaries with the `--ffmpeg-path` flag.
You need to specify the folder where the ffmpeg and ffprobe binaries are. Make sure
they are both executable.
If you have snapd installed, you can also install a recent version of 4.4 from the edge channel:
```
snap install ffmpeg --edge
```
In this case you will need to confiure a custom path _and_ binary name for ffprobe, `--ffmpeg-path /snap/bin/ --ffprobe-name ffmpeg.ffprobe`.
__Fedora__
Fedora users need to enable the rpm fusion repository to install ffmpeg. Version 22 and upwards are currently supported. The following command works independent of your current version:
```
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
```
Afterwards use the package manager to install ffmpeg:
```
sudo dnf install ffmpeg
```
__RHEL or compatible like CentOS__
RHEL version 6 and 7 are currently able to use rpm fusion.
In order to use rpm fusion you have to enable EPEL, see http://fedoraproject.org/wiki/EPEL
Add the rpm fusion repositories in version 6
```
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-6.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-6.noarch.rpm
```
or version 7:
```
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
```
then install ffmpeg:
```
sudo yum install ffmpeg
```
__MacOS__
```
brew install ffmpeg
brew install gnu-sed
brew install grep
brew install findutils
```
#### mp4art/mp4chaps
_Note: This is an optional dependency, required for adding cover art to m4a and b4b files only._
__Ubuntu, Linux Mint, Debian__
```
sudo apt-get update
sudo apt-get install mp4v2-utils
```
On Debian and Ubuntu the mp4v2-utils package has been deprecated and removed, as the upsteam project is no longer maintained.
The package was removed in Debian Buster, and Ubuntu Focal [ 20.04 ].
__CentOS, RHEL & Fedora__
```
# CentOS/RHEL and Fedora users make sure that you have enabled atrpms repository in system. Lets begin installing FFmpeg as per your operating system.
yum install mp4v2-utils
```
__MacOS__
```
brew install mp4v2
```
#### mediainfo
_Note: This is an optional dependency._
__Ubuntu, Linux Mint, Debian__
```
sudo apt-get update
sudo apt-get install mediainfo
```
__CentOS, RHEL & Fedora__
```
yum install mediainfo
```
__MacOS__
```
brew install mediainfo
```
## AAXC files
The AAXC format is a new Audible encryption format, meant to replace the old AAX.
The encryption has been updated, and now to decrypt the file the authcode
is not sufficient, we need two "keys" which are unique for each audiobook.
Since getting those keys is not simple, for now the method used to get them
is handled by the package audible-cli, that stores
them in a file when downloading the aaxc file. This means that in order to
decrypt the aaxc files, they must be downloaded with audible-cli.
Note that you need at least [ffmpeg 4.4](#ffmpegffprobe).
## Audible-cli integration
Some information are not present in the AAX file. For example the chapters's
title, additional chapters division (Opening and End credits, Copyright and
more). Those information are avaiable via a non-public audible API. This
[repo](https://github.com/mkb79/Audible) provides a python API wrapper, and the
[audible-cli](https://github.com/mkb79/audible-cli) packege makes easy to get
more info. In particular the flags **--cover --cover-size 1215 --chapter**
downloads a better-quality cover (.jpg) and detailed chapter infos (.json).
More info are avaiable on the package page.
Some books might not be avaiable in the old `aax` format, but only in the newer
`aaxc` format. In that case, you can use [audible-cli](https://github.com/mkb79/audible-cli)
to download them. For example, to download all the books in your library in the newer `aaxc` format, as well as
chapters's title and an HQ cover: `audible download --all --aaxc --cover --cover-size 1215 --chapter`.
To make AAXtoMP3 use the additional data, specify the **--use-audible-cli-data**
flag: it expects the cover and the chapter files (and the voucher, if converting
an aaxc file) to be in the same location of the AAX file. The naming of these
files must be the one set by audible-cli. When converting aaxc files, the variable
is automatically set, so be sure to follow the instructions in this paragraph.
For more information on how to use the `audible-cli` package, check out the git page [audible-cli](https://github.com/mkb79/audible-cli).
Please note that right now audible-cli is in dev stage, so keep in mind that the
naming scheme of the additional files, the flags syntax and other things can
change without warning.
## Anti-Piracy Notice
Note that this project does NOT crack the DRM. It simply allows the user to
Note that this project **does NOT crack** the DRM. It simply allows the user to
use their own encryption key (fetched from Audible servers) to decrypt the
audiobook in the same manner that the official audiobook playing software does.

1
_config.yml Normal file
View File

@ -0,0 +1 @@
theme: jekyll-theme-slate

159
interactiveAAXtoMP3 Normal file
View File

@ -0,0 +1,159 @@
#!/usr/bin/env bash
# ===Note for contributors========================================================================================================================
# This script interactively asks the user for the options to call AAXtoMP3 with. This first version does not include all options of AAXtoMP3
# since I tried to keep the dialog short, but I added an --advanced option, which is unused right now, but might be used in the future to add
# more options which only show up if explicitely wanted.
# If you want to add functionality please consider, whether the functionality you add might belong to the advanced options.
# ===Variables====================================================================================================================================
# Help message
help=$'\nUsage: interactiveAAXtoMP3 [--advanced] [--help]\n
--advanced More options
--help Print this message\n'
summary="" # This will contain a summary of the options allready set.
call="./AAXtoMP3" # This will contain the call for AAXtoMP3.
advanced=0 # Toggles advanced options on or off.
# ===Options======================================================================================================================================
while true; do
case "$1" in
# Advanced options.
-a | --advanced ) advanced=1; shift ;;
# Command synopsis.
-h | --help ) echo -e "$help"; exit ;;
# Anything else stops command line processing.
* ) break ;;
esac
done
# ===Cross platform compatible use grep and sed===================================================================================================
# ===Detect which annoying version of grep we have===
GREP=$(grep --version | grep -q GNU && echo "grep" || echo "ggrep")
if ! [[ $(type -P "$GREP") ]]; then
echo "$GREP (GNU grep) is not in your PATH"
echo "Without it, this script will break."
echo "On macOS, you may want to try: brew install grep"
exit 1
fi
# ===Detect which annoying version of sed we have===
SED=$(sed --version 2>&1 | $GREP -q GNU && echo "sed" || echo "gsed")
if ! [[ $(type -P "$SED") ]]; then
echo "$SED (GNU sed) is not in your PATH"
echo "Without it, this script will break."
echo "On macOS, you may want to try: brew install gnu-sed"
exit 1
fi
# ===Get options from last time===================================================================================================================
# ===Set default values===
lastcodec="mp3"
lastcompression="4"
lastchapters="yes"
lastauthcode=""
lastloglevel="1"
# ===Get Values from last time===
if [ -f ".interactivesave" ]; then
for ((i=1;i<=$(wc -l .interactivesave | cut -d " " -f 1);i++)) do
line=$(head -$i .interactivesave | tail -1)
case $(echo $line | cut -d " " -f 1 | $SED 's/.$//') in
codec ) lastcodec="$(echo $line | cut -d " " -f 2)";;
compression ) lastcompression="$(echo $line | cut -d " " -f 2)";;
chapters ) lastchapters="$(echo $line | cut -d " " -f 2)";;
authcode ) lastauthcode="$(echo $line | cut -d " " -f 2)";;
loglevel ) lastloglevel="$(echo $line | cut -d " " -f 2)";;
* ) rm .interactivesave; exit 1;;
esac
done
fi
# ===Get options for AAXtoMP3=====================================================================================================================
# ===Codec===
while true; do
clear;
read -e -p "codec (mp3/m4a/m4b/flac/aac/opus): " -i "$lastcodec" codec
case "$codec" in
mp3 ) summary="$summary""codec: $codec"; call="$call -e:mp3"; break;;
m4a ) summary="$summary""codec: $codec"; call="$call -e:m4a"; break;;
m4b ) summary="$summary""codec: $codec"; call="$call -e:m4b"; break;;
flac ) summary="$summary""codec: $codec"; call="$call --flac"; break;;
aac ) summary="$summary""codec: $codec"; call="$call --aac"; break;;
opus ) summary="$summary""codec: $codec"; call="$call --opus"; break;;
esac
done
# ===Compression===
while true; do
clear; echo -e "$summary"
case "$codec" in
mp3 ) maxlevel=9;;
flac ) maxlevel=12;;
opus ) maxlevel=10;;
* ) break;;
esac
read -e -p "compression level (0-$maxlevel): " -i "$lastcompression" compression
if [[ $compression =~ ^[0-9]+$ ]] && [[ "$compression" -ge "0" ]] && [[ "$compression" -le "$maxlevel" ]]; then
summary="$summary""\ncompression level: $compression"
call="$call --level $compression"
break
fi
done
# ===Chapters===
while true; do
clear; echo -e "$summary"
read -e -p "chapters (yes/no/chapternumber to continue with): " -i "$lastchapters" chapters
case "$chapters" in
^[0-9]+$ ) summary="$summary""\nchapters: $chapters"; call="$call -c --continue ${chapters}"; break;;
yes ) summary="$summary""\nchapters: $chapters"; call="$call -c"; break;;
no ) summary="$summary""\nchapters: $chapters"; call="$call -s"; break;;
esac
done
# ===Authcode===
if ! [ -r .authcode ] || [ -r ~/.authcode ]; then
clear; echo -e "$summary"
read -e -p "Authcode: " -i "$lastauthcode" authcode
summary="$summary""\nauthcode: $authcode"
call="$call -A $authcode"
fi
# ===Loglevel===
while true; do
clear; echo -e "$summary"
read -e -p "loglevel (0/1/2/3): " -i "$lastloglevel" loglevel
if [[ $loglevel =~ ^[0-9]+$ ]] && [[ "$loglevel" -ge "0" ]] && [[ "$loglevel" -le "3" ]]; then
summary="$summary""\nloglevel: $loglevel"
call="$call -l $loglevel"
break
fi
done
# ===File===
clear; echo -e "$summary"
read -p "aax-file: " file
file="${file%\'}" #remove suffix ' if file is given via drag'n'drop
file="${file#\'}" #remove prefix ' if file is given via drag'n'drop
savefile="$summary"
summary="$summary""\naax-file: $file"
call="$call $(echo $file | $SED "s;~;$HOME;")"
# ===Summerize chosen options and call AAXtoMP3===================================================================================================
# ===Summary===
clear; echo -e "$summary\n"
echo -e "$call\n"
# ===Save chosen options===
echo -e $savefile | $SED "s;\ level:;:;" > .interactivesave
# ===Call AAXtoMP3===
$call