Closed mperkh closed 5 years ago
Could be done via mp4art
, since it is possible to add more than one image. I'll take a look at this, but this could take a while, since I've got a big project going on, which you might like more ;)
andreas:homebrew-tap andreas$ mp4art -h
Usage: mp4art [OPTION]... ACTION file...
For each mp4 (m4a) file specified, perform the specified ACTION. An action
must be specified. Some options are not applicable for some actions.
ACTIONS
--list list all covr-boxes
--add IMG add covr-box from IMG file
--replace IMG replace covr-box with IMG file
--remove remove covr-box
--extract extract covr-box
ACTION PARAMETERS
--art-any act on all covr-boxes (default)
--art-index IDX act on covr-box index IDX
OPTIONS
-z, --optimize optimize mp4 file after modification
-y, --dryrun do not actually create or modify any files
-k, --keepgoing continue batch processing even after errors
-o, --overwrite overwrite existing files when creating
-f, --force force overwrite even if file is read-only
-q, --quiet equivalent to --verbose 0
-d, --debug NUM increase debug or long-option to set NUM
-v, --verbose NUM increase verbosity or long-option to set NUM
-h, --help print brief help or long-option for extended help
--version print version information and exit
Thanks for the reply. Tried to find more info on that topic. It's not possible to do that with mp4art
.
This seems to be a feature, introduced by Apple, called https://en.wikipedia.org/wiki/Enhanced_podcast.
Was able to create a mjpeg track using this FFmpeg command:
ffmpeg -f concat -i files.txt -vcodec mjpeg -f mov -q:v 15 -huffman optimal -r 0.5 output.mp4
with files.txt
file '001.jpg'
duration 5
file '002.jpg'
duration 5
file '003.jpg'
duration 5
file '003.jpg'
The above command creates an mp4 file, with a jpeg
track/codec id. But how and with which tool this track can be muxed into the final m4b, with appropriate menu
and menu for
tags set, is unclear by now.
Well, on trying to merge e.g. files 01.mp3, 02.mp3, 03.mp3
this could be possible:
01-cover.mp4
with ffmpeg -f concat -i files.txt -vcodec mjpeg -f mov -q:v 15 -huffman optimal -r 0.5 01-cover.mp4
with files.txt containing file 01.jpg duration 5
01.mp3
to 01.m4b
02.mp3
and 03.mp3
merge following list:
01-cover.m4b
01.m4b
02-cover.m4b
02.m4b
03-cover.m4b
03.m4b
But i'm not sure what ffmpeg produces here. Besides a combination of fdkaac and chapter covers could be difficult to handle.
I'm really sorry to close this one unresolved, but since it has been open for a very long time and i did not find a possibility to solve this, it makes no sense to keep this open all the time. If there is some new information, it will be reopened.
I think this is not possible now with
m4b-tool
, but would be a nice feature, if that can be integrated. Guess it can be done using FFmpeg or mp4v2. Tested on VLC (iOS, Android - VLC on Android only offers chapter navigation, if such a thumb track is available, I guess because then it thinks it is a video and handles the file differently) and iTunes/iOS books app - these apps can display these thumb images.Proposal:
Perhaps it can be done like this:
https://trac.ffmpeg.org/wiki/Slideshow(edit: this seems to create just a h264 video track, but not a JPEG track) Somehow it seems to be necessary to tell the mp4 tracks/container that this is a menu track for the main track. Didn't find any info on that topic yet and was not able to produce something useful via FFmpeg by hand.mediainfo
output of the chapter thumbnail track (created via macOS app Audiobook Builder):mp4info
output:ffmpeg -i
output (Stream #0:1 seems to be the chapter thumb track. The others seem to be metainfo text and the cover image):