sandreas / m4b-tool

m4b-tool is a command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b
MIT License
1.23k stars 79 forks source link

Merge to m4b creates video track with "mjpeg, 1x1" #269

Closed JakobTischler closed 3 weeks ago

JakobTischler commented 1 month ago

Hi there,

I'm using merge to merge multiple .mp3 files into a single .m4b file. The resulting file always has a video track (Video: JPEG 1x1 [V: Chapter pictures (mjpeg, 1x1)]), and is unplayable (both using MPC-HD on Windows, and different media apps on Android).

MediaInfo says:

Video
ID                             : 3
Format                         : JPEG
Codec ID                       : jpeg
Duration                       : 29 h 8 min
Source duration                : 29 h 8 min
Bit rate mode                  : Constant
Width                          : 1 pixel
Height                         : 1 pixel
Display aspect ratio           : 1.000
Frame rate mode                : Variable
Frame rate                     : 0.000 FPS
Minimum frame rate             : 0.000 FPS
Maximum frame rate             : 0.003 FPS
Compression mode               : Lossy
Stream size                    : 0.00 Byte (0%)
Title                          : Chapter pictures
Encoded date                   : 2025-01-15 20:57:00 UTC
Tagged date                    : 2025-01-15 20:57:00 UTC
mdhd_Duration                  : 104894000

Audio
ID                             : 1
Format                         : AAC LC
Format/Info                    : Advanced Audio Codec Low Complexity
Codec ID                       : mp4a-40-2
Duration                       : 29 h 8 min
Bit rate mode                  : Constant
Bit rate                       : 64.6 kb/s
Channel(s)                     : 2 channels
Channel layout                 : L R
Sampling rate                  : 22.05 kHz
Frame rate                     : 21.533 FPS (1024 SPF)
Compression mode               : Lossy
Stream size                    : 807 MiB (99%)
Default                        : Yes
Alternate group                : 1
Menus                          : 2

I'm not entirely sure what "Chapter pictures" really are, but I haven't set them. This happens both with or without an embedded cover in the source mp3 files.

The above is the result of the following command: php "E:\Program Files\m4b-tool\m4b-tool.phar" merge "u:\TEMP\The Border (Power of the Dog 3) - Don Winslow" --output-file "u:\TEMP\The Border (Power of the Dog 3) - Don Winslow\Don Winslow - The Border.m4b" --jobs=8 --include-extensions="mp3,m4a" --use-nero-chapter-format --no-chapter-reindexing --force --skip-cover --skip-cover-if-exists --fix-mime-type --debug --logfile="u:\TEMP\The Border (Power of the Dog 3) - Don Winslow\Don Winslow - The Border.m4b.log" --audio-channels=2 --audio-bitrate=64k --audio-samplerate=22050


This happens both with v0.5.0 and the 2024-05-14 pre-release version.

Log File

Any help would be appreciated. Thanks.

sandreas commented 1 month ago

The problem could be caused by several reasons.

Since you are using windows and ffmpeg and tone are installed, an issue in tone is pretty likely.

Could you run:

tone --version

And post the output?

JakobTischler commented 1 month ago

I'm on the latest version, v0.2.4

>tone -v
>0.2.4

I'll try one of the older tone versions and see if that changes anything.


Edit So as mentioned above, I did some tests using different older versions of tone. Turns out, v0.1.5 does not produce the error, while v0.1.6 does. Hope this helps.

sandreas commented 1 month ago

So as mentioned above, I did some tests using different older versions of tone. Turns out, v0.1.5 does not produce the error, while v0.1.6 does. Hope this helps.

This is not good... somehow there seems to be a problem... somehow this seems to be related with the following issues:

Seems that one of these fixes might have broken something.

sandreas commented 3 weeks ago

This was actually a problem in atldotnet, the library tone uses to tag files. Thanks again for being patient on this one. It'll take some time but I hope this gets fixed soon - followed by an update of tone.

For reference: https://github.com/Zeugma440/atldotnet/issues/305

sandreas commented 3 weeks ago

Should be fixed with latest tone 0.2.5 - feedback would be great, if you could take the time to test again.

JakobTischler commented 3 weeks ago

Thank you very much for taking the time to get behind this. Just tested with the same files, no more chapter images, no more video track, everything working as expected again. Also thanks to @Zeugma440 for fixing this on their end.

All around great work :)