Extract Audio from HEVC to FLAC — Free Online Tool

Extract lossless audio from HEVC/H.265 video files and save it as FLAC — a format that preserves every bit of the original audio data with no quality loss. Ideal for archiving soundtracks, dialogue, or music from high-efficiency video sources where audio fidelity matters as much as compression.

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) video files typically carry an audio stream encoded in a format like AAC, AC-3, DTS, or occasionally FLAC itself. This tool discards the H.265 video stream entirely using the -vn flag — no video decoding or re-encoding takes place. The audio stream is then decoded from its original codec and re-encoded into FLAC using the free lossless audio codec at compression level 5. Because FLAC is lossless, the resulting file is a bit-for-bit accurate representation of the audio waveform, regardless of what lossy codec (e.g., AAC or AC-3) was used in the source HEVC container — though it's worth noting that if the original audio was lossy, FLAC preserves that lossy data losslessly rather than restoring quality that was already discarded.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg command-line tool. In the browser version, this runs via FFmpeg.wasm compiled to WebAssembly, so no software installation is required and no files leave your device.
-i input.hevc Specifies the input HEVC video file. FFmpeg reads the container, identifies the embedded video stream (H.265/libx265) and audio stream (commonly AAC, AC-3, or similar), and makes both available for processing.
-vn Disables video output entirely — the H.265 video stream from the HEVC source is discarded without being decoded or re-encoded. This is what makes the conversion fast and keeps the output as a pure audio file.
-c:a flac Sets the audio codec to FLAC (Free Lossless Audio Codec). The source audio stream (whatever codec it uses in the HEVC file) is decoded and then re-encoded into lossless FLAC format for the output.
-compression_level 5 Sets the FLAC compression effort to level 5 on a 0–8 scale. This controls the tradeoff between encoding speed and output file size — level 5 is the default balance. Since FLAC is lossless, the decoded audio is identical at any compression level.
output.flac The output filename, with the .flac extension signaling FFmpeg to write a standard FLAC file containing only the losslessly encoded audio stream extracted from the source HEVC video.

Common Use Cases

  • Extracting a lossless archival copy of a film's soundtrack from an H.265-encoded Blu-ray remux for use in a personal music library
  • Pulling dialogue or ambient audio from an H.265 drone or camera recording for use in video editing without further generation loss
  • Archiving the audio from an H.265 HDR concert video as FLAC for high-fidelity playback on an audiophile DAC or media player
  • Separating the audio track from a large H.265 video file to analyze, edit, or transcribe it without needing to process the video
  • Extracting spoken-word audio from H.265 lecture or conference recordings to create searchable, compact audio archives
  • Preparing audio stems from H.265 encoded content for lossless audio mastering or post-production workflows

Frequently Asked Questions

FLAC itself is lossless, so whatever audio data exists in the HEVC file is preserved perfectly in the output. However, the key caveat is the source audio codec: if the HEVC file's audio was encoded in a lossy format like AAC or AC-3 (which is very common), those compression artifacts are already baked in and cannot be recovered. FLAC will preserve that lossy audio losslessly — meaning no additional degradation — but it cannot restore quality that was lost during the original encoding.
HEVC files almost always use lossy audio codecs like AAC or AC-3, which achieve very small file sizes by discarding audio data the codec deems inaudible. FLAC, being lossless, retains the complete decoded waveform and compresses it without any data loss, which is inherently less space-efficient than lossy compression. A 10-minute AAC audio stream at 256 kbps might be around 19 MB, while the equivalent FLAC could be 60–100 MB depending on the audio complexity and sample rate.
HEVC video is commonly packaged in containers like MP4, MKV, or TS, and the audio track is most often AAC (especially in streaming and camera-originated content), AC-3 or E-AC-3 (common in broadcast and Blu-ray sources), or DTS in high-definition disc rips. Less commonly, HEVC containers may carry TrueHD, FLAC, or PCM audio in lossless Blu-ray remuxes. This tool decodes whichever audio codec is present and re-encodes it to FLAC.
The -compression_level flag controls how aggressively FLAC compresses the audio, with values ranging from 0 (fastest encoding, largest file) to 8 (slowest encoding, smallest file). Critically, this is a pure speed-vs-size tradeoff — FLAC is lossless at every compression level, so audio quality is identical whether you use 0 or 8. The default of 5 is a well-balanced middle ground. To maximize file size reduction, change -compression_level 5 to -compression_level 8 in the command.
Yes. On Linux or macOS, you can loop over files in a directory with: for f in *.hevc; do ffmpeg -i "$f" -vn -c:a flac -compression_level 5 "${f%.hevc}.flac"; done. On Windows Command Prompt, use: for %f in (*.hevc) do ffmpeg -i "%f" -vn -c:a flac -compression_level 5 "%~nf.flac". This is especially useful for processing large collections of H.265 recordings where the browser-based tool's 1 GB file limit would be a constraint.
FFmpeg will attempt to copy metadata from the source container to the FLAC output automatically. FLAC natively supports Vorbis comment tags (title, artist, album, etc.), so if the HEVC container's audio stream or container-level metadata includes these fields, they should carry over. However, metadata coverage in HEVC/MP4 or HEVC/MKV containers is inconsistent — video-centric metadata like chapter markers, subtitle tracks, or HDR color metadata is not applicable to FLAC and will be dropped.

Technical Notes

The HEVC container is primarily a video-focused format, and its audio stream is almost always encoded with a codec other than FLAC — meaning this conversion necessarily involves audio transcoding rather than a stream copy. The quality ceiling of the output FLAC is therefore bounded by the lossy codec used in the source (typically AAC or AC-3), not by any limitation of FLAC itself. FLAC compression levels (0–8) affect only encode time and file size, not decoded audio quality — all levels are bit-for-bit identical on playback. The output FLAC file will be a single audio stream; HEVC files with multiple audio tracks (e.g., a director's commentary alongside the main track) will have only the default stream extracted by this command — to select a specific track, add -map 0:a:1 (or the appropriate index) to the command. FLAC supports up to 8 channels and sample rates up to 655,350 Hz, so high-channel surround audio (5.1, 7.1) from an AC-3 or DTS source will be preserved in full. Replay Gain and cue sheet features supported by FLAC are not populated by this conversion and would require a separate tagging step.

Related Tools