Concat two audio files via ffmpeg filter_complex





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















If I try to concat two mp4 video files via -filter_complex using command:



ffmpeg -i a.mp4 -i b.mp4 -filter_complex 
"[0:1] [0:0] [1:1] [1:0] concat=n=2:v=1:a=1 [v] [a]"
-map [v] -map [a] -y testfull.mp4


It works fine but if I try similar with audio files like:



ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
"[0:1] [0:0] [1:1] [1:0] concat=n=2:a=1 [a]"
-map [a] -y testfull.mp3


Error arises:



Input #1, mp3, from 'b.mp3':   Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
creation_time : 2010-12-13 21:15:11
encoder : Lavf53.4.0 Duration: 00:02:01.61, start: 0.000000, bitrate: 64 kb/s
Stream #1:0: Audio: mp3, 8000 Hz, stereo, s16p, 64 kb/s
Stream specifier ':1' in filtergraph description [0:1] [0:0] [1:1] [1:0] concat= n=2:a=1 [a] matches no streams.


If I modify -filter_complex argument and run command as:



ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
"concat=n=2:a=1 [a]" -map [a] -y testfull.mp3


The following error arises



Input #1, mp3, from 'b.mp3':   Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
creation_time : 2010-12-13 21:15:11
encoder : Lavf53.4.0 Duration: 00:02:01.61, start: 0.000000, bitrate: 64 kb/s
Stream #1:0: Audio: mp3, 8000 Hz, stereo, s16p, 64 kb/s
Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_ 0


Can anyone help me how can I join two audio files via latest ffmpeg builds possibly with -filter_complex.





Update: Ok, resolved my issue with this ffmpeg command:



ffmpeg -i "concat:a.mp3|b.mp3" -c copy output.mp3









