ffmpeg overlay rotated images onto a video, how to transparent the output area not covered by the rotated...
I am using ffmpeg
to overlay a picture on a movie. The requirement is to rotate the picture through an arbitrary angle. Using filter_complex
, I can overlay the rotated picture now. However, the output area of the picture is filled in black and not transparent. I checked the docs, it says can specify the fill color, according to this, but I failed to do so. Any ideas?
I copy my command line here:
./ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-30*PI/180:c=black@'0x00':ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4
images ffmpeg transparency rotate
add a comment |
I am using ffmpeg
to overlay a picture on a movie. The requirement is to rotate the picture through an arbitrary angle. Using filter_complex
, I can overlay the rotated picture now. However, the output area of the picture is filled in black and not transparent. I checked the docs, it says can specify the fill color, according to this, but I failed to do so. Any ideas?
I copy my command line here:
./ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-30*PI/180:c=black@'0x00':ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4
images ffmpeg transparency rotate
Have you tried this?-vcodec png -pix_fmt bgra overlayavatar.mov
– Ĭsααc tիε βöss
Jul 2 '14 at 10:23
sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.
– xftzg
Jul 3 '14 at 4:55
add a comment |
I am using ffmpeg
to overlay a picture on a movie. The requirement is to rotate the picture through an arbitrary angle. Using filter_complex
, I can overlay the rotated picture now. However, the output area of the picture is filled in black and not transparent. I checked the docs, it says can specify the fill color, according to this, but I failed to do so. Any ideas?
I copy my command line here:
./ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-30*PI/180:c=black@'0x00':ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4
images ffmpeg transparency rotate
I am using ffmpeg
to overlay a picture on a movie. The requirement is to rotate the picture through an arbitrary angle. Using filter_complex
, I can overlay the rotated picture now. However, the output area of the picture is filled in black and not transparent. I checked the docs, it says can specify the fill color, according to this, but I failed to do so. Any ideas?
I copy my command line here:
./ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-30*PI/180:c=black@'0x00':ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4
images ffmpeg transparency rotate
images ffmpeg transparency rotate
edited Jul 2 '14 at 10:38
Cornelius
2,3961923
2,3961923
asked Jul 2 '14 at 8:49
xftzgxftzg
32
32
Have you tried this?-vcodec png -pix_fmt bgra overlayavatar.mov
– Ĭsααc tիε βöss
Jul 2 '14 at 10:23
sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.
– xftzg
Jul 3 '14 at 4:55
add a comment |
Have you tried this?-vcodec png -pix_fmt bgra overlayavatar.mov
– Ĭsααc tիε βöss
Jul 2 '14 at 10:23
sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.
– xftzg
Jul 3 '14 at 4:55
Have you tried this?
-vcodec png -pix_fmt bgra overlayavatar.mov
– Ĭsααc tիε βöss
Jul 2 '14 at 10:23
Have you tried this?
-vcodec png -pix_fmt bgra overlayavatar.mov
– Ĭsααc tիε βöss
Jul 2 '14 at 10:23
sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.
– xftzg
Jul 3 '14 at 4:55
sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.
– xftzg
Jul 3 '14 at 4:55
add a comment |
1 Answer
1
active
oldest
votes
for transparent try c=none.
ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=- 30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.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
});
}
});
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%2f775922%2fffmpeg-overlay-rotated-images-onto-a-video-how-to-transparent-the-output-area-n%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
for transparent try c=none.
ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=- 30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4
add a comment |
for transparent try c=none.
ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=- 30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4
add a comment |
for transparent try c=none.
ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=- 30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4
for transparent try c=none.
ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=- 30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4
edited Oct 30 '14 at 11:47
Kunal
1,58551726
1,58551726
answered Oct 30 '14 at 10:54
Apostol VictorApostol Victor
16
16
add a comment |
add a comment |
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%2f775922%2fffmpeg-overlay-rotated-images-onto-a-video-how-to-transparent-the-output-area-n%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
Have you tried this?
-vcodec png -pix_fmt bgra overlayavatar.mov
– Ĭsααc tիε βöss
Jul 2 '14 at 10:23
sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.
– xftzg
Jul 3 '14 at 4:55