Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate m4b audiobook from files #110

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fmartingr
Copy link

This is a proof of concept to improve audiobook download by:

  • Download cover.jpg
  • ffmpeg helper files:
    • Generate a files.txt with the list of mp3 files downloaded
    • Generate a metadata.txt with metadata and chapter information
  • Added Series and SeriesNumber to name formatting
  • Added a new --generate-audiobook flag to book get command to run some ffmpeg commands to generate a m4b bundle file with the cover, metadata and chapter information from kobo. Obviously this requires ffmpeg to be present in the system.
  • Added ffmpeg to the Dockerfile

Let me know what you think and what guidelines should I follow to leave this to the finish line. I have been out of the python world for years so I'm a bit rusty.

@subdavis
Copy link
Owner

Thank you for your contribution! The barrier to entry is pretty low over here and the project isn't all that active, so my code quality standards aren't going to be all that stringent.

I'll give this a test, see if there are any low-hanging-fruit for quality improvements, and get back to you.

@subdavis
Copy link
Owner

I see, this is mainly just some wrapping around ffmpeg.

I feel like this is a bit out of scope for the project, but since you want it, I'd be happy to try to include it. I may switch to https://pypi.org/project/pyffmpeg/ to improve the install experience for non-docker users. Bundling the pyexe is probably going to break too, so that might prevent me from accepting this contribution, but I'll give it a shot.

@subdavis
Copy link
Owner

On second thought, I may just leave the ffmpeg install as an exercise for the user if they want this feature, which is what you did. That seems quite reasonable.

@fmartingr
Copy link
Author

On second thought, I may just leave the ffmpeg install as an exercise for the user if they want this feature, which is what you did. That seems quite reasonable.

Hey! Sorry for answering a bit late. I have no issues in removing the ffmpeg part if that complicates delivery and provide the a script in the documentation for people to bundle the m4b manually. That's how I did it at the beginning, but I didn't thought about windows and distributing the binary tbh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants