Start typing real FFmpeg commands: the basic ffmpeg -i input output syntax, converting MP4 to MKV and WebM formats, the difference between stream copy and a full re-encode, and the habit of reading file metadata and duration via ffprobe before deciding on a command.

After understanding FFmpeg's architecture in episode 2 — the demux-decode-filter-encode-mux pipeline and the stream concept — it's now time to type real commands. This episode is your "first day on the job": you'll learn the basic syntax, do format conversions, and tell apart the two strategies that most determine the result — stream copy and re-encode.
Why does this matter? Because most beginner FFmpeg mistakes don't come from complicated options, but from misunderstanding two things: the input-output order, and whether data is really re-processed or merely copied.
All of FFmpeg starts from one pattern: input first, output last.
ffmpeg [opsi-input] -i INPUT [opsi-output] OUTPUTThe simplest example — copy (without re-encoding) one file to another format:
ffmpeg -i sample.mp4 sample.mkvThis command reads sample.mp4, then writes sample.mkv. Because there are no codec options, FFmpeg picks defaults: libx264 for video and aac for audio, so re-encoding happens. For quick tasks, this is often undesirable — we cover stream copy below.
Important
The order cannot be reversed: ffmpeg sample.mp4 -i sample.mkv will confuse FFmpeg and fail. Always write -i along with its input before the output. This is rule number one to internalize.
Now let's break down the term we only mentioned briefly in episode 0: codec vs container. Format conversion can mean two very different things:
For pure container-swapping tasks, use stream copy:
ffmpeg -i sample.mp4 -c copy sample.mkvffmpeg -i sample.mp4 -c:v libvpx-vp9 -c:a libopus sample.webmThe first completes in seconds because data is only copied. The second takes time because H.264 video must be decoded then re-encoded into VP9 and Opus — the standard codec pair for WebM.
This is one of the decisions you'll make most often. Understand this table early:
| Aspect | -c copy | Re-encode |
|---|---|---|
| Process | Data copied raw | Decode + re-encode |
| Speed | Very fast | Slow, depending on codec |
| Quality | Unchanged | Potentially reduced |
| File size | Generally unchanged | Can be reduced |
| Use case | Change container, join streams | Change codec, resolution, bitrate |
-c copy is like photocopying an original document; re-encoding is like retyping the document on a new computer. Photocopying is instant but can't change content; retyping is slow but you can edit anything. Choose based on need, not habit.
Extending the options: -c:v selects the video codec, -c:a selects the audio codec. Example of re-encoding video only, keeping audio copied:
ffmpeg -i sample.mp4 -c:v libx264 -crf 23 -c:a copy sample-h264.mp4Before typing any command, a good technician inspects the raw material first. That's the job of ffprobe — the media inspector we met in episode 2. Start with the most concise form:
ffprobe -hide_banner sample.mp4Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
Metadata:
major_brand : isom
Duration: 00:00:10.00, start: 0.000000, bitrate: 123 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360
Stream #0:1[0x1](und): Audio: aac (LC) (mp4a / 0x6134706d), 44100 Hz, stereo, fltpFrom this output you can directly read duration, bitrate, video resolution, and audio codec — exactly the information needed before deciding on a transcode strategy.
For a more structured form that's easy to use in scripts, combine -show_format with -show_streams:
ffprobe -hide_banner -show_format -show_streams sample.mp4These two options you'll use every day to keep the terminal clean and informative:
| Option | Function |
|---|---|
-hide_banner | Remove the version banner and build config |
-loglevel | Set detail level: quiet, error, warning, info, debug |
The example most used in production — showing only errors:
ffmpeg -hide_banner -loglevel error -i sample.mp4 -c copy sample.mkvWith -loglevel error, the terminal only shouts when there's a problem — perfect for scripts and CI/CD that must stay clean.
Tip
Always test on a small file or a short clip before processing a batch: ffmpeg -ss 00:00:00 -t 10 -i sample.mp4 -c copy test.mp4 grabs the first 10 seconds in an instant — the best companion for trying new options without waiting long.
In episode 3, you've written your first real FFmpeg commands: the basic syntax, MP4-MKV-WebM container conversion, the difference between -c copy and re-encoding, reading metadata via ffprobe, and controlling output with -hide_banner and -loglevel.
Key takeaways:
ffmpeg [opsi-input] -i INPUT [opsi-output] OUTPUT.-c copy; change codec: re-encode with -c:v and -c:a.-c copy is a photocopy, re-encode is retyping — choose according to need.ffprobe is a good habit before every transcode: read duration, bitrate, and streams first.-hide_banner and -loglevel error keep output clean.In the next episode 4, we enter the heart of video quality: video encoding & codecs — understanding H.264, H.265/HEVC, VP9, and AV1, the role of -crf and -preset, two-pass strategy, and setting resolution, fps, and GOP. See you in episode 4!