How to render videos with multiple audio tracks with 2 languages (select between tracks)?
https://discuss.kde.org/t/rendering-video-with-multiple-audio-tracks-with-2-languages/16305
https://discuss.kde.org/t/rendering-video-with-multiple-audio-tracks-with-2-languages/16305
2 Comments
e0qdk@reddthat.com · 11 pts · 2y
I don't know how to do it with KDE's tools, but on the command line with ffmpeg you can do something like this:
Breaking it down, it:
ffmpeg-iflag) -- a video file, and two audio files.-map 0:vmaps input 0 (the first file) as video (v) to the output file and-map 1:amaps the next input as audio (a), etc.-metadata:s:a:0 language=jpnsets the first audio track (again counting from 0...) to Japanese; the second metadata option sets the next audio track to English.-c:v copyspecifies that the video codec should be copied directly (i.e. don't re-encode -- remove this if you DO need to re-encode)-c:a copyspecifies that the audio codec should be copied directly (i.e. don't re-encode -- remove this if you DO need to re-encode)output.mp4-- finally, list the name of the file you want the result written into.See documentation here: https://ffmpeg.org/ffmpeg.html
If you need another language in the future, I think the language abbreviations are the three letter codes from here: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes -- but I'm not certain on that.
mox@lemmy.sdf.org · 1 pts · 2y
Not rendering. Muxing, which is short for multiplexing. Lots of software can do this, including MKVToolNix, ffmpeg, and GPAC/MP4Box. If you're also encoding the video, Handbrake could do the job.