<p>Got it.</p>
<pre><code>start ffmpeg.exe -i %source% -map 0:1 -c:a:0 copy -disposition:a:0 default -vn -y %source%.51.L.wav -map 0:2 -c:a:1 copy -disposition:a:1 0 -vn -y %source%.51.R.wav -map 0:3 -c:a:2 copy -disposition:a:2 0 -vn -y %source%.51.C.wav -map 0:4 -c:a:3 copy -disposition:a:3 0 -vn -y %source%.51.LFE.wav -map 0:5 -c:a:4 copy -disposition:a:4 0 -vn -y %source%.51.Ls.wav -map 0:6 -c:a:5 copy -disposition:a:5 0 -vn -y %source%.51.Rs.wav
start ffmpeg.exe -i %source% -filter_complex &quot;[0:7][0:8] amerge=inputs=2&quot; -c:a pcm_s24le %source%.20.wav
</code></pre>

CC BY-SA 4.0
2020-07-02T08:10:59.610Z
2020-07-02T08:10:59.610Z
Yannis
<p>I have a QT ProRes which has 8 audio tracks. L/R/C/Lfe/Ls/Rs/Ltotal/Rtotal
What I need to do is extract the 5.1 (tracks 1-6) into separate individual wav files without recompression
and the last 2 (tracks 7-8) into a stereo wav.
I made a small batch file to help me. Here it is:</p>
<pre><code>CLS
:START
echo[
set /p source=enter source file name:
start ffmpeg -i %source% -map 0:a:0 -c copy %source%_51.L.wav -map 0:a:1 -c copy %source%_51.R.wav -map 0:a:2 -c copy %source%_51.C.wav -map 0:a:3 -c copy %source%_51.LFE.wav -map 0:a:4 -c copy %source%_51.Ls.wav -map 0:a:5 -c copy %source%_51.Rs.wav
start ffmpeg.exe -i %source% -filter_complex &quot;[0:7][0:8] amerge=inputs=2&quot; -c:a pcm_s24le %source%.20.wav
pause
</code></pre>
<p>The problem is that the extraction is not correct. The 5.1 channels it produces are the same.
Do you have any ideas where I am wrong?</p>
<p>Thanks!</p>

CC BY-SA 4.0
2020-07-01T17:21:09.210Z
noone? I would appreciate any help please. Thanks.
Yannis
<ffmpeg><video><audio>
Extract audio from a multichannel video file
Yannis
# Extract audio from a multichannel video file

(Asked by: username_0 on 2020-06-30)

I have a QT ProRes which has 8 audio tracks. L/R/C/Lfe/Ls/Rs/Ltotal/Rtotal
What I need to do is extract the 5.1 (tracks 1-6) into separate individual wav files without recompression
and the last 2 (tracks 7-8) into a stereo wav.
I made a small batch file to help me. Here it is:
CLS
:START
echo[
set /p source=enter source file name:
start ffmpeg -i %source% -map 0:a:0 -c copy %source%_51.L.wav -map 0:a:1 -c copy %source%_51.R.wav -map 0:a:2 -c copy %source%_51.C.wav -map 0:a:3 -c copy %source%_51.LFE.wav -map 0:a:4 -c copy %source%_51.Ls.wav -map 0:a:5 -c copy %source%_51.Rs.wav
start ffmpeg.exe -i %source% -filter_complex "[0:7][0:8] amerge=inputs=2" -c:a pcm_s24le %source%.20.wav
pause

The problem is that the extraction is not correct. The 5.1 channels it produces are the same.
Do you have any ideas where I am wrong?
Thanks!

**Tags:** ffmpeg, video, audio

> **Comments:**
> **username_0**: noone? I would appreciate any help please. Thanks.  

---

## 1 answers

### Answer by username_0 on 2020-07-02. Score: 1

Got it.
start ffmpeg.exe -i %source% -map 0:1 -c:a:0 copy -disposition:a:0 default -vn -y %source%.51.L.wav -map 0:2 -c:a:1 copy -disposition:a:1 0 -vn -y %source%.51.R.wav -map 0:3 -c:a:2 copy -disposition:a:2 0 -vn -y %source%.51.C.wav -map 0:4 -c:a:3 copy -disposition:a:3 0 -vn -y %source%.51.LFE.wav -map 0:5 -c:a:4 copy -disposition:a:4 0 -vn -y %source%.51.Ls.wav -map 0:6 -c:a:5 copy -disposition:a:5 0 -vn -y %source%.51.Rs.wav
start ffmpeg.exe -i %source% -filter_complex "[0:7][0:8] amerge=inputs=2" -c:a pcm_s24le %source%.20.wav


---

