Need help to change working ffmpeg command to overlay instead of concatenate two audio files at specific position2019 Community Moderator ElectionHow to concatenate two MP4 files using FFmpeg?FFMPEG overlay issue for 2 videos, sound missing from second inputHow to overlay two audio files using ffmpegBest approach to real time http streaming to HTML5 video clientFFmpeg simple 1:1 overlay and concatenate?Unsplitting two video files with ffmpegFFMPEG, Extract first frame and hold for 5 secondsFFMPEG concatinate audio file and add background musicHow to trim silence and concatenate two audio files using FFMPEG in one command?How to add timecode & Hint Track after concat 2x MP4 to MOV (Quicktime Playback) FFMPEG

The three point beverage

Ban on all campaign finance?

Decoding assembly instructions in a Game Boy disassembler

What is the definition of "Natural Selection"?

What happens with multiple copies of Humility and Glorious Anthem on the battlefield?

Good allowance savings plan?

Plywood subfloor won't screw down in a trailer home

Does splitting a potentially monolithic application into several smaller ones help prevent bugs?

Why would a jet engine that runs at temps excess of 2000°C burn when it crashes?

Heap & Stack Java

Am I not good enough for you?

Is "history" a male-biased word ("his+story")?

This equation is outside the page, how to modify it

Single word request: Harming the benefactor

What exactly is the purpose of connection links straped between the rocket and the launch pad

Word for a person who has no opinion about whether god exists

Unreachable code, but reachable with exception

Can someone explain this Mudra being done by Ramakrishna Paramhansa in Samadhi?

Is having access to past exams cheating and, if yes, could it be proven just by a good grade?

How do anti-virus programs start at Windows boot?

Is a lawful good "antagonist" effective?

Best approach to update all entries in a list that is paginated?

Touchscreen-controlled dentist office snowman collector game

What is the likely impact on flights of grounding an entire aircraft series?



Need help to change working ffmpeg command to overlay instead of concatenate two audio files at specific position



2019 Community Moderator ElectionHow to concatenate two MP4 files using FFmpeg?FFMPEG overlay issue for 2 videos, sound missing from second inputHow to overlay two audio files using ffmpegBest approach to real time http streaming to HTML5 video clientFFmpeg simple 1:1 overlay and concatenate?Unsplitting two video files with ffmpegFFMPEG, Extract first frame and hold for 5 secondsFFMPEG concatinate audio file and add background musicHow to trim silence and concatenate two audio files using FFMPEG in one command?How to add timecode & Hint Track after concat 2x MP4 to MOV (Quicktime Playback) FFMPEG










0















By asking another question here, I got working code



ffmpeg -i input.mp3 -i second.mp3 -filter_complex "[0:a]atrim=end=10,asetpts=N/SR/TB[begin];[0:a]atrim=start=10,asetpts=N/SR/TB[end];[begin][1:a][end]concat=n=3:v=0:a=1[a]" -map "[a]" output


The code inserts second.mp3 into the input.mp3 at 10 seconds.



But now I need to overlay second.mp3 into the input.mp3 starting at 10seconds.
In other words I need playing input.mp3 and after 10 seconds I need start playing second.mp3 simultaneously.



The code I have been given keeps the params of input.mp3 and changes everything about second.mp3 to match input.mp3.



Could you help me altering the command I have to do the overlay...










share|improve this question







New contributor




