aedocw / epub2tts

Turn an epub or text file into an audiobook
Apache License 2.0
426 stars 43 forks source link

Add cover image #191

Closed aedocw closed 5 months ago

aedocw commented 5 months ago

Per discussion https://github.com/aedocw/epub2tts/discussions/190, it would be nice to be able to add cover art to the audiobook.

Should be able to do this with:

from mutagen import mp4
m4b = mp4.MP4(m4b_filename)
cover_image = open(cover_image, "rb").read()
m4b["covr"] = [mp4.MP4Cover(cover_image)]
m4b.save()