hevc.js
A browser-based HEVC playback demo using dash.js with optional WASM transcoding to H.264.

About
hevc.js is an HEVC playback demo that shows how to stream HEVC DASH video in the browser with dash.js and optional WASM transcoding to H.264. It includes a live player, ABR quality switching, and a force-transcoding mode for testing devices that do not detect HEVC natively. The site also publishes the integration snippet needed to wire the plugin into a dash.js player from a CDN, so developers can try the setup without a build step.
What is hevc.js
hevc.js is an HEVC playback demo focused on browser video delivery with dash.js. It shows how HEVC DASH streams can be played either through native support or through a WebAssembly transcoding path that converts HEVC to H.264.
The project is presented as a zero-build setup: the page loads the player helper, decoder assets, and worker files from a CDN. That makes hevc.js useful as both a working demo and a reference for developers who want to understand the moving parts of HEVC playback in the browser.
In practice, hevc.js sits at the intersection of video, browser compatibility, and delivery tooling. It is not a media library in the broad sense; it is a specific HEVC playback example built around dash.js integration and WASM support.
Key features
hevc.js centers on HEVC playback, but it also exposes several controls that make testing easier.
- HEVC DASH streams in the browser via dash.js.
- WASM transcoding path that can convert HEVC to H.264.
- A force transcoding option that bypasses native HEVC detection.
- ABR playback controls with labeled quality targets such as 480p, 720p, 1080p, and 4K.
- Separate short sample loads for different qualities, including 30s, 10s, and 5s clips.
- A CDN-based integration example that uses
attachHevcSupport(...)and a dash.jsMediaPlayerinstance. - Project links to docs and GitHub, plus an MIT License note on the site.
Because it is an HEVC playback demo, the page is especially useful for checking how the browser behaves with native decoding versus transcoding. The displayed status fields like quality, speedX, cap, and reason suggest that the app surfaces runtime playback information during HEVC playback tests.
How to use it
Using hevc.js is straightforward if you want to try HEVC playback in the browser or reproduce the integration.
- Open the demo page in a modern browser.
- Choose one of the available sample streams or quality presets.
- Start playback and watch how the player handles HEVC playback with the selected stream.
- If you want to test compatibility, enable force transcoding to bypass native HEVC detection.
- For integration work, copy the CDN-based example shown on the page:
- import
attachHevcSupportfrom the@hevcjs/dashjs-pluginpackage on esm.sh - create a dash.js
MediaPlayer - call
attachHevcSupport(player, { wasmUrl, wasmBinaryUrl, workerUrl }) - initialize the player with a video element and MPD URL
- import
The demo also makes it clear which assets are needed for HEVC playback support: the decoder script, the WASM binary, and the transcode worker. That is helpful if you are assembling your own HEVC playback setup and want to see the minimum runtime pieces.
Who it is for
hevc.js is for developers who need to test or understand HEVC playback in the browser.
- Front-end engineers working with dash.js and adaptive streaming.
- Video platform builders who need a quick way to evaluate HEVC playback paths.
- Developers comparing native HEVC support against WASM transcoding.
- Teams that want a copyable CDN example instead of a full local build pipeline.
It is also useful for technically curious users who want to see how HEVC DASH playback behaves across different quality levels. If you are evaluating browser support, the demo gives you a compact way to compare native playback and transcoded playback in one place.
What to know before you use it
hevc.js is a demo and integration reference, not a full video platform.
- Playback depends on browser capabilities, codec support, and the availability of the referenced CDN assets.
- The WASM path adds complexity and may affect performance compared with native HEVC playback.
- The page does not claim broad device support, offline playback, account features, or media management tools.
- The sample clips are short, so the demo is best for testing HEVC playback behavior rather than long-form viewing.
- If you need authoritative codec compatibility for a production launch, verify against your own target browsers and devices instead of relying only on the demo.
- If you need a finalized integration, check the linked docs and GitHub repository before shipping, since the page itself is mainly a usage example.
For teams exploring HEVC playback, the safest way to use hevc.js is as a proof-of-concept and compatibility check. It shows how HEVC playback can work with dash.js, but real-world rollout still depends on your own browser matrix, stream packaging, and transcoding strategy.
FAQ
What is hevc.js and what problem does it solve?
hevc.js is a JavaScript library that enables HEVC/H.265 video playback in web browsers that do not natively support the codec. It uses WebAssembly to transcode HEVC streams to H.264 in real-time, ensuring compatibility across modern browsers.
Is hevc.js free to use?
Yes, hevc.js is open source and the site notes an MIT License. The demo and code references are presented without a paid plan on the page.
How do I integrate hevc.js with my dash.js player?
Integrate hevc.js with dash.js by importing the dashjs-plugin and calling attachHevcSupport with your player instance and WASM URLs. The plugin automatically handles HEVC detection and falls back to transcoding if needed.
What does hevc.js actually do?
It demonstrates HEVC DASH playback in the browser with dash.js. It can also use WASM transcoding to convert HEVC to H.264 when native decoding is not available.
Is hevc.js free for commercial use?
Yes, hevc.js is open source under the MIT license, allowing free use in both personal and commercial projects without restrictions.
Do I need a build step to try it?
No, the demo is set up as a zero-build example. The site shows CDN URLs for the plugin, WASM binary, and worker files.
What streaming protocols and codecs does hevc.js support?
hevc.js primarily supports HEVC video in DASH streams, transcoding to H.264 for playback. It works with common demuxers and handles audio alongside video. The demo shows 480p to 4K adaptive bitrate streams.
Who should use hevc.js?
It is best for developers who work with browser video, dash.js, and codec compatibility. It is especially useful for testing native HEVC support versus transcoding.
Can I force transcoding even if the browser supports HEVC natively?
Yes, hevc.js provides a force transcoding option that bypasses native detection, useful for testing or performance benchmarking. This can be toggled in the demo player.
Can I rely on it for production codec support checks?
Not by itself, no. It is a demo and reference implementation, so you should verify browser and device behavior with your own target environment before shipping.