Adjusting watermark according to video resolution using ffmpeg
Use the scale2ref filter as follows:
ffmpeg -i video.mp4 -i watermark.png -filter_complex "[1][0]scale2ref=w='iw*5/100':h='ow/mdar'[wm][vid];[vid][wm]overlay=10:10" output.mp4
This will proprortionally scale the watermark width to 5% of the video width, and then overlay the resized watermark.
Combine filters for watermark and video speed using FFmpeg
Combined command:
ffmpeg -i input.mp4 -i watermark.png -filter_complex "[1][0]scale2ref=w=oh*mdar:h=ih*0.1[logo][video];[video][logo]overlay=5:H-h-5,setpts=0.5*PTS;[0:a]atempo=2.0" output.mp4
Connect linear filters with a comma. Connect filterchains with a semicolon. See FFmpeg Filtering Intro.
How to reduce the size of watermark using FFMPEG
Add the scale filter:
ffmpeg -i thumb-168pa-usrao.jpg -i evercam-logo-white.png -filter_complex '[1]scale=iw/2:-1[wm];[0][wm]overlay=x=main_w-overlay_w-10:y=main_h-overlay_h-10' test.jpg
This will "reduce the size of watermark to half of its size".
ffmpeg how to upscale video 2x but only if resulting size is smaller than 720 height?
Yes. Use scale
filter with expression:
scale=-1:'if(lte(ih,360),2*ih,ih)'
The width will be automatically set proportional to the height.
[edit] Thanks @anonymous for spotting the inaccuracy in the original solution. The original solution:
scale='if(lt(iw,720)*lt(ih,720),2*iw,iw)':-1
This one doubles the frame size if either dimension is less than 720px, which is not accurate to the OP's need.
Related Topics
Linux Newbie: Linux VS Posix Manual
String Comparison Not Working Properly
How to Run a Shell Script by Cron Job
How to Connect a Shell to a Pseudo Tty
Fast Linux File Count for a Large Number of Files
File Execution with Dot Space Versus Dot Slash
How to Find All Files with a Filename That Ends with Tilde
Logrotate to Clean Up Date Stamped Files
How to Make One Linux Kernel Module Depend on Another External Module with Depmod
In Bash, Why 'X=100 Echo $X' Doesn't Print Anything
How to Use Stdin Twice from Pipe
Printing Variable to Command Line Using Assembly in Linux
Eclipse Cdt Indexer Lost After System Update
Connect to Host Localhost Port 22: Connection Refused