lukistar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    0















    By asking another question here, I got working code



    ffmpeg -i input.mp3 -i second.mp3 -filter_complex "[0:a]atrim=end=10,asetpts=N/SR/TB[begin];[0:a]atrim=start=10,asetpts=N/SR/TB[end];[begin][1:a][end]concat=n=3:v=0:a=1[a]" -map "[a]" output


    The code inserts second.mp3 into the input.mp3 at 10 seconds.



    But now I need to overlay second.mp3 into the input.mp3 starting at 10seconds.
    In other words I need playing input.mp3 and after 10 seconds I need start playing second.mp3 simultaneously.



    The code I have been given keeps the params of input.mp3 and changes everything about second.mp3 to match input.mp3.



    Could you help me altering the command I have to do the overlay...










    share|improve this question







    New contributor




    lukistar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      By asking another question here, I got working code



      ffmpeg -i input.mp3 -i second.mp3 -filter_complex "[0:a]atrim=end=10,asetpts=N/SR/TB[begin];[0:a]atrim=start=10,asetpts=N/SR/TB[end];[begin][1:a][end]concat=n=3:v=0:a=1[a]" -map "[a]" output


      The code inserts second.mp3 into the input.mp3 at 10 seconds.



      But now I need to overlay second.mp3 into the input.mp3 starting at 10seconds.
      In other words I need playing input.mp3 and after 10 seconds I need start playing second.mp3 simultaneously.



      The code I have been given keeps the params of input.mp3 and changes everything about second.mp3 to match input.mp3.



      Could you help me altering the command I have to do the overlay...










      share|improve this question







      New contributor




      lukistar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      By asking another question here, I got working code



      ffmpeg -i input.mp3 -i second.mp3 -filter_complex "[0:a]atrim=end=10,asetpts=N/SR/TB[begin];[0:a]atrim=start=10,asetpts=N/SR/TB[end];[begin][1:a][end]concat=n=3:v=0:a=1[a]" -map "[a]" output


      The code inserts second.mp3 into the input.mp3 at 10 seconds.



      But now I need to overlay second.mp3 into the input.mp3 starting at 10seconds.
      In other words I need playing input.mp3 and after 10 seconds I need start playing second.mp3 simultaneously.



      The code I have been given keeps the params of input.mp3 and changes everything about second.mp3 to match input.mp3.



      Could you help me altering the command I have to do the overlay...







      ffmpeg






      share|improve this question







      New contributor




      lukistar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      lukistar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      lukistar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Mar 7 at 9:57









      lukistarlukistar

      353




      353




      New contributor




      lukistar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      lukistar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      lukistar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Use



          ffmpeg -i input.mp3 -i second.mp3 -filter_complex "[1:a]adelay=10000|10000[1a];[0:a][1a]amix" output



          The adelay delays the 2nd audio start by 10 seconds. The amix mixes the two audios together.






          share|improve this answer

























          • An explanation what's changed and why would be helpful here for understanding the intent. Thanks.

            – Stefan
            Mar 7 at 11:19











          • The command you gave worked perfectly, I just added after amix "=duration:first".. I know that is completely another question... but how can I loop what you did? Like input.mp3 plays all along, and in few random positions second.mp3 starts playing? With random delay.. lets say between 10 000 and 15 000..

            – lukistar
            Mar 7 at 12:30










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          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
          );



          );






          lukistar is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55040846%2fneed-help-to-change-working-ffmpeg-command-to-overlay-instead-of-concatenate-two%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Use



          ffmpeg -i input.mp3 -i second.mp3 -filter_complex "[1:a]adelay=10000|10000[1a];[0:a][1a]amix" output



          The adelay delays the 2nd audio start by 10 seconds. The amix mixes the two audios together.






          share|improve this answer

























          • An explanation what's changed and why would be helpful here for understanding the intent. Thanks.

            – Stefan
            Mar 7 at 11:19











          • The command you gave worked perfectly, I just added after amix "=duration:first".. I know that is completely another question... but how can I loop what you did? Like input.mp3 plays all along, and in few random positions second.mp3 starts playing? With random delay.. lets say between 10 000 and 15 000..

            – lukistar
            Mar 7 at 12:30















          0














          Use



          ffmpeg -i input.mp3 -i second.mp3 -filter_complex "[1:a]adelay=10000|10000[1a];[0:a][1a]amix" output



          The adelay delays the 2nd audio start by 10 seconds. The amix mixes the two audios together.






          share|improve this answer

























          • An explanation what's changed and why would be helpful here for understanding the intent. Thanks.

            – Stefan
            Mar 7 at 11:19











          • The command you gave worked perfectly, I just added after amix "=duration:first".. I know that is completely another question... but how can I loop what you did? Like input.mp3 plays all along, and in few random positions second.mp3 starts playing? With random delay.. lets say between 10 000 and 15 000..

            – lukistar
            Mar 7 at 12:30













          0












          0








          0







          Use



          ffmpeg -i input.mp3 -i second.mp3 -filter_complex "[1:a]adelay=10000|10000[1a];[0:a][1a]amix" output



          The adelay delays the 2nd audio start by 10 seconds. The amix mixes the two audios together.






          share|improve this answer















          Use



          ffmpeg -i input.mp3 -i second.mp3 -filter_complex "[1:a]adelay=10000|10000[1a];[0:a][1a]amix" output



          The adelay delays the 2nd audio start by 10 seconds. The amix mixes the two audios together.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 7 at 12:01

























          answered Mar 7 at 10:34









          GyanGyan

          33.3k22870




          33.3k22870












          • An explanation what's changed and why would be helpful here for understanding the intent. Thanks.

            – Stefan
            Mar 7 at 11:19











          • The command you gave worked perfectly, I just added after amix "=duration:first".. I know that is completely another question... but how can I loop what you did? Like input.mp3 plays all along, and in few random positions second.mp3 starts playing? With random delay.. lets say between 10 000 and 15 000..

            – lukistar
            Mar 7 at 12:30

















          • An explanation what's changed and why would be helpful here for understanding the intent. Thanks.

            – Stefan
            Mar 7 at 11:19











          • The command you gave worked perfectly, I just added after amix "=duration:first".. I know that is completely another question... but how can I loop what you did? Like input.mp3 plays all along, and in few random positions second.mp3 starts playing? With random delay.. lets say between 10 000 and 15 000..

            – lukistar
            Mar 7 at 12:30
















          An explanation what's changed and why would be helpful here for understanding the intent. Thanks.

          – Stefan
          Mar 7 at 11:19





          An explanation what's changed and why would be helpful here for understanding the intent. Thanks.

          – Stefan
          Mar 7 at 11:19













          The command you gave worked perfectly, I just added after amix "=duration:first".. I know that is completely another question... but how can I loop what you did? Like input.mp3 plays all along, and in few random positions second.mp3 starts playing? With random delay.. lets say between 10 000 and 15 000..

          – lukistar
          Mar 7 at 12:30





          The command you gave worked perfectly, I just added after amix "=duration:first".. I know that is completely another question... but how can I loop what you did? Like input.mp3 plays all along, and in few random positions second.mp3 starts playing? With random delay.. lets say between 10 000 and 15 000..

          – lukistar
          Mar 7 at 12:30












          lukistar is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          lukistar is a new contributor. Be nice, and check out our Code of Conduct.












          lukistar is a new contributor. Be nice, and check out our Code of Conduct.











          lukistar is a new contributor. Be nice, and check out our Code of Conduct.














          Thanks for contributing an answer to Stack Overflow!


          • 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%2fstackoverflow.com%2fquestions%2f55040846%2fneed-help-to-change-working-ffmpeg-command-to-overlay-instead-of-concatenate-two%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

          How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

          Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite