<p>In case anyone ever needs it, this worked out for me, the combination of split filter and map.</p>
<pre><code>-filter_complex &quot;[0:1]asplit=4[1:1][1:3][1:5][1:7];[0:2]asplit=4[2:2][2:4][2:6][2:8]&quot;

-map 0:v:0 -map &quot;[1:1]&quot; -map &quot;[2:2]&quot; -map &quot;[1:3]&quot; -map &quot;[2:4]&quot; -map &quot;[1:5]&quot; -map &quot;[2:6]&quot; -map &quot;[1:7]&quot; -map &quot;[2:8]&quot;
</code></pre>
<p>The whole command:</p>
<pre><code>ffmpeg -y -i &lt;input_2_tracks&gt;.mxf -filter_complex \
&quot;[0:1]asplit=4[1:1][1:3][1:5][1:7];[0:2]asplit=4[2:2][2:4][2:6][2:8]&quot; \
-map 0:v:0 -map &quot;[1:1]&quot; -map &quot;[2:2]&quot; -map &quot;[1:3]&quot; -map &quot;[2:4]&quot; -map &quot;[1:5]&quot; \
-map &quot;[2:6]&quot; -map &quot;[1:7]&quot; -map &quot;[2:8]&quot; \
-c:v copy -c:a pcm_s24le -ar 48000 &lt;output_8_tracks&gt;.mxf
</code></pre>
<p>This will take input with any number of tracks and copy the first two tracks into the eight tracks in the output file. The <code>asplit</code> arguments <code>[1:1][1:3]</code> etc. may be named arbitrarily.</p>

CC BY-SA 4.0
2023-07-05T14:30:00.563Z
2023-09-24T16:35:34.243Z
2023-09-24T16:35:34.243Z
igor
<p>I have a 2 audio track mxf file and need to clone the video but create 8 audio tracks. The tracks 1 and 2 should be copied into 3 and 4, 5 and 6 and 7 and 8. Some files that I'm dealing with are 4 track files with the silence in 3 and 4, and some are genuine 2 track mxf's with a mono audio in each one. Not wearing my ffmpeg boots for quite some time, any ideas how to achieve this? Thanks!</p>

<ffmpeg><audio>
ffmpeg - Copy the first 2 tracks of audio to new 6 tracks so all 8 tracks contains audio from the first 2
igor
# ffmpeg - Copy the first 2 tracks of audio to new 6 tracks so all 8 tracks contains audio from the first 2

(Asked by: username_0 on 2023-07-03)

I have a 2 audio track mxf file and need to clone the video but create 8 audio tracks. The tracks 1 and 2 should be copied into 3 and 4, 5 and 6 and 7 and 8. Some files that I'm dealing with are 4 track files with the silence in 3 and 4, and some are genuine 2 track mxf's with a mono audio in each one. Not wearing my ffmpeg boots for quite some time, any ideas how to achieve this? Thanks!

**Tags:** ffmpeg, audio


---

## 1 answers

### Answer by username_0 on 2023-07-05. Score: 0 | Accepted answer

In case anyone ever needs it, this worked out for me, the combination of split filter and map.
-filter_complex "[0:1]asplit=4[1:1][1:3][1:5][1:7];[0:2]asplit=4[2:2][2:4][2:6][2:8]"

-map 0:v:0 -map "[1:1]" -map "[2:2]" -map "[1:3]" -map "[2:4]" -map "[1:5]" -map "[2:6]" -map "[1:7]" -map "[2:8]"

The whole command:
ffmpeg -y -i .mxf -filter_complex \
"[0:1]asplit=4[1:1][1:3][1:5][1:7];[0:2]asplit=4[2:2][2:4][2:6][2:8]" \
-map 0:v:0 -map "[1:1]" -map "[2:2]" -map "[1:3]" -map "[2:4]" -map "[1:5]" \
-map "[2:6]" -map "[1:7]" -map "[2:8]" \
-c:v copy -c:a pcm_s24le -ar 48000 .mxf

This will take input with any number of tracks and copy the first two tracks into the eight tracks in the output file. The asplit arguments [1:1][1:3] etc. may be named arbitrarily.


---

