audiobook-dl icon indicating copy to clipboard operation
audiobook-dl copied to clipboard

`--output-format=mkv` does transcode instead of transmux

Open joonas-fi opened this issue 1 year ago • 2 comments

Installation method: pip

Version: audiobook-dl 0.5.0 (have also ffmpeg installed)

Describe the bug The Converting files step takes a very long time, which is an indication it's doing an expensive transcode.

mp4 -> mkv should be a transmux, i.e. ffmpeg just changes the containers instead of doing expensive process of decode -> encode with possibly different codec.

The options given to ffmpeg should probably be -vcodec copy and -acodec copy ask ffmpeg to do a transmux instead of a transcode: https://blog.programster.org/ffmpeg-losslessly-convert-mp4-to-mkv

Quick glance at source code looks like it's only giving input and output filenames to ffmpeg, maybe ffmpeg by default is then doing a transcode: https://github.com/jo1gi/audiobook-dl/blob/b8596e610a2172aee613c2e57e7a29a60a21e527/audiobookdl/output/output.py#L43

joonas-fi avatar Apr 19 '23 06:04 joonas-fi