share|improve this question































    1















    If I try to concat two mp4 video files via -filter_complex using command:



    ffmpeg -i a.mp4 -i b.mp4 -filter_complex 
    "[0:1] [0:0] [1:1] [1:0] concat=n=2:v=1:a=1 [v] [a]"
    -map [v] -map [a] -y testfull.mp4


    It works fine but if I try similar with audio files like:



    ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
    "[0:1] [0:0] [1:1] [1:0] concat=n=2:a=1 [a]"
    -map [a] -y testfull.mp3


    Error arises:



    Input #1, mp3, from 'b.mp3':   Metadata:
    major_brand : mp42
    minor_version : 0
    compatible_brands: isomavc1mp42
    creation_time : 2010-12-13 21:15:11
    encoder : Lavf53.4.0 Duration: 00:02:01.61, start: 0.000000, bitrate: 64 kb/s
    Stream #1:0: Audio: mp3, 8000 Hz, stereo, s16p, 64 kb/s
    Stream specifier ':1' in filtergraph description [0:1] [0:0] [1:1] [1:0] concat= n=2:a=1 [a] matches no streams.


    If I modify -filter_complex argument and run command as:



    ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
    "concat=n=2:a=1 [a]" -map [a] -y testfull.mp3


    The following error arises



    Input #1, mp3, from 'b.mp3':   Metadata:
    major_brand : mp42
    minor_version : 0
    compatible_brands: isomavc1mp42
    creation_time : 2010-12-13 21:15:11
    encoder : Lavf53.4.0 Duration: 00:02:01.61, start: 0.000000, bitrate: 64 kb/s
    Stream #1:0: Audio: mp3, 8000 Hz, stereo, s16p, 64 kb/s
    Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_ 0


    Can anyone help me how can I join two audio files via latest ffmpeg builds possibly with -filter_complex.





    Update: Ok, resolved my issue with this ffmpeg command:



    ffmpeg -i "concat:a.mp3|b.mp3" -c copy output.mp3









    share|improve this question



























      1












      1








      1








      If I try to concat two mp4 video files via -filter_complex using command:



      ffmpeg -i a.mp4 -i b.mp4 -filter_complex 
      "[0:1] [0:0] [1:1] [1:0] concat=n=2:v=1:a=1 [v] [a]"
      -map [v] -map [a] -y testfull.mp4


      It works fine but if I try similar with audio files like:



      ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
      "[0:1] [0:0] [1:1] [1:0] concat=n=2:a=1 [a]"
      -map [a] -y testfull.mp3


      Error arises:



      Input #1, mp3, from 'b.mp3':   Metadata:
      major_brand : mp42
      minor_version : 0
      compatible_brands: isomavc1mp42
      creation_time : 2010-12-13 21:15:11
      encoder : Lavf53.4.0 Duration: 00:02:01.61, start: 0.000000, bitrate: 64 kb/s
      Stream #1:0: Audio: mp3, 8000 Hz, stereo, s16p, 64 kb/s
      Stream specifier ':1' in filtergraph description [0:1] [0:0] [1:1] [1:0] concat= n=2:a=1 [a] matches no streams.


      If I modify -filter_complex argument and run command as:



      ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
      "concat=n=2:a=1 [a]" -map [a] -y testfull.mp3


      The following error arises



      Input #1, mp3, from 'b.mp3':   Metadata:
      major_brand : mp42
      minor_version : 0
      compatible_brands: isomavc1mp42
      creation_time : 2010-12-13 21:15:11
      encoder : Lavf53.4.0 Duration: 00:02:01.61, start: 0.000000, bitrate: 64 kb/s
      Stream #1:0: Audio: mp3, 8000 Hz, stereo, s16p, 64 kb/s
      Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_ 0


      Can anyone help me how can I join two audio files via latest ffmpeg builds possibly with -filter_complex.





      Update: Ok, resolved my issue with this ffmpeg command:



      ffmpeg -i "concat:a.mp3|b.mp3" -c copy output.mp3









      share|improve this question
















      If I try to concat two mp4 video files via -filter_complex using command:



      ffmpeg -i a.mp4 -i b.mp4 -filter_complex 
      "[0:1] [0:0] [1:1] [1:0] concat=n=2:v=1:a=1 [v] [a]"
      -map [v] -map [a] -y testfull.mp4


      It works fine but if I try similar with audio files like:



      ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
      "[0:1] [0:0] [1:1] [1:0] concat=n=2:a=1 [a]"
      -map [a] -y testfull.mp3


      Error arises:



      Input #1, mp3, from 'b.mp3':   Metadata:
      major_brand : mp42
      minor_version : 0
      compatible_brands: isomavc1mp42
      creation_time : 2010-12-13 21:15:11
      encoder : Lavf53.4.0 Duration: 00:02:01.61, start: 0.000000, bitrate: 64 kb/s
      Stream #1:0: Audio: mp3, 8000 Hz, stereo, s16p, 64 kb/s
      Stream specifier ':1' in filtergraph description [0:1] [0:0] [1:1] [1:0] concat= n=2:a=1 [a] matches no streams.


      If I modify -filter_complex argument and run command as:



      ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
      "concat=n=2:a=1 [a]" -map [a] -y testfull.mp3


      The following error arises



      Input #1, mp3, from 'b.mp3':   Metadata:
      major_brand : mp42
      minor_version : 0
      compatible_brands: isomavc1mp42
      creation_time : 2010-12-13 21:15:11
      encoder : Lavf53.4.0 Duration: 00:02:01.61, start: 0.000000, bitrate: 64 kb/s
      Stream #1:0: Audio: mp3, 8000 Hz, stereo, s16p, 64 kb/s
      Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_ 0


      Can anyone help me how can I join two audio files via latest ffmpeg builds possibly with -filter_complex.





      Update: Ok, resolved my issue with this ffmpeg command:



      ffmpeg -i "concat:a.mp3|b.mp3" -c copy output.mp3






      ffmpeg






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 17 '14 at 5:34









      llogan

      26.7k54985




      26.7k54985










      asked Nov 17 '14 at 1:40









      irfanmcsdirfanmcsd

      10615




      10615






















          4 Answers
          4






          active

          oldest

          votes


















          1














          Just to make things clear [0:1] [0:0] [1:1] [1:0] refers to the streams from the 2 files.



          In your case:



          [0:1] is video from first file  
          [0:0] is audio from first file
          [1:1] is video from second file
          [1:0] is audio from second file


          In the case of mp3 files video streams do not exist. So you should drop the video stream references in the command.



          In case of your last command that works- yes that is a valid solution for mp3 files.






          share|improve this answer
























          • yes i dropped but still get errors. resolved my issue by directly concatenating streams instead of using filters

            – irfanmcsd
            Nov 19 '14 at 2:40



















          0














          you have to tell the concat filter that there will be no video: v=0 and you don't need to address video stream [0:0] [1:0] either, so the command would be like:



          ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
          "[0:a] [1:a] concat=n=2:v=0:a=1 [a]"
          -map [a] -c:a mp3 testfull.mp3





          share|improve this answer


























          • This won't work. MP3s are single stream, so [0:1][1:1] will fail. Use [0:a][1:a] Also, you can't copy stream when using filters, so it will be -c:a mp3

            – Gyan
            Sep 7 '16 at 12:56





















          0














          n is the number of STREAM SEGMENTS, NOT INPUT FILES



          from the concat docs




          The filter works on segments of synchronized video and audio streams. All segments must have the same number of streams of each type, and that will also be the number of streams at output.



          The filter accepts the following options:



          n - Set the number of segments. Default is 2.




          I have been battling this the past few days and have been reading this question and its responses over and over. i was merging a PNG sequence (input 0) with a WAV file (input 1) and kept getting the same error




          Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_ 0




          After upteen trials and fails, i fell upon n=1 (ie one desired output stream) with v=1:a=1 ... ie one video and one audio input stream.. aka concat ONE SEGMENT comprised of a video from input 0 and audio from input 1 and tada it worked just fine.



          full cmdline




          ffmpeg -i '/var/tmp/input.%04d.png -i '/var/tmp/input.wav' -filter_complex '[0:v:0] [1:a:0] concat=n=1:v=1:a=1 [vout] [aout]' -map '[vout]' -map '[aout]' -vcodec 'mjpeg' '/var/tmp/output.mov'







          share|improve this answer































            0














            You have to mix the audio streams:



            ffmpeg -i 1.mp4 -i 1.3gp -i 2.3gp -i 1.mp3
            -filter_complex "[2]adelay=10000|10000[s2];[3:a][1:a][s2]amix=3[a]"
            -map 0:v -map "[a]" -c:v copy result.mp4





            share|improve this answer
























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f841062%2fconcat-two-audio-files-via-ffmpeg-filter-complex%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              4 Answers
              4






              active

              oldest

              votes








              4 Answers
              4






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              Just to make things clear [0:1] [0:0] [1:1] [1:0] refers to the streams from the 2 files.



              In your case:



              [0:1] is video from first file  
              [0:0] is audio from first file
              [1:1] is video from second file
              [1:0] is audio from second file


              In the case of mp3 files video streams do not exist. So you should drop the video stream references in the command.



              In case of your last command that works- yes that is a valid solution for mp3 files.






              share|improve this answer
























              • yes i dropped but still get errors. resolved my issue by directly concatenating streams instead of using filters

                – irfanmcsd
                Nov 19 '14 at 2:40
















              1














              Just to make things clear [0:1] [0:0] [1:1] [1:0] refers to the streams from the 2 files.



              In your case:



              [0:1] is video from first file  
              [0:0] is audio from first file
              [1:1] is video from second file
              [1:0] is audio from second file


              In the case of mp3 files video streams do not exist. So you should drop the video stream references in the command.



              In case of your last command that works- yes that is a valid solution for mp3 files.






              share|improve this answer
























              • yes i dropped but still get errors. resolved my issue by directly concatenating streams instead of using filters

                – irfanmcsd
                Nov 19 '14 at 2:40














              1












              1








              1







              Just to make things clear [0:1] [0:0] [1:1] [1:0] refers to the streams from the 2 files.



              In your case:



              [0:1] is video from first file  
              [0:0] is audio from first file
              [1:1] is video from second file
              [1:0] is audio from second file


              In the case of mp3 files video streams do not exist. So you should drop the video stream references in the command.



              In case of your last command that works- yes that is a valid solution for mp3 files.






              share|improve this answer













              Just to make things clear [0:1] [0:0] [1:1] [1:0] refers to the streams from the 2 files.



              In your case:



              [0:1] is video from first file  
              [0:0] is audio from first file
              [1:1] is video from second file
              [1:0] is audio from second file


              In the case of mp3 files video streams do not exist. So you should drop the video stream references in the command.



              In case of your last command that works- yes that is a valid solution for mp3 files.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 18 '14 at 13:53









              RajibRajib

              2,1611022




              2,1611022













              • yes i dropped but still get errors. resolved my issue by directly concatenating streams instead of using filters

                – irfanmcsd
                Nov 19 '14 at 2:40



















              • yes i dropped but still get errors. resolved my issue by directly concatenating streams instead of using filters

                – irfanmcsd
                Nov 19 '14 at 2:40

















              yes i dropped but still get errors. resolved my issue by directly concatenating streams instead of using filters

              – irfanmcsd
              Nov 19 '14 at 2:40





              yes i dropped but still get errors. resolved my issue by directly concatenating streams instead of using filters

              – irfanmcsd
              Nov 19 '14 at 2:40













              0














              you have to tell the concat filter that there will be no video: v=0 and you don't need to address video stream [0:0] [1:0] either, so the command would be like:



              ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
              "[0:a] [1:a] concat=n=2:v=0:a=1 [a]"
              -map [a] -c:a mp3 testfull.mp3





              share|improve this answer


























              • This won't work. MP3s are single stream, so [0:1][1:1] will fail. Use [0:a][1:a] Also, you can't copy stream when using filters, so it will be -c:a mp3

                – Gyan
                Sep 7 '16 at 12:56


















              0














              you have to tell the concat filter that there will be no video: v=0 and you don't need to address video stream [0:0] [1:0] either, so the command would be like:



              ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
              "[0:a] [1:a] concat=n=2:v=0:a=1 [a]"
              -map [a] -c:a mp3 testfull.mp3





              share|improve this answer


























              • This won't work. MP3s are single stream, so [0:1][1:1] will fail. Use [0:a][1:a] Also, you can't copy stream when using filters, so it will be -c:a mp3

                – Gyan
                Sep 7 '16 at 12:56
















              0












              0








              0







              you have to tell the concat filter that there will be no video: v=0 and you don't need to address video stream [0:0] [1:0] either, so the command would be like:



              ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
              "[0:a] [1:a] concat=n=2:v=0:a=1 [a]"
              -map [a] -c:a mp3 testfull.mp3





              share|improve this answer















              you have to tell the concat filter that there will be no video: v=0 and you don't need to address video stream [0:0] [1:0] either, so the command would be like:



              ffmpeg -i a.mp3 -i b.mp3 -filter_complex 
              "[0:a] [1:a] concat=n=2:v=0:a=1 [a]"
              -map [a] -c:a mp3 testfull.mp3






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Sep 12 '16 at 7:26









              Gyan

              15.9k21848




              15.9k21848










              answered Sep 7 '16 at 12:08









              RumczeisRumczeis

              12




              12













              • This won't work. MP3s are single stream, so [0:1][1:1] will fail. Use [0:a][1:a] Also, you can't copy stream when using filters, so it will be -c:a mp3

                – Gyan
                Sep 7 '16 at 12:56





















              • This won't work. MP3s are single stream, so [0:1][1:1] will fail. Use [0:a][1:a] Also, you can't copy stream when using filters, so it will be -c:a mp3

                – Gyan
                Sep 7 '16 at 12:56



















              This won't work. MP3s are single stream, so [0:1][1:1] will fail. Use [0:a][1:a] Also, you can't copy stream when using filters, so it will be -c:a mp3

              – Gyan
              Sep 7 '16 at 12:56







              This won't work. MP3s are single stream, so [0:1][1:1] will fail. Use [0:a][1:a] Also, you can't copy stream when using filters, so it will be -c:a mp3

              – Gyan
              Sep 7 '16 at 12:56













              0














              n is the number of STREAM SEGMENTS, NOT INPUT FILES



              from the concat docs




              The filter works on segments of synchronized video and audio streams. All segments must have the same number of streams of each type, and that will also be the number of streams at output.



              The filter accepts the following options:



              n - Set the number of segments. Default is 2.




              I have been battling this the past few days and have been reading this question and its responses over and over. i was merging a PNG sequence (input 0) with a WAV file (input 1) and kept getting the same error




              Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_ 0




              After upteen trials and fails, i fell upon n=1 (ie one desired output stream) with v=1:a=1 ... ie one video and one audio input stream.. aka concat ONE SEGMENT comprised of a video from input 0 and audio from input 1 and tada it worked just fine.



              full cmdline




              ffmpeg -i '/var/tmp/input.%04d.png -i '/var/tmp/input.wav' -filter_complex '[0:v:0] [1:a:0] concat=n=1:v=1:a=1 [vout] [aout]' -map '[vout]' -map '[aout]' -vcodec 'mjpeg' '/var/tmp/output.mov'







              share|improve this answer




























                0














                n is the number of STREAM SEGMENTS, NOT INPUT FILES



                from the concat docs




                The filter works on segments of synchronized video and audio streams. All segments must have the same number of streams of each type, and that will also be the number of streams at output.



                The filter accepts the following options:



                n - Set the number of segments. Default is 2.




                I have been battling this the past few days and have been reading this question and its responses over and over. i was merging a PNG sequence (input 0) with a WAV file (input 1) and kept getting the same error




                Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_ 0




                After upteen trials and fails, i fell upon n=1 (ie one desired output stream) with v=1:a=1 ... ie one video and one audio input stream.. aka concat ONE SEGMENT comprised of a video from input 0 and audio from input 1 and tada it worked just fine.



                full cmdline




                ffmpeg -i '/var/tmp/input.%04d.png -i '/var/tmp/input.wav' -filter_complex '[0:v:0] [1:a:0] concat=n=1:v=1:a=1 [vout] [aout]' -map '[vout]' -map '[aout]' -vcodec 'mjpeg' '/var/tmp/output.mov'







                share|improve this answer


























                  0












                  0








                  0







                  n is the number of STREAM SEGMENTS, NOT INPUT FILES



                  from the concat docs




                  The filter works on segments of synchronized video and audio streams. All segments must have the same number of streams of each type, and that will also be the number of streams at output.



                  The filter accepts the following options:



                  n - Set the number of segments. Default is 2.




                  I have been battling this the past few days and have been reading this question and its responses over and over. i was merging a PNG sequence (input 0) with a WAV file (input 1) and kept getting the same error




                  Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_ 0




                  After upteen trials and fails, i fell upon n=1 (ie one desired output stream) with v=1:a=1 ... ie one video and one audio input stream.. aka concat ONE SEGMENT comprised of a video from input 0 and audio from input 1 and tada it worked just fine.



                  full cmdline




                  ffmpeg -i '/var/tmp/input.%04d.png -i '/var/tmp/input.wav' -filter_complex '[0:v:0] [1:a:0] concat=n=1:v=1:a=1 [vout] [aout]' -map '[vout]' -map '[aout]' -vcodec 'mjpeg' '/var/tmp/output.mov'







                  share|improve this answer













                  n is the number of STREAM SEGMENTS, NOT INPUT FILES



                  from the concat docs




                  The filter works on segments of synchronized video and audio streams. All segments must have the same number of streams of each type, and that will also be the number of streams at output.



                  The filter accepts the following options:



                  n - Set the number of segments. Default is 2.




                  I have been battling this the past few days and have been reading this question and its responses over and over. i was merging a PNG sequence (input 0) with a WAV file (input 1) and kept getting the same error




                  Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_ 0




                  After upteen trials and fails, i fell upon n=1 (ie one desired output stream) with v=1:a=1 ... ie one video and one audio input stream.. aka concat ONE SEGMENT comprised of a video from input 0 and audio from input 1 and tada it worked just fine.



                  full cmdline




                  ffmpeg -i '/var/tmp/input.%04d.png -i '/var/tmp/input.wav' -filter_complex '[0:v:0] [1:a:0] concat=n=1:v=1:a=1 [vout] [aout]' -map '[vout]' -map '[aout]' -vcodec 'mjpeg' '/var/tmp/output.mov'








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 15 '17 at 0:17









                  Sassafras_wotSassafras_wot

                  1,11688




                  1,11688























                      0














                      You have to mix the audio streams:



                      ffmpeg -i 1.mp4 -i 1.3gp -i 2.3gp -i 1.mp3
                      -filter_complex "[2]adelay=10000|10000[s2];[3:a][1:a][s2]amix=3[a]"
                      -map 0:v -map "[a]" -c:v copy result.mp4





                      share|improve this answer




























                        0














                        You have to mix the audio streams:



                        ffmpeg -i 1.mp4 -i 1.3gp -i 2.3gp -i 1.mp3
                        -filter_complex "[2]adelay=10000|10000[s2];[3:a][1:a][s2]amix=3[a]"
                        -map 0:v -map "[a]" -c:v copy result.mp4





                        share|improve this answer


























                          0












                          0








                          0







                          You have to mix the audio streams:



                          ffmpeg -i 1.mp4 -i 1.3gp -i 2.3gp -i 1.mp3
                          -filter_complex "[2]adelay=10000|10000[s2];[3:a][1:a][s2]amix=3[a]"
                          -map 0:v -map "[a]" -c:v copy result.mp4





                          share|improve this answer













                          You have to mix the audio streams:



                          ffmpeg -i 1.mp4 -i 1.3gp -i 2.3gp -i 1.mp3
                          -filter_complex "[2]adelay=10000|10000[s2];[3:a][1:a][s2]amix=3[a]"
                          -map 0:v -map "[a]" -c:v copy result.mp4






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 31 at 4:42









                          Mohit SharmaMohit Sharma

                          101




                          101






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f841062%2fconcat-two-audio-files-via-ffmpeg-filter-complex%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                              Alcedinidae

                              Can an atomic nucleus contain both particles and antiparticles? [duplicate]