Convert HEVC to MP4 — Free Online Tool

Convert HEVC (H.265) video files to MP4 with H.264 encoding, making your high-efficiency video compatible with virtually every device, browser, and platform. This tool re-encodes the H.265 video stream to H.264 using libx264, trading the smaller file size of HEVC for near-universal playback support.

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

HEVC/H.265 and H.264 are both video codecs, not containers, so this conversion is a full re-encode — not a simple remux. FFmpeg decodes every frame of the H.265 stream and re-compresses it using the libx264 encoder at CRF 23, which is H.264's default visually lossless-ish quality target. Any audio present in the raw HEVC stream is encoded to AAC at 128k. The output is wrapped in an MP4 container with the -movflags +faststart flag, which relocates the MP4 index (the 'moov' atom) to the beginning of the file so it can begin playing before fully downloading — essential for web and streaming use.

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 container operations for this HEVC-to-MP4 conversion.
-i input.hevc Specifies the input file — a raw HEVC elementary stream. FFmpeg reads and decodes the H.265 bitstream from this file to prepare frames for re-encoding.
-c:v libx264 Sets the video encoder to libx264, which re-encodes the decoded H.265 frames as H.264. This is the core of the conversion — replacing the HEVC codec with the more universally compatible H.264 codec.
-c:a aac Encodes any audio stream found in the input as AAC, the default and most compatible audio codec for MP4 containers. Raw HEVC files typically have no audio, so this flag acts as a safe fallback.
-crf 23 Sets the Constant Rate Factor for the libx264 encoder to 23, H.264's default quality level. Lower values produce higher quality and larger files; this setting targets a strong balance of visual fidelity and file size for the H.264 output.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second, a standard quality level sufficient for stereo audio in most video content scenarios.
-movflags +faststart Moves the MP4 file's metadata index to the beginning of the file after encoding completes, enabling the output video to begin streaming or playing in a browser before the full file is downloaded.
output.mp4 Specifies the output file. The .mp4 extension tells FFmpeg to use the MPEG-4 Part 14 container, which wraps the newly encoded H.264 video and AAC audio streams together.

Common Use Cases

  • Preparing 4K HEVC footage from a modern Sony, Canon, or DJI camera for upload to platforms like YouTube or Vimeo that transcode more reliably from H.264 source files
  • Making HEVC video files playable on older smart TVs, Roku sticks, or Android devices that lack H.265 hardware decoding support
  • Converting HEVC recordings from iPhone or GoPro cameras so they can be edited in older versions of Premiere Pro, Final Cut Pro, or DaVinci Resolve without requiring proxy workflows
  • Embedding video in PowerPoint or Keynote presentations on Windows or macOS machines that cannot hardware-decode H.265
  • Sharing surveillance or security camera footage recorded in HEVC with clients or colleagues whose media players only support H.264 MP4
  • Reducing compatibility friction when sending video files through messaging apps or email clients that preview only widely supported H.264 MP4 content

Frequently Asked Questions

There will be a small generation loss because this is a transcode — the H.265 video is fully decoded and re-compressed as H.264. At CRF 23 (the default), the quality is very high and the difference is rarely visible to the naked eye for most content. However, the H.264 file will be larger than the original H.265 file at comparable visual quality, since H.265 is roughly 40-50% more efficient. If preserving maximum quality is critical, lower the CRF value toward 18.
H.265 is a more advanced compression standard than H.264, meaning it achieves the same visual quality at roughly half the bitrate. When you re-encode to H.264 at a typical quality setting, the encoder needs more bits to represent the same frames, resulting in a larger file. This is the fundamental tradeoff of this conversion: you gain compatibility at the cost of file size. The size increase can range from 20% to over 100% depending on the content and quality settings.
Raw .hevc files are typically a bare video elementary stream with no audio track, which is why the FFmpeg command defaults to encoding AAC audio — if no audio stream is found, FFmpeg will simply produce a video-only MP4 without errors. If your HEVC file is wrapped in a container that does include audio (such as an MKV or MOV mislabeled as .hevc), the audio will be transcoded to AAC at 128k stereo. No audio metadata like track language tags is preserved during this conversion.
Yes — MP4 supports H.265 as a video codec. To do this locally, you would modify the FFmpeg command by replacing '-c:v libx264' with '-c:v libx265' and adjusting the CRF value (H.265 uses a higher CRF scale, so CRF 28 for H.265 is roughly equivalent in quality to CRF 23 for H.264). This would produce a smaller file but with narrower device compatibility, which may defeat the purpose of the conversion for most use cases.
The -movflags +faststart flag moves the MP4 metadata index (called the 'moov' atom) from the end of the file to the beginning. Without it, a video player or browser must download the entire file before it can start playing. With faststart enabled, playback can begin almost immediately, which is critical for web embedding, streaming, and sharing links. If you only intend to play the file locally from disk, it has no effect on quality or compatibility — but it's a good habit to include it.
To adjust quality, change the CRF value: use a lower number like '-crf 18' for higher quality (and larger file size) or a higher number like '-crf 28' for smaller files with more compression. To batch convert all HEVC files in a folder on Linux or macOS, run: for f in *.hevc; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "${f%.hevc}.mp4"; done. On Windows Command Prompt, use a for loop: for %f in (*.hevc) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "%~nf.mp4".

Technical Notes

This conversion performs a full video transcode from the H.265 (libx265) codec to H.264 (libx264), which is computationally intensive compared to a simple remux — expect processing times several times longer than real-time on average hardware, especially for 4K HEVC content. The CRF 23 default targets a visually transparent quality level for H.264, but since CRF is a constant-rate-factor (not constant bitrate) setting, output file size will vary significantly based on scene complexity. HDR metadata present in HEVC streams (such as HDR10 or Dolby Vision) is not mapped to the H.264 output by this command — the video will be tone-mapped or clipped depending on FFmpeg's default behavior, potentially affecting highlight detail in HDR source material. If your HEVC source has HDR, consider adding explicit tone-mapping filters. The -x265-params log-level=error flag used during HEVC reading suppresses verbose libx265 diagnostic output without affecting encoding behavior. The output MP4 supports subtitle tracks and chapters as a container format, but since the raw HEVC input carries none of this metadata, the output will not contain them either.

Related Tools