How to Transcode Videos with Low CPU in FFmpeg

Transcoding video with FFmpeg can quickly max out your processor, leading to high system temperatures and unresponsive background tasks. This guide outlines the most effective FFmpeg command-line strategies to minimize CPU usage, including leveraging dedicated GPU hardware acceleration, selecting high-speed encoding presets, capping processor threads, and using stream copying whenever possible to bypass the encoding pipeline entirely.

1. Leverage Hardware Acceleration (GPU Offloading)

The single most effective way to lower CPU consumption is to shift the transcoding workload from your processor to dedicated hardware video encoders found on modern GPUs and CPUs.

  • NVIDIA (NVENC):

    ffmpeg -hwaccel cuda -i input.mp4 -c:v h264_nvenc -preset p4 -c:a copy output.mp4
  • Intel Quick Sync Video (QSV):

    ffmpeg -hwaccel qsv -i input.mp4 -c:v h264_qsv -c:a copy output.mp4
  • AMD (AMF):

    ffmpeg -i input.mp4 -c:v h264_amf -c:a copy output.mp4
  • Apple Silicon (VideoToolbox):

    ffmpeg -i input.mp4 -c:v h264_videotoolbox -c:a copy output.mp4

Using these encoders delegates the computation to dedicated hardware chips, keeping general-purpose CPU usage below 5–15%.


2. Use Fast Software Presets

If hardware acceleration is unavailable and you must rely on software encoders like libx264 or libx265, change the encoding preset to an option designed for speed rather than compression efficiency.

ffmpeg -i input.mp4 -c:v libx264 -preset ultrafast -crf 23 -c:a copy output.mp4
  • Presets: ultrafast, superfast, or veryfast drastically simplify motion-estimation and spatial algorithms, resulting in significantly lower CPU workload at the expense of a slightly larger file size.
  • CRF: Keep -crf 23 or higher to ensure the encoder does not spend cycles maintaining unnecessary bitrates.

3. Restrict CPU Thread Allocation

By default, FFmpeg detects all available CPU cores and spawns threads across all of them to finish the task as fast as possible. You can manually restrict the number of cores FFmpeg can utilize with the -threads flag.

ffmpeg -i input.mp4 -c:v libx264 -threads 2 -c:a copy output.mp4

Restricting execution to 2 or 4 threads prevents FFmpeg from reaching 100% total system utilization, ensuring sufficient CPU overhead remains for other applications.


4. Use Stream Copy (Remuxing)

If your goal is to trim footage, change the file container (e.g., MKV to MP4), or replace audio without modifying video quality, omit re-encoding entirely by using the stream copy flag:

ffmpeg -i input.mkv -c copy output.mp4

Because this process only reads and rewrites the underlying bitstream without decoding and re-encoding video frames, CPU usage remains near zero and operations complete in seconds.


5. Downscale Resolution and Reduce Frame Rate

Processing fewer pixels per frame directly translates into fewer calculations for the processor. If high fidelity is not required, downscale the video:

ffmpeg -i input.mp4 -vf "scale=-2:720,fps=30" -c:v libx264 -preset veryfast -c:a copy output.mp4
  • -vf "scale=-2:720" limits the vertical height to 720p while preserving the aspect ratio.
  • fps=30 drops superfluous frames from 60fps sources, cutting processing work roughly in half.