Answers.Body: <p>Hello erik and thanks for your answer.</p>
  
  <p>Well, I finally (partly) succeeded to get a proper command. I had to precise the codec of the audio streams (MediaInfo).</p>
  
  <p>So now, I have :</p>
  
  <pre><code>ffmpeg -ss 00:00:00.00 -t 00:10:00.00
  -i G:\input.MOV
  -filter_complex "[0:a:6][0:a:7]amerge=inputs=2;[0:a:14][0:a:15]amerge=inputs=2"
  -metadata:s:a:0 language="kor" -metadata:s:a:0 title="Stéréo - Version Originale"
  -metadata:s:a:1 language="fra" -metadata:s:a:1 title="Stéréo - Français"
  -c:v copy
  -c:a pcm_s24le
  G:\output.MOV
  </code></pre>
  
  <h2>And it works as expected !!!</h2>
  
  <p>The only two small problems I still have :</p>
  
  <p><strong>1. [Parsed_amerge_0 @ 000001f8f0340240] No channel layout for input 1</strong></p>
  
  <p>I just don't know how to set a chanel layout...</p>
  
  <p><strong>2. In the output result, video became stream 3 and not first as it should properly be.</strong></p>
  
  <p>They are not big deals but if I want to be perfect in what I'm doing ;)</p>
  
  <p>Thanks again !!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-16T10:03:26.303Z
Answers.LastActivityDate: 2020-06-16T10:03:26.303Z
Answers.UserDisplayName: Thibault
Body: <p>I need your help with a command line for ffmpeg that I just started to use.</p>
  
  <p>Here's the deal :</p>
  
  <p>I have a .MOV file witch contains 18 audio streams (for 7.1). Stream 1 to 10 is for original language and stream 11 to 18 is for French version.</p>
  
  <p>What I want to do :</p>
  
  <ol>
  <li>merge stream 1 (Lt) and 2 (Rt) in a single orginal language stereo track</li>
  <li>merge stream 10 (Lt) and 11 (Rt) in a single French language stereo track</li>
  <li>Tag them properly to identify them when playing the video.</li>
  </ol>
  
  <p>Here's my command :</p>
  
  <pre><code>ffmpeg -ss 00:00:00.00 -t 00:15:00.00 -i input.MOV
  -map 0:v:0 -map 0:a:0 -map 0:a:1 -map 0:a:2 -map 0:a:3 -map 0:a:4 -map 0:a:5 -map 0:a:6 -map 0:a:7 -map 0:a:8 -map 0:a:9 -map 0:a:10 -map 0:a:11 -map 0:a:12 -map 0:a:13 -map 0:a:14 -map 0:a:15 -map 0:a:16 -map 0:a:17
  -filter_complex "[0:a:0][0:a:1]amerge=inputs=2[a];[0:a:10][0:a:11]amerge=inputs=2[a]"
  -map "[a]" -map "[a]"
  -metadata:s:a:0 language="eng" -metadata:s:a:0 title="Stéréo - Version Originale"
  -metadata:s:a:1 language="fra" -metadata:s:a:1 title="Stéréo - Français"
  -c:a output.MOV
  </code></pre>
  
  <p>My problems :</p>
  
  <ol>
  <li>video is not include and audio streams are "inverted"</li>
  <li>When I execute it, I have these warnings :</li>
  </ol>
  
  <pre><code>[Parsed_amerge_0 @ 000001f8f0340240] No channel layout for input 1
  [Parsed_amerge_1 @ 000001f8f0283940] No channel layout for input 1
  [Parsed_amerge_0 @ 000001f8f0340240] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
  [Parsed_amerge_1 @ 000001f8f0283940] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
  </code></pre>
  
  <p>How can I fix this ?</p>
  
  <p>I precise that I don't wan't any loss of quality.</p>
  
  <p>Thank you all for your help ;)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-15T19:13:56.687Z
