How do I overlay a PNG over two videos (one video overlays another) in one command using FFmpeg? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Encoding H264 with windows ffmpeg results in first few seconds being “blocky”How can I overlay PNGs with transparency over a video? (each PNG should cover one frame)FFmpeg - Fade in watermark onlyHow to add a png logo to mp4 video with ffmpeg which can be resize dynamically and cover the whole videoConcat multiple videos with diferent audio and subtitle stream count using ffmpegFFMPEG multiple outputs performance (Single instance vs Multiple instances)Applying multiple filters and inputs with FFmpegHow to play Watermark video in order manner using FFMPEGHow to use ffmpeg to add multiple audio files to the video at a specific time?FFMPEG - How to fade with cycle

Can I ask an author to send me his ebook?

IC on Digikey is 5x more expensive than board containing same IC on Alibaba: How?

Is Bran literally the world's memory?

Short story about an alien named Ushtu(?) coming from a future Earth, when ours was destroyed by a nuclear explosion

Why did Israel vote against lifting the American embargo on Cuba?

Assertions In A Mock Callout Test

Is Vivien of the Wilds + Wilderness Reclimation a competitive combo?

Pointing to problems without suggesting solutions

/bin/ls sorts differently than just ls

What combination of kingdom cards makes for the fewest number of turns to end the game?

What could prevent concentrated local exploration?

Is my guitar’s action too high?

When speaking, how do you change your mind mid-sentence?

Who's this lady in the war room?

Recursive calls to a function - why is the address of the parameter passed to it lowering with each call?

Can a Knight grant Knighthood to another?

Are bags of holding fireproof?

What is the ongoing value of the Kanban board to the developers as opposed to management

Import keychain to clean macOS install?

Protagonist's race is hidden - should I reveal it?

What's the connection between Mr. Nancy and fried chicken?

Is there a verb for listening stealthily?

Why isn't everyone flabbergasted about Bran's "gift"?

Is there a way to convert Wolfram Language expression to string?



How do I overlay a PNG over two videos (one video overlays another) in one command using FFmpeg?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Encoding H264 with windows ffmpeg results in first few seconds being “blocky”How can I overlay PNGs with transparency over a video? (each PNG should cover one frame)FFmpeg - Fade in watermark onlyHow to add a png logo to mp4 video with ffmpeg which can be resize dynamically and cover the whole videoConcat multiple videos with diferent audio and subtitle stream count using ffmpegFFMPEG multiple outputs performance (Single instance vs Multiple instances)Applying multiple filters and inputs with FFmpegHow to play Watermark video in order manner using FFMPEGHow to use ffmpeg to add multiple audio files to the video at a specific time?FFMPEG - How to fade with cycle



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








4















I'm a new user of FFmpeg, and I want to insert a logo on two videos (one video overlay another) with one command.



