Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Interpolate video frames for a higher frame rate
- ffmpeg -i source.mp4 -filter:v minterpolate -r 25 result.mp4
- ffmpeg -i source.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 result.mp4
- # Crop a video to the bottom right quarter
- ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4
- # Crop a video to window xsize:ysize:x:y
- ffmpeg -y -i shot0020.avi -vf 'crop=320:240:380:380' cropped.mp4
- # Crop a video and then rescale
- ffmpeg -y -i input.avi -vf 'crop=500:300:500:800,scale=1000:600' output.mp4
- # Overlay a video resized to 640x480 onto a background video in the bottom right corner
- ffmpeg -i shot0020.avi -i cropped.mp4 -filter_complex "[1] scale=640:480 [over]; [0][over] overlay=640:480" result.mp4
- # Overlay a frame number on the video
- ffmpeg -i input.mp4 -vf "drawtext=fontfile=Arial.ttf: text=%{n}: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099" output.mp4
- # Overlay a date and time on the video
- ffmpeg -i input.mp4 -vf "drawtext=fontfile=Arial.ttf: text='%{pts\:gmtime\:1507046400\:%d-%m-%Y %T}': x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099" output.mp4
Add Comment
Please, Sign In to add comment