Compress HEVC Online — Free File Size Reducer

Compress HEVC/H.265 video by re-encoding it with libx265 at a target quality level you control via CRF. Ideal for reducing file size on 4K, HDR, or high-bitrate H.265 footage while staying within the same codec ecosystem.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

This tool re-encodes your existing HEVC/H.265 video stream using the libx265 encoder at a Constant Rate Factor (CRF) of 28 by default. Unlike a simple remux, this is a full transcode: every frame is decoded and re-encoded, allowing the encoder to apply more aggressive compression to your original H.265 source. A higher CRF value produces smaller files with lower quality, while a lower CRF value preserves more detail at the cost of larger file sizes. CRF 0 is lossless, CRF 51 is the lowest possible quality, and CRF 28 is the libx265 default — roughly equivalent to a medium-quality encode. Because the input and output are both raw HEVC bitstreams (.hevc), there is no container overhead involved; this operation is purely about squeezing the video data itself.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles all decoding, encoding, and stream manipulation. In this browser tool, it runs as FFmpeg.wasm compiled to WebAssembly.
-i input.hevc Specifies the input file — a raw HEVC/H.265 bitstream. FFmpeg reads this as a video-only stream with no container wrapper, decoding the H.265 frames for re-encoding.
-c:v libx265 Selects libx265 as the video encoder, which is the open-source software implementation of the H.265/HEVC standard. This produces an output that remains in the same codec family as the input.
-crf 28 Sets the Constant Rate Factor to 28, which is the libx265 default. This controls the quality-to-file-size tradeoff: lower values (e.g., 18) yield larger, higher-quality files, while higher values (e.g., 35) yield smaller files with more compression artifacts. The valid range is 0 (lossless) to 51.
-x265-params log-level=error Passes a parameter directly to the libx265 encoder to suppress its verbose per-frame logging output, showing only errors. This does not affect the encoded video in any way — it only reduces console noise during the encode.
output.hevc Defines the output file as a raw HEVC bitstream. The .hevc extension tells FFmpeg to write a bare H.265 stream with no container, consistent with the input format.

Common Use Cases

  • Reduce the file size of high-bitrate 4K H.265 footage captured by a camera like the Sony FX3 or DJI drone before archiving to a NAS or cloud storage.
  • Re-compress HEVC screen recordings or gameplay captures that were initially encoded at a very low CRF (near-lossless) into a smaller file suitable for sharing or uploading.
  • Compress HDR HEVC content for distribution while keeping it within the H.265 codec family, avoiding any HDR metadata compatibility issues that can arise when switching codecs.
  • Reduce the size of raw HEVC streams extracted from broadcast or satellite recordings before further processing or editing.
  • Create a smaller, lower-quality proxy version of an H.265 file at a high CRF (e.g., 35–40) for fast offline review or client approval, keeping the original untouched.
  • Batch-compress a library of HEVC files encoded at CRF 18 down to CRF 28 to reclaim significant storage space with minimal perceptible quality loss.

Frequently Asked Questions

Yes. Re-encoding any lossy-compressed video introduces generation loss — artifacts from the first encode can be amplified by the second. The severity depends on how aggressively you compress: going from CRF 18 to CRF 28 on a clean original will cause minimal visible degradation, but repeatedly re-encoding or using very high CRF values (35+) on already-compressed footage will noticeably degrade quality, especially in motion and fine texture areas.
The libx265 default of CRF 28 is a reasonable starting point, but many users prefer CRF 23–25 for higher-quality output that is still meaningfully smaller than a near-lossless original. For archiving footage you care about, stay in the 18–23 range. For casual sharing where file size matters more, CRF 28–35 is acceptable. Note that CRF values are not directly comparable between libx264 and libx265 — CRF 28 in H.265 is visually roughly equivalent to CRF 23 in H.264.
The libx265 encoder can carry HDR10 static metadata through a re-encode, but the tool does not explicitly pass HDR metadata flags such as --master-display or --max-cll. If your source contains HDR10 metadata embedded in SEI NAL units, some of it may not survive the re-encode without additional parameters. For critical HDR workflows, you should run the conversion locally using FFmpeg with explicit HDR metadata flags rather than relying on a default CRF re-encode.
The .hevc extension represents a raw HEVC bitstream — the video data with no container wrapper. This keeps the operation focused purely on video compression without introducing container-related variables. If you need the result in a playable format for media players or devices, you can remux the .hevc file into an MP4 or MKV container in a separate step using FFmpeg with -c:v copy, which adds no additional quality loss.
Change the number after -crf in the command. For example, to use CRF 23 instead of the default 28, run: ffmpeg -i input.hevc -c:v libx265 -crf 23 -x265-params log-level=error output.hevc. Lower values (e.g., 18) produce larger, higher-quality files; higher values (e.g., 35) produce smaller files with more compression artifacts. The valid range for libx265 is 0 (lossless) to 51 (lowest quality).
Yes. On Linux or macOS, you can loop over all .hevc files in a directory with: for f in *.hevc; do ffmpeg -i "$f" -c:v libx265 -crf 28 -x265-params log-level=error "compressed_$f"; done. On Windows Command Prompt, use: for %f in (*.hevc) do ffmpeg -i "%f" -c:v libx265 -crf 28 -x265-params log-level=error "compressed_%f". This is especially useful for large files over 1GB that exceed the browser tool's limit.

Technical Notes

Because both the input and output use the raw HEVC bitstream format (.hevc) with libx265 as the codec, this operation is entirely codec-internal — there is no container muxing, no audio stream, no subtitle track, and no chapter data to consider. The libx265 encoder supports both lossy and lossless compression: CRF 0 triggers lossless mode, while all other CRF values are lossy. The -x265-params log-level=error flag suppresses libx265's verbose per-frame statistics output, which is primarily a usability improvement with no effect on the encoded output. One important limitation: raw .hevc bitstreams lack a container, meaning most consumer media players cannot open them directly — they are best used as an intermediate format in a larger encoding pipeline. Additionally, this tool does not pass through audio; if your source has an audio track muxed into a container that was re-saved as a raw bitstream, that audio will not be present in the output. For HDR10+ or Dolby Vision HEVC content, the dynamic HDR metadata layers require explicit handling beyond a basic CRF re-encode to survive intact.

Related Tools