brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: remux a stubborn audio file to .mka with ffmpeg -c:a copy for Jellyfin

Ffmpeg
~/tips/tip-jellyfin-flac-remux-mka-ffmpeg

ffmpeg -i input.mkv -c:a copy output.mka

Remuxes an audio-only file to .mka without re-encoding when Jellyfin will not play it.

A music file that plays everywhere except in the browser is annoying. The Jellyfin music docs have two fixes that do not re-encode anything.

First, the FLAC case. The docs say FLAC files with embedded WebP images or ID3 tags may fail in Chromium-based browsers or Firefox. The setting to try is “Always remux FLAC audio files” in the client settings.

Second, the container case. Audio-only files in MP4 should be named .m4a, audio-only MKV or WebM files should be .mka, and WebA files should be renamed to .mka because .weba is not supported. For a problem file the docs suggest remuxing:

ffmpeg -i input.mkv -c:a copy output.mka

-c:a copy keeps the audio stream as it is, so the sound is not touched. Only the wrapper changes.

Caveat, straight from the docs: metadata and images may not carry over, so you may have to restore them by hand. That is why I would try the client setting first and keep the remux for files that still fail. Write the output to a new file, check that it plays, and only then think about replacing the original.

Further reading: Music (Jellyfin documentation), ffmpeg documentation

Going deeper: Guide: the Bazarr settings that matter, from languages to the minimum score

More Ffmpeg tips ffmpeg -stream_loop 2 -i in.mp4 -c copy out.mp4 ffmpeg -i in.mp4 \ ffmpeg -i video.mp4 -i video.en.srt -map 0 -map 1 -c copy -c:s mov_text -metadata:s:s:0 language=eng video-subs.mp4 ffmpeg -i film.mkv -map 0:v -map 0:a:0 -c:v copy -c:a aac -b:a 192k -ac 2 film-stereo.mkv ffmpeg -i talk.mp4 -vn -c:a copy talk.m4a All Ffmpeg tips (38) All topics

Link