How can make video with multiple audio tracks in kdenlive?

It is simple to make a video with multiple audio tracks,sample.mp4 is a video file without any audio tracks in it,add two audio file ,each for one track:

ffmpeg \
-i sample.mp4 \
-i lang1.mp4a \
-i lang2.mp4a \
-c:v copy \
-map 0:v \
-map 1:a \
-map 2:a \
-metadata:s:a:0 title="lang1"  \
-metadata:s:a:1 title="lang2"  \
-y \
video_with_multi_audio.mp4

How can make it with kdenlive?

Right now, mostly only manually as you did with ffmpeg - but this is a feature on the roadmap that is currently being discussed (along with other improvements for audio).

You could create your video with multiple (groups of) audio tracks in the timeline - and then disable all but one language at render time. You could then ‘render’ just the other language tracks individually, and extract and merge the audio streams losslessly as you show.

There is a “separate file for each audio track” option in the render dialog, but that really only helps you if your audio is very simple and each audio stream in the output is just one track in the editor. For anything more complex, for now, you’ll need to render each audio stream separately.