Convert AVI to HEVC — Free Online Tool
Convert AVI files to raw HEVC/H.265 bitstream format using libx265, achieving significantly smaller file sizes compared to AVI's typical H.264 or MJPEG video at equivalent visual quality. HEVC's superior compression efficiency makes this conversion ideal for archiving or streaming legacy AVI footage at roughly half the bitrate.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your AVI file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
AVI is a container format that typically wraps video encoded with older codecs like MJPEG, DivX, or H.264 alongside MP3 or PCM audio. During this conversion, the video stream is fully re-encoded from whatever codec the AVI uses into H.265 (HEVC) via libx265 — there is no stream copy shortcut here because the output is a raw HEVC bitstream (.hevc), not a container. The audio stream is dropped entirely: raw HEVC files carry only a naked video bitstream with no container structure, so there is no mechanism to store audio tracks. The encoder uses CRF 28 by default, which targets a visually lossless-looking result at substantially lower bitrates than the AVI source, leveraging HEVC's more efficient inter-frame prediction and transform coding.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool, which is the underlying engine powering this browser-based conversion via its WebAssembly build (FFmpeg.wasm). |
-i input.avi
|
Specifies the input AVI file. FFmpeg will read the AVI container, detect the enclosed video codec (such as MJPEG, H.264, or DivX), and decode it for re-encoding into HEVC. |
-c:v libx265
|
Selects libx265 as the video encoder, which implements the H.265/HEVC compression standard. This forces a full re-encode of the AVI's video stream regardless of what codec it originally used. |
-crf 28
|
Sets the Constant Rate Factor to 28 for the libx265 encoder, controlling the quality-to-filesize tradeoff. CRF 28 is libx265's default and produces good visual quality at significantly lower bitrates than the typical AVI source; lower values like 18 increase quality and file size, higher values like 35 compress more aggressively. |
-x265-params log-level=error
|
Passes the log-level=error parameter directly to the libx265 encoder, suppressing its verbose per-frame encoding statistics and only surfacing genuine errors — keeping conversion output clean in both browser and terminal environments. |
output.hevc
|
Specifies the output as a raw HEVC elementary bitstream file. The .hevc extension tells FFmpeg to write a naked H.265 bitstream with no container wrapper, which means no audio, no metadata headers, and no container overhead — just the encoded video data. |
Common Use Cases
- Archiving a large collection of legacy AVI footage from early 2000s camcorders or DVD rips, dramatically reducing storage requirements while preserving visual quality through HEVC's superior compression.
- Preparing raw HEVC bitstream files for ingestion into specialized video processing pipelines or broadcasting systems that accept elementary stream inputs rather than container-wrapped media.
- Extracting and re-encoding only the video content from AVI files when audio is redundant or will be replaced entirely in a downstream editing or compositing workflow.
- Reducing bandwidth requirements for AVI-sourced video before uploading to servers or CDNs that handle their own muxing and audio encoding, allowing leaner video-only transfers.
- Testing and benchmarking libx265 encoding quality and performance against AVI source material without the overhead of container muxing, useful for codec researchers and video engineers.
- Converting AVI screen recordings or demo videos into compact HEVC for embedding into technical documentation systems that accept raw bitstream input.
Frequently Asked Questions
The .hevc output format is a raw elementary bitstream — it is not a container like MP4 or MKV, so it has no mechanism to store audio tracks, subtitles, or metadata alongside the video. The AVI's audio stream is intentionally discarded during this conversion. If you need to preserve audio, consider converting your AVI to a container format like MKV or MP4 that can carry both an H.265 video stream and an audio track.
The reduction depends heavily on what codec your AVI was using. AVI files encoded with MJPEG or older DivX/Xvid codecs can shrink by 60–80% when re-encoded to HEVC at CRF 28, because those codecs are far less efficient than H.265. AVI files that already contain H.264 video may see a more modest 30–50% reduction. The CRF 28 default for libx265 is intentionally conservative — lowering the CRF value (e.g., to 23 or 18) will improve quality but increase file size.
Raw .hevc bitstream files have limited playback support in consumer media players. VLC can typically open them, but Windows Media Player and most standard players expect video to be wrapped in a container like MP4 or MKV. If broad playback compatibility is your goal, you are better served converting your AVI to an MP4 or MKV output that uses H.265 video internally, rather than a raw HEVC bitstream.
Yes — transcoding from any lossy source (such as an AVI with MJPEG, DivX, or H.264 video) to HEVC is a lossy process, meaning some generation loss occurs. At CRF 28, libx265 produces visually high-quality results, but pixel-perfect lossless reproduction of the source is not achieved. If your AVI source was already highly compressed, lowering the CRF toward 18 will minimize additional quality degradation at the cost of a larger output file.
libx265 by default prints verbose encoding statistics to the terminal during conversion, which can clutter output in browser-based or automated environments. The -x265-params log-level=error flag suppresses all libx265 console output except actual errors, keeping the conversion process clean. You can safely remove this flag when running the command locally if you want to see detailed per-frame encoding statistics — it has no effect on the output video quality or file.
Adjust the -crf value in the command to control quality and file size. For libx265, CRF ranges from 0 (lossless) to 51 (worst quality), with 28 as the default. For example, running 'ffmpeg -i input.avi -c:v libx265 -crf 18 -x265-params log-level=error output.hevc' will produce noticeably better quality at a larger file size, while -crf 35 will compress more aggressively with visible quality reduction. Values between 22 and 28 are generally recommended for archival or high-quality use cases.
Technical Notes
The AVI container format predates modern codec efficiency by decades and frequently wraps video in MJPEG, DivX, Xvid, or early H.264 encodings, all of which are significantly less efficient than HEVC. Converting to a raw .hevc bitstream bypasses the AVI container entirely, but also strips all metadata including frame rate hints, aspect ratio information, and color space tags stored in the AVI headers — downstream tools consuming the .hevc file must infer or be told these parameters manually. libx265's CRF 28 default corresponds to a quality level slightly more compressed than libx264's CRF 23 default, reflecting that H.265 achieves equivalent perceptual quality at higher CRF values. AVI's lack of subtitle and chapter support means no metadata of those types is lost in the conversion. One important limitation: AVI files occasionally have audio/video sync issues due to the legacy interleaved format, and since audio is dropped entirely in this conversion, sync is a non-issue in the output — but if you later mux the HEVC output with separately extracted audio, original AVI sync problems may resurface.