For example, I have a background video (1), a video in scaling (2) and a logo (3P, and I want to create a video that has “3 on 2 on 1” in one command.



In normal, I have to do step by step: scale video (2), then overlay this video on background video (3), and finally overlay the logo (1) on top. I think these steps can decrease the final video quality due to re-encode 3 times.




1st step:



ffmpeg -i input.mp4 -filter:v scale=1280:720 -c:a copy output1.mp4


2nd step:



ffmpeg -loop 1 -i background.mp4 -i output1.mp4 -filter_complex "[1]scale=1280:720[inner];[0][inner]overlay=70:70:shortest=1[out]" -map "[out]" -map 1:a -c:a copy -y output2.mp4


3rd step:



ffmpeg -i output2.mp4 -i logo.png -filter_complex "[0:v][1:v]overlay=10:10:enable=not(between'(t,10,15)')" -codec:a copy -preset medium output3.mp4


Thank you so much for your help.










share|improve this question









New contributor




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


























    4















    I'm a new user of FFmpeg, and I want to insert a logo on two videos (one video overlay another) with one command.



    For example, I have a background video (1), a video in scaling (2) and a logo (3P, and I want to create a video that has “3 on 2 on 1” in one command.



    In normal, I have to do step by step: scale video (2), then overlay this video on background video (3), and finally overlay the logo (1) on top. I think these steps can decrease the final video quality due to re-encode 3 times.




    1st step:



    ffmpeg -i input.mp4 -filter:v scale=1280:720 -c:a copy output1.mp4


    2nd step:



    ffmpeg -loop 1 -i background.mp4 -i output1.mp4 -filter_complex "[1]scale=1280:720[inner];[0][inner]overlay=70:70:shortest=1[out]" -map "[out]" -map 1:a -c:a copy -y output2.mp4


    3rd step:



    ffmpeg -i output2.mp4 -i logo.png -filter_complex "[0:v][1:v]overlay=10:10:enable=not(between'(t,10,15)')" -codec:a copy -preset medium output3.mp4


    Thank you so much for your help.










    share|improve this question









    New contributor




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






















      4












      4








      4








      I'm a new user of FFmpeg, and I want to insert a logo on two videos (one video overlay another) with one command.



      For example, I have a background video (1), a video in scaling (2) and a logo (3P, and I want to create a video that has “3 on 2 on 1” in one command.



      In normal, I have to do step by step: scale video (2), then overlay this video on background video (3), and finally overlay the logo (1) on top. I think these steps can decrease the final video quality due to re-encode 3 times.




      1st step:



      ffmpeg -i input.mp4 -filter:v scale=1280:720 -c:a copy output1.mp4


      2nd step:



      ffmpeg -loop 1 -i background.mp4 -i output1.mp4 -filter_complex "[1]scale=1280:720[inner];[0][inner]overlay=70:70:shortest=1[out]" -map "[out]" -map 1:a -c:a copy -y output2.mp4


      3rd step:



      ffmpeg -i output2.mp4 -i logo.png -filter_complex "[0:v][1:v]overlay=10:10:enable=not(between'(t,10,15)')" -codec:a copy -preset medium output3.mp4


      Thank you so much for your help.










      share|improve this question









      New contributor




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












      I'm a new user of FFmpeg, and I want to insert a logo on two videos (one video overlay another) with one command.



      For example, I have a background video (1), a video in scaling (2) and a logo (3P, and I want to create a video that has “3 on 2 on 1” in one command.



      In normal, I have to do step by step: scale video (2), then overlay this video on background video (3), and finally overlay the logo (1) on top. I think these steps can decrease the final video quality due to re-encode 3 times.




      1st step:



      ffmpeg -i input.mp4 -filter:v scale=1280:720 -c:a copy output1.mp4


      2nd step:



      ffmpeg -loop 1 -i background.mp4 -i output1.mp4 -filter_complex "[1]scale=1280:720[inner];[0][inner]overlay=70:70:shortest=1[out]" -map "[out]" -map 1:a -c:a copy -y output2.mp4


      3rd step:



      ffmpeg -i output2.mp4 -i logo.png -filter_complex "[0:v][1:v]overlay=10:10:enable=not(between'(t,10,15)')" -codec:a copy -preset medium output3.mp4


      Thank you so much for your help.







      ffmpeg overlay






      share|improve this question









      New contributor




      quangtrung1789 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




      quangtrung1789 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








      edited 5 hours ago









      JakeGould

      33k10100142




      33k10100142






      New contributor




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









      asked 5 hours ago









      quangtrung1789quangtrung1789

      212




      212




      New contributor




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





      New contributor





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






      quangtrung1789 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


















          4














          Use this command:



          ffmpeg -stream_loop -1 -i background.mp4 -i input.mp4 -i logo.png
          -filter_complex "[1]scale=1280:720[inner];[0][inner]overlay=70:70:shortest=1[vid];
          [vid][2]overlay=10:10:enable='not(between(t,10,15))'[out]" -map "[out]" -map 1:a -c:a copy -y output.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
            );



            );






            quangtrung1789 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%2fsuperuser.com%2fquestions%2f1428290%2fhow-do-i-overlay-a-png-over-two-videos-one-video-overlays-another-in-one-comma%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









            4














            Use this command:



            ffmpeg -stream_loop -1 -i background.mp4 -i input.mp4 -i logo.png
            -filter_complex "[1]scale=1280:720[inner];[0][inner]overlay=70:70:shortest=1[vid];
            [vid][2]overlay=10:10:enable='not(between(t,10,15))'[out]" -map "[out]" -map 1:a -c:a copy -y output.mp4





            share|improve this answer





























              4














              Use this command:



              ffmpeg -stream_loop -1 -i background.mp4 -i input.mp4 -i logo.png
              -filter_complex "[1]scale=1280:720[inner];[0][inner]overlay=70:70:shortest=1[vid];
              [vid][2]overlay=10:10:enable='not(between(t,10,15))'[out]" -map "[out]" -map 1:a -c:a copy -y output.mp4





              share|improve this answer



























                4












                4








                4







                Use this command:



                ffmpeg -stream_loop -1 -i background.mp4 -i input.mp4 -i logo.png
                -filter_complex "[1]scale=1280:720[inner];[0][inner]overlay=70:70:shortest=1[vid];
                [vid][2]overlay=10:10:enable='not(between(t,10,15))'[out]" -map "[out]" -map 1:a -c:a copy -y output.mp4





                share|improve this answer















                Use this command:



                ffmpeg -stream_loop -1 -i background.mp4 -i input.mp4 -i logo.png
                -filter_complex "[1]scale=1280:720[inner];[0][inner]overlay=70:70:shortest=1[vid];
                [vid][2]overlay=10:10:enable='not(between(t,10,15))'[out]" -map "[out]" -map 1:a -c:a copy -y output.mp4






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 5 hours ago









                JakeGould

                33k10100142




                33k10100142










                answered 5 hours ago









                GyanGyan

                16k21848




                16k21848




















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









                    draft saved

                    draft discarded


















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












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











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














                    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%2f1428290%2fhow-do-i-overlay-a-png-over-two-videos-one-video-overlays-another-in-one-comma%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

                    Bett Inhaltsverzeichnis Geschichte | Bettformen | Bettgrößen | Andere Bezeichnungen | Bettenmangel | Betten in der bildenden Kunst | Schlafmedizinische Gesichtspunkte | Siehe auch | Literatur | Weblinks | Einzelnachweise | NavigationsmenüBett, Bettstatt, BettstelleCommons: BettBabybetten: Anwendung, Ausstattungsmerkmale und VergleichskriterienWasserbetten. Vorurteile im TestHapfnNursch10.1007/s11818-012-0584-74006250-8AKS4329276-8

                    Luksemburg Sisukord Nimi | Asend | Loodus | Riigikord | Haldusjaotus | Rahvastik | Riigikaitse | Majandus | Taristu | Ajalugu | Eesti ja Luksemburgi suhted | Haridus | Kultuur | Vaata ka | Viited | Välislingid | Navigeerimismenüü50° N, 6° EÜlevaade Luksemburgi kaitsealadest.Luksemburgi rahvaarv. Statistikaamet.World Bank'i andmebaasÜlevaade Luksemburgi loodusest.Ülevaade Luksemburgi metsadest.Guy Colling. "Red List of the Vascular Plants of Luxembourg." Travaux scientifiques du Musée national d’histoire naturelle Luxembourg. 2005.Luxembourg’s biodiversity at risk.Maailma kahepaiksete andmebaas.Denis Lepage. "Luxembourg." Avibase.Ülevaade temperatuuridest. Luksemburgi meteoroloogiateenistus.Ülevaade Luksemburgist. Euroopa Liidu esinduse koduleht.Système politique. TerritoireÜlevaade Luksemburgi rahvastikust. Luksemburgi statistikaamet.Luksemburgi rahvastik. Luksemburgi statistikaamet.The World FactbookMonique Borsenberger, Paul Dickes. "Religions au Luxembourg. Quelle évolution entre 1999-2008". Luksemburgi statistikaamet. 2011.Luksemburgi peapiiskopkond. Catholic-Hierarchy.Luksemburgi armee koduleht.Luksemburgi armee relvastus.Eesti Välisministeerium.Luksemburgi rahvastik. Luksemburgi statistikaamet.Luksemburgi Eesti Seltsi koduleht.Helen Eelrand. "Raadio, mis muutis maailma." Eesti Päevaleht. 13. märts 2004.Ülevaade Luksemburgi haridussüsteemist.Ülevaade Luksemburgi keskkoolidest.Luksemburgr

                    Valle di Casies Indice Geografia fisica | Origini del nome | Storia | Società | Amministrazione | Sport | Note | Bibliografia | Voci correlate | Altri progetti | Collegamenti esterni | Menu di navigazione46°46′N 12°11′E / 46.766667°N 12.183333°E46.766667; 12.183333 (Valle di Casies)46°46′N 12°11′E / 46.766667°N 12.183333°E46.766667; 12.183333 (Valle di Casies)Sito istituzionaleAstat Censimento della popolazione 2011 - Determinazione della consistenza dei tre gruppi linguistici della Provincia Autonoma di Bolzano-Alto Adige - giugno 2012Numeri e fattiValle di CasiesDato IstatTabella dei gradi/giorno dei Comuni italiani raggruppati per Regione e Provincia26 agosto 1993, n. 412Heraldry of the World: GsiesStatistiche I.StatValCasies.comWikimedia CommonsWikimedia CommonsValle di CasiesSito ufficialeValle di CasiesMM14870458910042978-6