Extract Audio from HEVC to WEBA — Free Online Tool
Extract audio from HEVC/H.265 video files and save it as a WEBA file encoded with the Opus codec — ideal for web playback and streaming. This tool strips the video stream entirely and re-encodes the audio to Opus at 128k bitrate, producing a compact, browser-ready audio file.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your HEVC 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
HEVC (.hevc) files carry a video stream encoded with the H.265 codec, and may contain one or more audio tracks in formats like AAC or AC-3. Since WEBA is an audio-only WebM container that does not support video, the video stream is completely discarded using the -vn flag — no video decoding or re-encoding happens. The audio stream cannot be simply remuxed, because WEBA requires either Opus or Vorbis audio; the source audio (typically AAC or AC-3 in HEVC files) is incompatible with the WebM container. FFmpeg therefore re-encodes the audio from scratch using the libopus encoder at a target bitrate of 128k. Opus is a modern, low-latency codec that delivers excellent quality at this bitrate and is natively supported by all major browsers, making the resulting .weba file immediately playable on the web without any plugins.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg program, the open-source multimedia processing engine that handles all decoding, stream selection, re-encoding, and container writing for this conversion. |
-i input.hevc
|
Specifies the input file — an HEVC/H.265 encoded video file. FFmpeg reads both the video stream (encoded with libx265) and any audio streams present in this file. |
-vn
|
Disables video output entirely, instructing FFmpeg to ignore the H.265 video stream. This is required because WEBA is an audio-only container and cannot hold video data. |
-c:a libopus
|
Sets the audio encoder to libopus, the reference Opus codec implementation. Since HEVC files typically carry AAC or AC-3 audio that is incompatible with the WebM container, the audio must be re-encoded, and Opus is the preferred modern codec for WEBA output. |
-b:a 128k
|
Sets the Opus encoder's target audio bitrate to 128 kilobits per second. At this bitrate, Opus delivers near-transparent quality for stereo music and clear, efficient encoding for speech, while keeping the output file size small for web delivery. |
-vn
|
A second -vn flag appears before the output filename as a safeguard to ensure no video stream is written to the WEBA container, reinforcing the audio-only extraction regardless of stream mapping decisions. |
output.weba
|
The output filename with the .weba extension. FFmpeg uses this extension to identify the target format as an audio-only WebM container, muxing the Opus-encoded audio stream into the WEBA format suitable for direct browser playback. |
Common Use Cases
- Pull the audio commentary or narration from an H.265-encoded screen recording to publish as a standalone podcast episode or voiceover file
- Extract the soundtrack from a high-efficiency HEVC video downloaded from a streaming archive and serve it as a lightweight audio file on a web page
- Convert the audio from a 4K HEVC drone footage clip into a web-compatible WEBA file to use as background music on a website without serving the full video
- Strip audio from an H.265 encoded video conference recording to create a browser-playable audio archive that loads quickly on slow connections
- Extract dialogue or sound effects from HEVC source footage for use in a WebAudio API project or browser-based game asset pipeline
- Convert HEVC video audio to Opus-encoded WEBA for embedding in a Progressive Web App (PWA) that requires low-latency, streaming-friendly audio assets
Frequently Asked Questions
Yes, some quality loss is expected. The audio in an HEVC file is typically encoded in a lossy format like AAC or AC-3, and re-encoding it to Opus introduces a second generation of lossy compression. However, Opus at 128k is widely regarded as transparent for most content types — meaning the degradation is rarely perceptible in normal listening. If your source audio is high-bitrate AAC (256k+), encoding to Opus at 128k will produce a slight but usually acceptable quality reduction.
WEBA is an audio-only variant of the WebM container format — by definition it cannot store video streams. The -vn flag in the FFmpeg command explicitly discards the video stream from the HEVC input. If you need to keep the video while changing the container to a web-friendly format, you would need to convert to WebM instead of WEBA.
By default, FFmpeg selects the first audio stream it finds in the input file. HEVC files from broadcast or Blu-ray sources sometimes carry multiple tracks (e.g., stereo and 5.1 surround). If you need a specific track, you can modify the command with a stream specifier such as -map 0:a:1 to select the second audio track before the output filename. This tool extracts only one audio track.
The -b:a 128k flag controls the Opus encoder's target bitrate. You can replace 128k with values like 64k for a smaller file with lower quality, 192k for higher fidelity, or 320k for near-transparent audio. For speech-only content, 64k Opus is often sufficient. For music, 192k is a comfortable high-quality setting. Simply edit the value in the command before running it locally.
Opus inside WebM/WEBA is supported natively in Chrome, Firefox, Edge, and Opera. Safari added Opus/WebM support in Safari 16 (2022), so modern Safari versions on macOS and iOS handle it correctly. If you need broader legacy compatibility, consider extracting to MP3 or AAC instead. For web apps targeting modern browsers, WEBA with Opus is an excellent, efficient choice.
Yes. On Linux or macOS, you can use a shell loop: for f in *.hevc; do ffmpeg -i "$f" -vn -c:a libopus -b:a 128k -vn "${f%.hevc}.weba"; done. On Windows PowerShell, use: Get-ChildItem *.hevc | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a libopus -b:a 128k -vn ($_.BaseName + '.weba') }. The browser-based tool on this page processes one file at a time, but files over 1GB are best handled locally using the command directly.
Technical Notes
HEVC files using the .hevc extension are typically raw video bitstreams or basic containers and often carry audio in AAC, E-AC-3, or AC-3 formats. None of these audio codecs are valid inside a WebM or WEBA container, which is restricted to Opus and Vorbis by the WebM specification — so transcoding the audio stream is unavoidable, unlike some container-to-container conversions where streams can be copied directly. The libopus encoder used here is the reference implementation and produces high-quality output even at moderate bitrates; at 128k it comfortably handles stereo music and speech. One limitation to be aware of: Opus is inherently a lossy codec, so lossless audio extraction from HEVC is not possible into the WEBA format. Metadata such as title or artist tags embedded in the HEVC file's audio stream may not transfer cleanly to the WEBA output, as WebM has limited metadata support compared to containers like MP4 or MKV. Additionally, multi-channel (5.1 or 7.1) audio from HEVC sources will be encoded by libopus, which supports up to 8 channels, but playback of surround Opus in browsers is not universally reliable — downmixing to stereo with -ac 2 is recommended for web-targeted output.