FFMPEG images to video + overlay video











up vote
1
down vote

favorite












I am trying to make 15 second video where the background layer is a video made up of 2 images, the first line creates a 15 second video from 2 images.



I chose a small framerate so it renders an mp4 quickly. I then overlay a webm video (which has transparency) over the images. The final video seems to keep the framerate of 2, but i would rather keep the 24 framerate of the webm video.



Is this possible? & is it also possible to turn the below into 1 statement.



ffmpeg -loop 1 -framerate 2 -t 11 -i image1.png -loop 1 -framerate 2 -t 4 -i image2.png -filter_complex "[0][1]concat=n=2" backgroundvideo.mp4;
ffmpeg -i backgroundvideo.mp4 -c:v libvpx-vp9 -i overlayvideo.webm -filter_complex overlay newvid.mp4









share|improve this question


























    up vote
    1
    down vote

    favorite












    I am trying to make 15 second video where the background layer is a video made up of 2 images, the first line creates a 15 second video from 2 images.



    I chose a small framerate so it renders an mp4 quickly. I then overlay a webm video (which has transparency) over the images. The final video seems to keep the framerate of 2, but i would rather keep the 24 framerate of the webm video.



    Is this possible? & is it also possible to turn the below into 1 statement.



    ffmpeg -loop 1 -framerate 2 -t 11 -i image1.png -loop 1 -framerate 2 -t 4 -i image2.png -filter_complex "[0][1]concat=n=2" backgroundvideo.mp4;
    ffmpeg -i backgroundvideo.mp4 -c:v libvpx-vp9 -i overlayvideo.webm -filter_complex overlay newvid.mp4









    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am trying to make 15 second video where the background layer is a video made up of 2 images, the first line creates a 15 second video from 2 images.



      I chose a small framerate so it renders an mp4 quickly. I then overlay a webm video (which has transparency) over the images. The final video seems to keep the framerate of 2, but i would rather keep the 24 framerate of the webm video.



      Is this possible? & is it also possible to turn the below into 1 statement.



      ffmpeg -loop 1 -framerate 2 -t 11 -i image1.png -loop 1 -framerate 2 -t 4 -i image2.png -filter_complex "[0][1]concat=n=2" backgroundvideo.mp4;
      ffmpeg -i backgroundvideo.mp4 -c:v libvpx-vp9 -i overlayvideo.webm -filter_complex overlay newvid.mp4









      share|improve this question













      I am trying to make 15 second video where the background layer is a video made up of 2 images, the first line creates a 15 second video from 2 images.



      I chose a small framerate so it renders an mp4 quickly. I then overlay a webm video (which has transparency) over the images. The final video seems to keep the framerate of 2, but i would rather keep the 24 framerate of the webm video.



      Is this possible? & is it also possible to turn the below into 1 statement.



      ffmpeg -loop 1 -framerate 2 -t 11 -i image1.png -loop 1 -framerate 2 -t 4 -i image2.png -filter_complex "[0][1]concat=n=2" backgroundvideo.mp4;
      ffmpeg -i backgroundvideo.mp4 -c:v libvpx-vp9 -i overlayvideo.webm -filter_complex overlay newvid.mp4






      ffmpeg






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 7 at 12:48









      AK47

      153




      153
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          You can use the filter fps to adjust your background's framerate



          ffmpeg 
          -loop 1 -framerate 2 -t 11 -i image1.png
          -loop 1 -framerate 2 -t 4 -i image2.png
          -c:v libvpx-vp9 -i overlayvideo.webm
          -filter_complex '[0][1]concat,fps=24[bg];[2][bg]overlay'
          backgroundvideo.mp4





          share|improve this answer



















          • 1




            To preserve transparency in the webm, you'll need to force the vp9 decoder like the OP has done.
            – Gyan
            Nov 7 at 13:56






          • 1




            Great, what line do you force the decoder on? I have tried a few different places which all throw errors
            – AK47
            Nov 7 at 14:15










          • @AK47 updated..
            – oguzismail
            Nov 7 at 14:21






          • 1




            Perfect! Thanks for the help!
            – AK47
            Nov 7 at 14:36











          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',
          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%2fstackoverflow.com%2fquestions%2f53189763%2fffmpeg-images-to-video-overlay-video%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








          up vote
          1
          down vote



          accepted










          You can use the filter fps to adjust your background's framerate



          ffmpeg 
          -loop 1 -framerate 2 -t 11 -i image1.png
          -loop 1 -framerate 2 -t 4 -i image2.png
          -c:v libvpx-vp9 -i overlayvideo.webm
          -filter_complex '[0][1]concat,fps=24[bg];[2][bg]overlay'
          backgroundvideo.mp4





          share|improve this answer



















          • 1




            To preserve transparency in the webm, you'll need to force the vp9 decoder like the OP has done.
            – Gyan
            Nov 7 at 13:56






          • 1




            Great, what line do you force the decoder on? I have tried a few different places which all throw errors
            – AK47
            Nov 7 at 14:15










          • @AK47 updated..
            – oguzismail
            Nov 7 at 14:21






          • 1




            Perfect! Thanks for the help!
            – AK47
            Nov 7 at 14:36















          up vote
          1
          down vote



          accepted










          You can use the filter fps to adjust your background's framerate



          ffmpeg 
          -loop 1 -framerate 2 -t 11 -i image1.png
          -loop 1 -framerate 2 -t 4 -i image2.png
          -c:v libvpx-vp9 -i overlayvideo.webm
          -filter_complex '[0][1]concat,fps=24[bg];[2][bg]overlay'
          backgroundvideo.mp4





          share|improve this answer



















          • 1




            To preserve transparency in the webm, you'll need to force the vp9 decoder like the OP has done.
            – Gyan
            Nov 7 at 13:56






          • 1




            Great, what line do you force the decoder on? I have tried a few different places which all throw errors
            – AK47
            Nov 7 at 14:15










          • @AK47 updated..
            – oguzismail
            Nov 7 at 14:21






          • 1




            Perfect! Thanks for the help!
            – AK47
            Nov 7 at 14:36













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          You can use the filter fps to adjust your background's framerate



          ffmpeg 
          -loop 1 -framerate 2 -t 11 -i image1.png
          -loop 1 -framerate 2 -t 4 -i image2.png
          -c:v libvpx-vp9 -i overlayvideo.webm
          -filter_complex '[0][1]concat,fps=24[bg];[2][bg]overlay'
          backgroundvideo.mp4





          share|improve this answer














          You can use the filter fps to adjust your background's framerate



          ffmpeg 
          -loop 1 -framerate 2 -t 11 -i image1.png
          -loop 1 -framerate 2 -t 4 -i image2.png
          -c:v libvpx-vp9 -i overlayvideo.webm
          -filter_complex '[0][1]concat,fps=24[bg];[2][bg]overlay'
          backgroundvideo.mp4






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 7 at 14:20

























          answered Nov 7 at 13:41









          oguzismail

          2,190518




          2,190518








          • 1




            To preserve transparency in the webm, you'll need to force the vp9 decoder like the OP has done.
            – Gyan
            Nov 7 at 13:56






          • 1




            Great, what line do you force the decoder on? I have tried a few different places which all throw errors
            – AK47
            Nov 7 at 14:15










          • @AK47 updated..
            – oguzismail
            Nov 7 at 14:21






          • 1




            Perfect! Thanks for the help!
            – AK47
            Nov 7 at 14:36














          • 1




            To preserve transparency in the webm, you'll need to force the vp9 decoder like the OP has done.
            – Gyan
            Nov 7 at 13:56






          • 1




            Great, what line do you force the decoder on? I have tried a few different places which all throw errors
            – AK47
            Nov 7 at 14:15










          • @AK47 updated..
            – oguzismail
            Nov 7 at 14:21






          • 1




            Perfect! Thanks for the help!
            – AK47
            Nov 7 at 14:36








          1




          1




          To preserve transparency in the webm, you'll need to force the vp9 decoder like the OP has done.
          – Gyan
          Nov 7 at 13:56




          To preserve transparency in the webm, you'll need to force the vp9 decoder like the OP has done.
          – Gyan
          Nov 7 at 13:56




          1




          1




          Great, what line do you force the decoder on? I have tried a few different places which all throw errors
          – AK47
          Nov 7 at 14:15




          Great, what line do you force the decoder on? I have tried a few different places which all throw errors
          – AK47
          Nov 7 at 14:15












          @AK47 updated..
          – oguzismail
          Nov 7 at 14:21




          @AK47 updated..
          – oguzismail
          Nov 7 at 14:21




          1




          1




          Perfect! Thanks for the help!
          – AK47
          Nov 7 at 14:36




          Perfect! Thanks for the help!
          – AK47
          Nov 7 at 14:36


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53189763%2fffmpeg-images-to-video-overlay-video%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







          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini