 <p>You can put the audio and video on different tracks and use the mix transition to combine the audio.</p> <pre><code># melt video.mp4 \ -audio-track -blank 100 audio.mp3 \ -transition mix in=100 out=500 a_track=0 b_track=1 </code></pre> <p>Further explanation here: <a href="https://www.mltframework.org/bin/view/MLT/MltMelt#Transitions" rel="nofollow">https://www.mltframework.org/bin/view/MLT/MltMelt#Transitions</a></p> <p>Mix transition documentation here: <a href="https://www.mltframework.org/bin/view/MLT/TransitionMix" rel="nofollow">https://www.mltframework.org/bin/view/MLT/TransitionMix</a></p> <p><strong>EDIT1:</strong></p> <p>To mute the audio from a video clip, you can apply the volume filter:</p> <pre><code># melt video.mp4 -attach-clip volume gain=0 ... </code></pre> <p>To change the volume of a clip, you can also apply the volume filter:</p> <pre><code>... -audio-track -blank 100 audio.mp3 -attache-clip volume gain=3dB ... </code></pre> <p>Volume filter documentation: <a href="https://www.mltframework.org/bin/view/MLT/FilterVolume" rel="nofollow">https://www.mltframework.org/bin/view/MLT/FilterVolume</a></p> <p>To stop the music playing, you should set an "out" point. Also, you should put all the audio clips on one track and then specify the transitions:</p> <pre><code># melt video.mp4 -attach-clip volume gain=0 \ -audio-track -blank 100 audio1.mp3 out=400 -blank 300 audio2.mp3 out=400 \ -transition mix in=100 out=500 a_track=0 b_track=1 -transition mix in=800 out=1200 a_track=0 b_track=1 </code></pre>