progrez.cloud

FFMPEG Tutorial

07 Januari 2021

SCALE video and transparacy

ffmpeg -i HD.mov -vf scale=640:360 -c:v qtrle out.mov


...

CONVERT mov to mp4

ffmpeg -i input.mov -qscale 0 output.mp4


....

CONVERT for Telegram or Whatsapp

ffmpeg -i <input>.mp4 -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p <out>.mp4

video format must add baseline 3.0

reference hare

....


Zoom and crop video

ffmpeg -i input.mp4 -vf "scale=2*iw:-1, crop=iw/2:ih/1" output.mp4

video format must add baseline 3.0

reference hare

....


Speed up Video

ffmpeg -i input.mp4 -r 16 -filter:v "setpts=0.25*PTS" output.mp4

setpts = video speed //2.0 is slow 1.0 is normal & 0.25 is fast

reference hare

....


Cutting the videos start and end time

ffmpeg -i input.mp4 -ss 00:00:30 -t 00:00:30 -async 1 output.mp4

--ss = start point

-t = time record

....


Rotate video

ffmpeg -i input.mp4 -vf "transpose=1" output.mp4

0 - Rotate by 90 degrees counter-clockwise and flip vertically. This is the default.

1 - Rotate by 90 degrees clockwise. ( Recomendation )

2 - Rotate by 90 degrees counter-clockwise.

3 - Rotate by 90 degrees clockwise and flip vertically.

....