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
Does Prince Arnaud cause someone holding the Princess to lose?
What helicopter has the most rotor blades?
Lemmatization Vs Stemming
How to ask rejected full-time candidates to apply to teach individual courses?
What's the connection between Mr. Nancy and fried chicken?
Why doesn't the university give past final exams' answers?
Assertions In A Mock Callout Test
Pointing to problems without suggesting solutions
How do I deal with an erroneously large refund?
Short story about an alien named Ushtu(?) coming from a future Earth, when ours was destroyed by a nuclear explosion
Trying to enter the Fox's den
“Since the train was delayed for more than an hour, passengers were given a full refund.” – Why is there no article before “passengers”?
Can I take recommendation from someone I met at a conference?
Determine the generator of an ideal of ring of integers
When speaking, how do you change your mind mid-sentence?
2 sample t test for sample sizes - 30,000 and 150,000
Is there a way to convert Wolfram Language expression to string?
IC on Digikey is 5x more expensive than board containing same IC on Alibaba: How?
How to renew schengen visas
Who can become a wight?
xkeyval -- read keys from file
Why aren't these two solutions equivalent? Combinatorics problem
Can a Knight grant Knighthood to another?
How to create a command for the "strange m" symbol in latex?
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;
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
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.
add a comment |
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
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.
add a comment |
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
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
ffmpeg overlay
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.
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.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
edited 4 hours ago
JakeGould
33k10100142
33k10100142
answered 5 hours ago
GyanGyan
16k21848
16k21848
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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