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 this water damage be explained by lack of gutters and grading issues?
reduction from 3-SAT to Subset Sum problem
Putting Ant-Man on house arrest
How do I deal with an erroneously large refund?
Is it OK if I do not take the receipt in Germany?
What could prevent concentrated local exploration?
Why do people think Winterfell crypts is the safest place for women, children & old people?
How to mute a string and play another at the same time
Assertions In A Mock Callout Test
Who's this lady in the war room?
Why do C and C++ allow the expression (int) + 4*5?
Does traveling In The United States require a passport or can I use my green card if not a US citizen?
Is Vivien of the Wilds + Wilderness Reclimation a competitive combo?
Converting a text document with special format to Pandas DataFrame
Married in secret, can marital status in passport be changed at a later date?
Are there any AGPL-style licences that require source code modifications to be public?
Raising a bilingual kid. When should we introduce the majority language?
Is "ein Herz wie das meine" an antiquated or colloquial use of the possesive pronoun?
How to break 信じようとしていただけかも知れない into separate parts?
Can the van der Waals coefficients be negative in the van der Waals equation for real gases?
Like totally amazing interchangeable sister outfit accessory swapping or whatever
Can Deduction Guide have an explicit(bool) specifier?
Why these surprising proportionalities of integrals involving odd zeta values?
IC on Digikey is 5x more expensive than board containing same IC on Alibaba: How?
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 5 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