ffmpeg transpose source and scale watermark to fit on different video sizes
up vote
-1
down vote
favorite
I'm using already using the line below to transpose the source, but I'm facing a problem of the watermark being out of proportion when the video resolution is different
How can I make watermark fit on different video sizes?
ffmpeg -i input -i watermark.png -filter_complex "transpose=1,overlay=-40:300" -vb 370k -minrate 300k -maxrate 350k -bufsize 350k -aspect "720:1280" -s "360x640" -c:v libx264 -profile:v "Main" -level "3.1" -r 25 -g 25 -keyint_min 50 -x264opts "keyint=50:min-keyint=50:no-scenecut" -c:a aac -strict experimental -b:a 32000 -ar 32000 -ac 1 output
ffmpeg overlay scaling
add a comment |
up vote
-1
down vote
favorite
I'm using already using the line below to transpose the source, but I'm facing a problem of the watermark being out of proportion when the video resolution is different
How can I make watermark fit on different video sizes?
ffmpeg -i input -i watermark.png -filter_complex "transpose=1,overlay=-40:300" -vb 370k -minrate 300k -maxrate 350k -bufsize 350k -aspect "720:1280" -s "360x640" -c:v libx264 -profile:v "Main" -level "3.1" -r 25 -g 25 -keyint_min 50 -x264opts "keyint=50:min-keyint=50:no-scenecut" -c:a aac -strict experimental -b:a 32000 -ar 32000 -ac 1 output
ffmpeg overlay scaling
Sounds frustrating. What questions can we answer for you to help resolve your issue?
– szatmary
Nov 9 at 2:07
How can I make watermark fit on different video sizes?
– david
Nov 9 at 3:04
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I'm using already using the line below to transpose the source, but I'm facing a problem of the watermark being out of proportion when the video resolution is different
How can I make watermark fit on different video sizes?
ffmpeg -i input -i watermark.png -filter_complex "transpose=1,overlay=-40:300" -vb 370k -minrate 300k -maxrate 350k -bufsize 350k -aspect "720:1280" -s "360x640" -c:v libx264 -profile:v "Main" -level "3.1" -r 25 -g 25 -keyint_min 50 -x264opts "keyint=50:min-keyint=50:no-scenecut" -c:a aac -strict experimental -b:a 32000 -ar 32000 -ac 1 output
ffmpeg overlay scaling
I'm using already using the line below to transpose the source, but I'm facing a problem of the watermark being out of proportion when the video resolution is different
How can I make watermark fit on different video sizes?
ffmpeg -i input -i watermark.png -filter_complex "transpose=1,overlay=-40:300" -vb 370k -minrate 300k -maxrate 350k -bufsize 350k -aspect "720:1280" -s "360x640" -c:v libx264 -profile:v "Main" -level "3.1" -r 25 -g 25 -keyint_min 50 -x264opts "keyint=50:min-keyint=50:no-scenecut" -c:a aac -strict experimental -b:a 32000 -ar 32000 -ac 1 output
ffmpeg overlay scaling
ffmpeg overlay scaling
edited Nov 9 at 3:04
asked Nov 8 at 22:35
david
12
12
Sounds frustrating. What questions can we answer for you to help resolve your issue?
– szatmary
Nov 9 at 2:07
How can I make watermark fit on different video sizes?
– david
Nov 9 at 3:04
add a comment |
Sounds frustrating. What questions can we answer for you to help resolve your issue?
– szatmary
Nov 9 at 2:07
How can I make watermark fit on different video sizes?
– david
Nov 9 at 3:04
Sounds frustrating. What questions can we answer for you to help resolve your issue?
– szatmary
Nov 9 at 2:07
Sounds frustrating. What questions can we answer for you to help resolve your issue?
– szatmary
Nov 9 at 2:07
How can I make watermark fit on different video sizes?
– david
Nov 9 at 3:04
How can I make watermark fit on different video sizes?
– david
Nov 9 at 3:04
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
The scale2ref filter is meant for this use case.
-filter_complex "[0]transpose=1[v];[1][v]scale2ref=oh*mdar:ih/8[w][v];[v][w]overlay=X:Y"
The watermark's height will be resized to 1/8th the height of the video. The width will be proportionally resized.
Hi thank you so much, how about if I want to add 2 watermarks, but Transpose the input without transposing the two watermarks, Thanks a lot
– david
Nov 15 at 17:59
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The scale2ref filter is meant for this use case.
-filter_complex "[0]transpose=1[v];[1][v]scale2ref=oh*mdar:ih/8[w][v];[v][w]overlay=X:Y"
The watermark's height will be resized to 1/8th the height of the video. The width will be proportionally resized.
Hi thank you so much, how about if I want to add 2 watermarks, but Transpose the input without transposing the two watermarks, Thanks a lot
– david
Nov 15 at 17:59
add a comment |
up vote
0
down vote
The scale2ref filter is meant for this use case.
-filter_complex "[0]transpose=1[v];[1][v]scale2ref=oh*mdar:ih/8[w][v];[v][w]overlay=X:Y"
The watermark's height will be resized to 1/8th the height of the video. The width will be proportionally resized.
Hi thank you so much, how about if I want to add 2 watermarks, but Transpose the input without transposing the two watermarks, Thanks a lot
– david
Nov 15 at 17:59
add a comment |
up vote
0
down vote
up vote
0
down vote
The scale2ref filter is meant for this use case.
-filter_complex "[0]transpose=1[v];[1][v]scale2ref=oh*mdar:ih/8[w][v];[v][w]overlay=X:Y"
The watermark's height will be resized to 1/8th the height of the video. The width will be proportionally resized.
The scale2ref filter is meant for this use case.
-filter_complex "[0]transpose=1[v];[1][v]scale2ref=oh*mdar:ih/8[w][v];[v][w]overlay=X:Y"
The watermark's height will be resized to 1/8th the height of the video. The width will be proportionally resized.
answered Nov 9 at 6:36
Gyan
29.7k22464
29.7k22464
Hi thank you so much, how about if I want to add 2 watermarks, but Transpose the input without transposing the two watermarks, Thanks a lot
– david
Nov 15 at 17:59
add a comment |
Hi thank you so much, how about if I want to add 2 watermarks, but Transpose the input without transposing the two watermarks, Thanks a lot
– david
Nov 15 at 17:59
Hi thank you so much, how about if I want to add 2 watermarks, but Transpose the input without transposing the two watermarks, Thanks a lot
– david
Nov 15 at 17:59
Hi thank you so much, how about if I want to add 2 watermarks, but Transpose the input without transposing the two watermarks, Thanks a lot
– david
Nov 15 at 17:59
add a comment |
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%2fstackoverflow.com%2fquestions%2f53217185%2fffmpeg-transpose-source-and-scale-watermark-to-fit-on-different-video-sizes%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
Sounds frustrating. What questions can we answer for you to help resolve your issue?
– szatmary
Nov 9 at 2:07
How can I make watermark fit on different video sizes?
– david
Nov 9 at 3:04