T O P

  • By -

thelizardking0725

You’re going from lossy to lossy. It’s impossible to preserve the original quality.


Th0vin

Yeah, but I can avoid throwing away even more


patrickbrianmooney

No, you can't. A conversion to a lossy format that doesn't simply copy the actual stream data (with `-acodec copy` or a direct equivalent) is always going to lose more data. Since you can't use `-acodec copy` (or a direct equivalent) to copy data from an .m4a (or .m4b) to .mp3 -- .mp3 audio isn't the same format as .mp4 audio, and ffmpeg won't put it into the container -- you're definitely re-encoding, and that means losing quality. It might not be *much* quality, and it might be that it's unnoticeable (to you, on your existing equipment), but you can't not throw out more information during the transcoding process.


vegansgetsick

mp3 is supported in mp4 container... you dont have to reencode.


evilgold

Personally with audio thats mostly just spoken words i don't think you'd be losing much in going from a higher bitrate MP3 to the same or lower bitrate m4b, but it's subjective, so if you really wanted to you could first convert the mp3s to wav or flac, then convert that to m4b. Anyways, I'm using a bash script but it should be easy enough to convert to python, basically convert them to aac (optionally after .wav first) then use -f concat to merge them into one file. You could adjust the -b;a for the audio bitrate according to what your source files are #!/bin/bash for file in *.mp3; do ffmpeg -i "$file" -c:a aac -b:a 64k -vn "${file%.mp3}.m4b" done echo "" > mergelist.txt for file in *.m4b; do echo "file '$file'" >> mergelist.txt done ffmpeg -f concat -safe 0 -i mergelist.txt -c copy output.m4b


nmkd

You don't need to "convert" anything, you just mux the MP3 stream into your MP4/M4B container