This page permanently redirects to gemini://yaky.dev/notes/ffmpeg/.

Editing video using ffmpeg

Usage examples from own experience.

Convert to another codec

ffmpeg -i original_video.mp4 -vcodec libx265 -crf 20 

Resize

fmpeg -i original_video.mp4 -vf "scale=-2:720" video_720.mp4

Crop a rectangular area

ffmpeg -i original_video.mp4 -c:v copy -c:a copy -vf "crop=120:180:640:480;eq=brightness=0.15:contrast=1.3" cropped_video.mp4

Trim by time

ffmpeg -i original_video.mp4 -ss 00:05:30 -t 00:01:00 -c:v copy -an trimmed_video.mp4

Where:

Play video with applied filters

ffplay -ss 00:16:00 -t 00:05:00 -vf "eq=brightness=0.2:contrast=1.5" video_to_play.mp4

Useful for previewing filters you are about to apply.

=> home

email me: hi@yaky.dev

CC BY-NC yaky.dev

Proxy Information
Original URL
gemini://yaky.dev/notes/ffmpeg
Status Code
Success (20)
Meta
text/gemini;lang=en-US
Capsule Response Time
789.595337 milliseconds
Gemini-to-HTML Time
0.887849 milliseconds

This content has been proxied by September (3851b).