Comments.Text: Try it in smaller steps. Have you tried to only copy and merge two audio channels and copy the video? Does that work? First try it simple, then more complex. Then search for when the problem occurs. And write your answer here, so that others can learn.
Comments.UserDisplayName: erik
Tags: <ffmpeg>
Title: (ffmpeg - Audio) Two streams, One Channel, Two Languages
UserDisplayName: Thibault
ThreadText: # (ffmpeg - Audio) Two streams, One Channel, Two Languages
  
  (Asked by: username_0 on 2020-06-09)
  
  I need your help with a command line for ffmpeg that I just started to use.
  
  Here's the deal :
  
  I have a .MOV file witch contains 18 audio streams (for 7.1). Stream 1 to 10 is for original language and stream 11 to 18 is for French version.
  
  What I want to do :
  
  1. merge stream 1 (Lt) and 2 (Rt) in a single orginal language stereo track
  2. merge stream 10 (Lt) and 11 (Rt) in a single French language stereo track
  3. Tag them properly to identify them when playing the video.
  
  Here's my command :
  
  ```
  ffmpeg -ss 00:00:00.00 -t 00:15:00.00 -i input.MOV
  -map 0:v:0 -map 0:a:0 -map 0:a:1 -map 0:a:2 -map 0:a:3 -map 0:a:4 -map 0:a:5 -map 0:a:6 -map 0:a:7 -map 0:a:8 -map 0:a:9 -map 0:a:10 -map 0:a:11 -map 0:a:12 -map 0:a:13 -map 0:a:14 -map 0:a:15 -map 0:a:16 -map 0:a:17
  -filter_complex "[0:a:0][0:a:1]amerge=inputs=2[a];[0:a:10][0:a:11]amerge=inputs=2[a]"
  -map "[a]" -map "[a]"
  -metadata:s:a:0 language="eng" -metadata:s:a:0 title="Stéréo - Version Originale"
  -metadata:s:a:1 language="fra" -metadata:s:a:1 title="Stéréo - Français"
  -c:a output.MOV
  
  ```
  
  My problems :
  
  1. video is not include and audio streams are "inverted"
  2. When I execute it, I have these warnings :
  
  ```
  [Parsed_amerge_0 @ 000001f8f0340240] No channel layout for input 1
  [Parsed_amerge_1 @ 000001f8f0283940] No channel layout for input 1
  [Parsed_amerge_0 @ 000001f8f0340240] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
  [Parsed_amerge_1 @ 000001f8f0283940] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
  
  ```
  
  How can I fix this ?
  
  I precise that I don't wan't any loss of quality.
  
  Thank you all for your help ;)
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: Try it in smaller steps. Have you tried to only copy and merge two audio channels and copy the video? Does that work? First try it simple, then more complex. Then search for when the problem occurs. And write your answer here, so that others can learn.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-06-16. Score: 0
  
  Hello username_1 and thanks for your answer.
  
  Well, I finally (partly) succeeded to get a proper command. I had to precise the codec of the audio streams (MediaInfo).
  
  So now, I have :
  
  ```
  ffmpeg -ss 00:00:00.00 -t 00:10:00.00
  -i G:\input.MOV
  -filter_complex "[0:a:6][0:a:7]amerge=inputs=2;[0:a:14][0:a:15]amerge=inputs=2"
  -metadata:s:a:0 language="kor" -metadata:s:a:0 title="Stéréo - Version Originale"
  -metadata:s:a:1 language="fra" -metadata:s:a:1 title="Stéréo - Français"
  -c:v copy
  -c:a pcm_s24le
  G:\output.MOV
  
  ```
  
  ## And it works as expected !!!
  
  The only two small problems I still have :
  
  **1. [Parsed\_amerge\_0 @ 000001f8f0340240] No channel layout for input 1**
  
  I just don't know how to set a chanel layout...
  
  **2. In the output result, video became stream 3 and not first as it should properly be.**
  
  They are not big deals but if I want to be perfect in what I'm doing ;)
  
  Thanks again !!
  
  
  ---
  
  