FFmpeg Guide: Convert, Resize, and Edit Any Media from the Terminal!

Опубликовано: 06 Май 2026
на канале: LinuxHowTo
20
1

Need to convert, resize, or edit media files quickly? In this video, we’ll show you how to use FFmpeg to handle various media tasks directly from the terminal. We’ll cover converting video formats, extracting audio, resizing videos, and trimming clips. Whether you’re a developer or a media enthusiast, FFmpeg is a powerful tool for all your media processing needs. Let’s dive into this comprehensive guide and see how you can get started with FFmpeg!
Learn:
1️⃣ Convert Video Format

ffmpeg -i input.mp4 output.avi # MP4 → AVI
ffmpeg -i video.mkv video.mp4 # MKV → MP4

2️⃣ Extract Audio

ffmpeg -i video.mp4 audio.mp3 # Extract MP3
ffmpeg -i video.mov sound.wav # Extract WAV

3️⃣ Resize Video

ffmpeg -i input.mp4 -vf scale=640:480 output.mp4 # Resize to 640x480

4️⃣ Trim Video

ffmpeg -i video.mp4 -ss 00:01:00 -t 00:00:30 clip.mp4 # 1min mark, 30sec clip

Fast trim (no re-encoding)
ffmpeg -ss 00:01:00 -i video.mp4 -t 00:00:30 -c copy clip.mp4

-c copy copies audio/video streams without re-encoding — instant and lossless, but not frame-accurate.

Result:
👉 Creates clip.mp4 containing video from 01:00 → 01:30 of video.mp4.

✅ Why Use FFmpeg?
Versatility: Convert, resize, and edit various media formats.
Efficiency: Perform tasks quickly and efficiently from the terminal.
Powerful: Handle complex media processing with ease.

✅ Pro Tips:
Use -c copy for Fast Trimming: Avoid re-encoding for faster, lossless trimming.
Experiment with Filters: Use FFmpeg’s vast library of filters for unique effects.
Batch Processing: Automate tasks with shell scripts for batch processing.

You can find the tutorial files and sample videos used in this video at this GitLab link: https://gitlab.com/hatem-badawi/linux....

Hit subscribe for more Linux and media processing tips and like if this helped.
Let us know: What media task will you tackle first with FFmpeg?

👉 Watch now and master media processing with FFmpeg!

#FFmpeg #MediaProcessing #LinuxTips #TerminalCommands #ProductivityHacks

(Short, clear, and packed with practical knowledge!)