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

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

          Posting a File and Associated Data to a RESTful WebService preferably as JSON2019 Community Moderator ElectionREST URI convention - Singular or plural name of resource while creating itUploading both data and files in one form using Ajax?How do I upload a file with metadata using a REST web service?REST API - file (ie images) processing - best practicesSpring: JSON data and file in the same requestREST API Put large dataPosting a file and JSON data to Spring rest serviceRESTful Web Service Upload/Download Large Data With JSONREST API Design sending JSON data and a file to the api in same requestPost JSONArray to REST servicePUT vs. POST in RESTParsing values from a JSON file?JavaScript/jQuery to download file via POST with JSON dataHow do I upload a file with metadata using a REST web service?How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?Separate REST JSON API server and client?what's the correct way to send a file from REST web service to client?How do I write JSON data to a file?What is “406-Not Acceptable Response” in HTTP?REST API - file (ie images) processing - best practices

          How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page