Additional feature python scripts for post extracted libby .mp3s #35
hoodedrobin1
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First I want to state that I probably didn't read directions well enough and there is a good chance I didn't know what the heck I was doing - so this might not be useful for you. This is my first time writing python code for a pre-existing project so its a little rough.
I was not able to keep chapters when converting to .m4b so I wrote the following. I did use chatgpt for a couple parts as I didn't know all of the ffmpeg settings and also I wanted messages if there were errors while running the scripts. (they are attached in a zip file, I don't know how to add ,py scripts to a post)
The first script I created was to add all of the .mp3 files in a directory to a .m4b file (I was only able to do 1 mp3 at a time and not convert into 1 .m4b):
convertToM4bFULL.py
I wanted to be able to count the number of chapters a .m4b file had - which seem to be lost when converting the .mp3 to .m4b (see above):
countchapters.py
I created a python script to convert the .json file to a chapters.txt file for ffmpeg to add chapters to a .m4b:
json_to_chapters_txt.py
lastly I wanted to add the chapters from chapters.txt to the .m4b:
chapterize.py
here are the python scripts: extra_libby_scripts.zip
Beta Was this translation helpful? Give feedback.
All reactions