• baltakatei@sopuli.xyz
    link
    fedilink
    arrow-up
    25
    arrow-down
    1
    ·
    18 days ago

    Here’s my Bash script for combining a directory of .mp3 files into a single .mkv container using ffmpeg. It also reëncodes the audio using the opus codec which can help smooth out weird encoding artifacts from sloppily created MP3 files. The script retains the original MP3 file partitions as seekable chapters named after the input file names. I find it useful for some audiobooks purchased from libro.fm which are only available in MP3 format.

      • watson@sopuli.xyz
        link
        fedilink
        arrow-up
        6
        ·
        18 days ago

        Mka is excellent because you can add all the chapters and everything to the file and nothing needs to be re-encoded.

        • baltakatei@sopuli.xyz
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          24 hours ago

          True. My original intention, before discovering how common wonky mp3 audiobooks were, was to use the MKA container (I guess MKA is audio MKV?) to simply preserve the original audio data streams without reëncoding. However, since my script converts to WAV then reëncodes to 48kbps OPUS, I probably should have FFMPEG use M4B as the final output container for clarity.