Convert MP4 to HEVC — Free Online Tool

Convert MP4 video files to raw HEVC/H.265 bitstream format using libx265, achieving roughly half the file size of H.264-encoded MP4 at equivalent visual quality. This tool is ideal for archiving or storage-optimized workflows where you need maximum compression efficiency from an H.265 encode.

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 conversion re-encodes the video stream from its original MP4 codec (typically H.264/libx264) into a raw H.265 bitstream using libx265, then writes it to a bare .hevc container. Unlike remuxing, this is a full transcode — every frame is decoded and re-encoded using H.265's more efficient compression algorithms. The output is a raw elementary bitstream: there is no container wrapper, meaning no audio tracks, subtitles, chapters, or metadata from the original MP4 are carried over. The default CRF of 28 is calibrated for libx265 and produces visual quality roughly equivalent to CRF 23 in H.264, while typically reducing file size by 30–50%.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that powers this conversion. In the browser, this runs as a WebAssembly build (FFmpeg.wasm); on your desktop, this calls your locally installed FFmpeg executable.
-i input.mp4 Specifies the input file as an MP4 container. FFmpeg will demux all streams it finds — video, audio, subtitles — but for this conversion only the video stream will be processed into the output.
-c:v libx265 Instructs FFmpeg to encode the video stream using libx265, the open-source H.265/HEVC encoder. This replaces whatever codec the source MP4 used (typically H.264) with a full H.265 re-encode.
-crf 28 Sets the Constant Rate Factor for libx265 to 28, which is the default quality target. This value is tuned specifically for H.265 — it delivers roughly equivalent visual quality to CRF 23 in H.264 while producing a significantly smaller file.
-x265-params log-level=error Passes a parameter directly to the libx265 encoder to suppress its per-frame verbose logging output. Without this flag, libx265 prints detailed encoding statistics for every frame, which is noisy and unnecessary for standard conversion use.
output.hevc Defines the output filename with a .hevc extension, signaling FFmpeg to write a raw H.265 elementary bitstream. This is a containerless format — no audio, chapters, or metadata from the source MP4 will be present in this file.

Common Use Cases

  • Archiving a large MP4 video library to free up storage, using H.265's superior compression to cut file sizes nearly in half while preserving comparable visual quality
  • Preparing source video for a pipeline or hardware device that ingests raw HEVC elementary streams, such as certain broadcast encoders or specialized media servers
  • Stripping audio, subtitles, and metadata from an MP4 to produce a clean, video-only HEVC bitstream for embedding into a custom container or multiplexer
  • Testing libx265 encode output quality and CRF settings before committing to a full production encode, using this tool to quickly preview results in the browser
  • Reducing the size of 4K or high-resolution MP4 footage for long-term cold storage where H.265 density is more important than broad playback compatibility

Frequently Asked Questions

The raw HEVC (.hevc) format is a video-only elementary bitstream — it has no container structure capable of holding audio tracks, subtitles, or other streams. All audio from the original MP4 is discarded during this conversion. If you need a compressed H.265 video that retains audio, you should convert to an MP4 or MKV container using the H.265 codec instead of a bare .hevc file.
Yes — this conversion performs a full re-encode, not a lossless copy, so there is generational quality loss if your MP4 source is already compressed (e.g., using H.264). The default CRF 28 in libx265 targets a quality level visually comparable to CRF 23 in H.264. To minimize quality loss from the source, use a lower CRF value (e.g., CRF 18–20) at the cost of a larger output file.
All of them are lost. A raw .hevc file is a bare video bitstream with no container layer, so it cannot store subtitles, chapter markers, title tags, language metadata, or any other non-video data. If preserving this information is important, use an MP4 or MKV output container with H.265 encoding rather than a raw HEVC bitstream.
Adjust the -crf value in the command. For libx265, CRF ranges from 0 (lossless) to 51 (lowest quality), with 28 as the default. Lower values produce higher quality and larger files — CRF 18 is considered near-visually-lossless for most content. For example, replace '-crf 28' with '-crf 18' for higher quality, or '-crf 35' for a smaller file with more compression.
Yes, when running FFmpeg locally on your desktop you can use a shell loop. On Linux or macOS: 'for f in *.mp4; do ffmpeg -i "$f" -c:v libx265 -crf 28 -x265-params log-level=error "${f%.mp4}.hevc"; done'. On Windows Command Prompt: 'for %f in (*.mp4) do ffmpeg -i "%f" -c:v libx265 -crf 28 -x265-params log-level=error "%~nf.hevc"'. The browser tool processes one file at a time.
Raw .hevc elementary bitstreams have limited software support compared to H.265 inside an MP4 or MKV container. VLC and MPV can typically play them, but most web browsers, mobile devices, and consumer media players expect H.265 wrapped in a standard container. If broad playback compatibility is your goal, re-mux the .hevc stream into an MP4 or MKV container after encoding.

Technical Notes

The output of this conversion is a raw H.265 elementary bitstream (HEVC Annex B format), which is fundamentally different from an MP4 file containing an H.265 track. There is no container envelope, no muxed audio, and no metadata layer. The libx265 encoder used here defaults to CRF 28 — note that CRF values are not cross-codec comparable: libx265's CRF 28 targets similar perceptual quality to libx264's CRF 23, but the H.265 output will typically be 30–50% smaller. The -x265-params log-level=error flag suppresses libx265's verbose per-frame encoding statistics, which would otherwise flood the console without adding useful information for standard use. HDR metadata (such as HDR10 tone mapping or color primaries) present in the source MP4 may or may not be preserved depending on how it was signaled in the original stream — libx265 can pass through HDR10 SEI metadata but requires explicit flags like --hdr10 and --master-display if you need guaranteed HDR compliance. Because this is a full re-encode rather than a remux, encode time will be significantly longer than a stream copy operation, especially for high-resolution or high-frame-rate source files.

Related Tools