Thursday, September 5, 2013

Useful commands with ffmpeg

Converting mp4 to flv:

ffmpeg -i INPUT.mp4  -vcodec copy -acodec aac -strict experimental -ac 2 -ar 44100 -ab 192k OUTPUT.flv

Deleting logo from video:

ffmpeg -sameq -i INPUT.flv -vf "delogo=x=10:y=10:w=80:h=60:band=80:show=0" -vcodec flv -acodec copy OUTPUT.flv

this command deletes the logo which exists at x=10 and y=10 (x=0 and y=0 is top left). h is height and w is width. You can use show=1 to see the location of deleted logo.

Crop video:
ffmpeg -sameq -i INPUT.flv -vf "crop=WIDTH:HEIGHT"

No comments: