Cutsio Blog

How to Compress and Convert Video Files Using FFmpeg (2026)

Learn how to use FFmpeg to compress video files, convert formats, and change resolutions. Discover the exact commands needed for MP4 conversion and how Cutsio automates this for client sharing.

Short answer: to compress and convert video files using FFmpeg, you execute command-line instructions specifying the input file (-i), the video codec (-c:v), the audio codec (-c:a), and parameters like bitrate (-b:v) or constant rate factor (-crf) before naming the output file.

Video compression is a critical task for any video production team. Uncompressed raw footage from modern cameras is often too large to store long-term or share over the internet. FFmpeg provides granular control over how video is encoded, allowing technical editors to strike the perfect balance between file size and visual quality.

However, writing these commands manually is slow and prone to errors. For teams that simply need to share high-quality video cuts with clients, Cutsio automates the entire compression and delivery process, providing instant playback via a secure link without any command-line scripting.

How do you convert a video to MP4 using FFmpeg?

Short answer: to convert a video to MP4 using FFmpeg, open your terminal and run the command ffmpeg -i input_video.mov -c:v libx264 -c:a aac output_video.mp4. This converts the video track to H.264 and the audio track to AAC.

The .mp4 container combined with the H.264 video codec is the most universally supported video format on the web. In the command above, -i input_video.mov specifies the source file. The flag -c:v libx264 tells FFmpeg to encode the video stream using the software H.264 encoder. The flag -c:a aac tells it to encode the audio stream using the Advanced Audio Coding format.

If your source file is already encoded in H.264 and you simply want to change the container from .mov or .mkv to .mp4 without re-encoding the video data, you can use the command ffmpeg -i input_video.mov -c copy output_video.mp4. The -c copy parameter copies the data streams instantly, saving time and preventing any quality loss.

How do you compress video size using FFmpeg?

Short answer: to compress the size of a video using FFmpeg, you use the Constant Rate Factor (CRF) parameter by adding -crf 23 to your command. A higher CRF value reduces the file size and lowers the quality, while a lower value increases the file size and improves the quality.

The Constant Rate Factor is the recommended method for compressing H.264 and H.265 (HEVC) video. Unlike setting a strict target bitrate, CRF allows the encoder to use more data for complex, high-motion scenes and less data for static scenes, optimizing the overall file size.

The CRF scale ranges from 0 to 51. A value of 0 is mathematically lossless (huge file size), 23 is the default for H.264, and 51 is the lowest quality. For most web-delivery purposes, a CRF value between 18 and 24 provides an excellent balance of small file size and high visual fidelity. An example command for compression is ffmpeg -i input.mp4 -c:v libx264 -crf 23 -c:a aac output_compressed.mp4.

How do you change video bitrate with FFmpeg?

Short answer: to change a video's bitrate to a specific target with FFmpeg, use the -b:v flag for the video stream and the -b:a flag for the audio stream. For example, ffmpeg -i input.mp4 -b:v 2M -b:a 128k output.mp4 sets the video bitrate to 2 Megabits per second.

While CRF is generally better for maximizing quality, setting a specific target bitrate is necessary when you have strict file size limits (e.g., uploading to a platform with a 500MB cap) or bandwidth constraints for streaming.

When using target bitrates, it is often recommended to use two-pass encoding. In the first pass, FFmpeg analyzes the video to understand where complex scenes are located. In the second pass, it performs the actual compression. This results in much higher quality for the given bitrate but takes twice as long to process.

How do you scale or resize video resolution using FFmpeg?

Short answer: to resize a video's resolution using FFmpeg, use the -vf scale video filter. To convert a 4K video to 1080p, use the command ffmpeg -i input.mp4 -vf scale=1920:1080 output.mp4.

Scaling is frequently used to create lightweight proxy files or to format videos for mobile devices. If you want to change the width to a specific pixel count while automatically calculating the correct height to maintain the original aspect ratio, you can use -1 for the height parameter.

For example, to resize any video to a width of 1280 pixels while preserving the aspect ratio, the command is ffmpeg -i input.mp4 -vf scale=1280:-1 output.mp4. FFmpeg also supports high-quality scaling algorithms, such as Lanczos, which can be specified within the filter graph if superior downscaling is required.

Why is manual FFmpeg compression slow for client review?

Short answer: manual FFmpeg compression is slow for client review because the editor must spend time calculating bitrates, waiting for local rendering to finish, and then separately uploading the file to a transfer service.

When a client requests a quick rough cut, speed is critical. If an editor exports a massive ProRes master file from their NLE, they must then drop into the terminal, write an FFmpeg compression command, and wait for their CPU to process the file. This local rendering locks up the editor's machine.

Once the file is compressed, the editor still has to use a file transfer service to send it. When the client receives it, they must download the file to view it, creating a disjointed, multi-step process that delays feedback.

How does Cutsio automate video compression and sharing?

Short answer: Cutsio automates compression by allowing editors to upload their heavy master files directly. The platform automatically transcodes the file in the cloud for instant, frictionless playback on any device, eliminating the need for manual FFmpeg scripting.

Cutsio is built for speed and presentation. Instead of worrying about CRF values, bitrates, or codec compatibility, video teams simply drag their high-resolution export into Cutsio. The platform's backend infrastructure handles the complex encoding automatically.

The client receives a secure, branded link. They do not have to download a massive file or install specialized media players. The video plays instantly in their browser with perfect fidelity, and they can leave frame-accurate comments directly on the timeline. Cutsio turns a multi-step, technically demanding FFmpeg workflow into a one-click delivery process.

FAQ

What is the difference between libx264 and libx265 in FFmpeg?

Short answer: libx264 is the software encoder for the H.264 codec, which offers universal compatibility. libx265 is the software encoder for the HEVC (H.265) codec, which offers up to 50% better compression efficiency but requires more processing power to encode and decode.

Does FFmpeg support hardware acceleration for faster compression?

Short answer: yes, FFmpeg supports various hardware acceleration APIs. You can use NVIDIA NVENC (-c:v h264_nvenc), Intel Quick Sync Video (-c:v h264_qsv), or Apple VideoToolbox (-c:v h264_videotoolbox) to drastically speed up video encoding.

Can FFmpeg convert a video to an audio-only file?

Short answer: yes, to extract the audio from a video and save it as an MP3 file, you can use the command ffmpeg -i input.mp4 -vn -c:a libmp3lame output.mp3. The -vn flag tells FFmpeg to ignore the video stream entirely.

Why is my FFmpeg output file larger than the input file?

Short answer: if your output file is larger, you likely used a lower CRF value or a higher target bitrate than the original file possessed. FFmpeg cannot magically add quality to a highly compressed source, but it will use more data to re-encode the artifacts if instructed to do so.

Why do agencies use Cutsio instead of just sending compressed MP4s?

Short answer: sending MP4s creates friction. Clients have to download the file, and they cannot leave frame-specific feedback easily. Cutsio provides instant browser playback, view tracking, and centralized, timecode-accurate comments, drastically speeding up the approval process.