1

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 ;)

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.
    – erik
    Commented Jun 15, 2020 at 19:13

1 Answer 1

0

Hello erik 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 !!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.