Convert WebM to TS — Free Online Tool
Convert WebM files (VP9 video, Opus audio) to MPEG-2 Transport Stream (.ts) format using H.264 and AAC — the codec combination used by broadcast systems, HLS streaming pipelines, and hardware decoders that don't support VP9 or Opus natively. Runs entirely in your browser with no file uploads required.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your WebM 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
WebM stores video in the VP9 codec and audio in Opus, neither of which is natively supported by most broadcast infrastructure or HLS-based streaming pipelines. This conversion fully re-encodes both streams: the VP9 video is transcoded to H.264 (libx264) at CRF 23, and the Opus audio is transcoded to AAC at 128k bitrate. The output is wrapped in an MPEG-2 Transport Stream container — a byte-stream format designed for reliable transmission even with packet loss, which is why it's the foundation of HLS (.m3u8 playlists reference .ts segment files). Unlike a simple remux, this is a full transcode, so expect processing time proportional to your video's duration and resolution. WebM's transparency channel (alpha) is discarded since TS with H.264 does not support transparency, and chapter metadata from the WebM file is not carried over to TS.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary. In the browser-based tool, this runs as FFmpeg.wasm compiled to WebAssembly — the same command runs identically on your desktop if FFmpeg is installed locally. |
-i input.webm
|
Specifies the input WebM file. FFmpeg reads the Matroska-based container and demuxes the VP9 video stream and Opus (or Vorbis) audio stream for processing. |
-c:v libx264
|
Transcodes the VP9 video stream to H.264 using the libx264 encoder — the codec required for broad compatibility with broadcast infrastructure, HLS pipelines, and hardware decoders that consume .ts files. |
-c:a aac
|
Transcodes the Opus audio stream to AAC using FFmpeg's built-in AAC encoder, replacing Opus (which is unsupported in most TS consumers) with the audio codec standard for HLS and broadcast TS delivery. |
-crf 23
|
Sets the Constant Rate Factor for the H.264 encode to 23, the libx264 default. This is a quality-based variable bitrate mode where lower values produce higher quality — appropriate for general-purpose output without targeting a specific file size. |
-b:a 128k
|
Sets the AAC audio output bitrate to 128 kilobits per second, a standard bitrate that provides good stereo audio quality while keeping file size reasonable for streaming and broadcast use cases. |
output.ts
|
Specifies the output filename with the .ts extension, telling FFmpeg to mux the encoded H.264 video and AAC audio into an MPEG-2 Transport Stream container — the byte-stream format used for broadcast transmission and HLS segment files. |
Common Use Cases
- Prepare a WebM screen recording or exported video for ingestion into an HLS packaging pipeline that requires H.264/AAC .ts segments
- Convert a VP9 WebM file for playback on broadcast or professional video equipment that accepts TS feeds but has no VP9 decoder
- Transcode WebM content exported from a browser-based video editor into a format compatible with FFmpeg-based live streaming workflows using MPEG-TS output
- Repackage WebM video into .ts files for use as input to video-on-demand segmenters that produce HLS manifests for CDN delivery
- Convert a WebM file containing Opus audio into a TS file with AAC audio for compatibility with Apple devices and platforms that reject Opus in media pipelines
- Archive or deliver a VP9 WebM video to a client whose editing or playout system only accepts MPEG-2 Transport Stream inputs with H.264 video
Frequently Asked Questions
Yes — this is a generation loss transcode, not a lossless remux. Both the VP9 video and Opus audio are fully re-encoded into H.264 and AAC respectively, which are both lossy codecs. At the default settings (CRF 23 for video, 128k for audio), the output quality is visually good for most content, but repeated transcodes will accumulate quality loss. If your source WebM was already a lossy encode, you are compressing compressed data, so start with the highest quality source available.
While VP9 is technically listed as a supported video codec in the TS container spec, almost no broadcast infrastructure, HLS players, or hardware decoders that consume .ts files support VP9 in that container in practice. The TS format was designed around H.264 and H.265 for distribution. To produce a .ts file that is actually compatible with the systems that require it — HLS pipelines, broadcast encoders, set-top boxes — the video must be transcoded to H.264 (libx264).
Yes — MPEG-2 Transport Stream with H.264 video and AAC audio is the standard segment format used in HLS (HTTP Live Streaming). The .ts files produced here use exactly the codec combination (H.264 + AAC) required by HLS specifications and supported by Apple devices. You would still need to segment the file and generate a .m3u8 playlist using a tool like ffmpeg's hls muxer or a dedicated packager, but the codec profile is fully HLS-compatible.
The alpha transparency channel present in some VP9 WebM files is permanently discarded during this conversion. H.264 in a TS container does not support transparency, so any transparent regions in the original WebM will be composited against a black background in the output. If preserving transparency is important, TS is not the right target format — consider converting to a format that supports alpha, such as WebM (VP9) or a ProRes MOV.
The video quality is controlled by the -crf flag, which accepts values from 0 (lossless, largest file) to 51 (worst quality, smallest file), with 23 as the default balanced setting. Lower values produce higher quality and larger files — for example, -crf 18 is considered visually near-lossless for H.264. The audio bitrate is controlled by -b:a; replacing 128k with 192k or 256k increases audio fidelity at the cost of file size. For example: ffmpeg -i input.webm -c:v libx264 -c:a aac -crf 18 -b:a 192k output.ts
Yes — on Linux or macOS you can use a shell loop: for f in *.webm; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.webm}.ts"; done. On Windows Command Prompt, use: for %f in (*.webm) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.ts". This processes each WebM file in the current directory and outputs a corresponding .ts file with the same base filename. The browser-based tool processes one file at a time, so the FFmpeg command is the recommended approach for batch jobs.
Technical Notes
WebM to TS conversion involves a full codec transcode on both streams, making it more computationally intensive than a container remux. The libx264 encoder at CRF 23 targets a visually transparent quality level for most video content, but high-motion or high-resolution VP9 sources (4K, HDR) will take significantly longer to encode since x264 processes each frame from scratch. HDR metadata (HDR10, HLG) encoded in the WebM's VP9 stream is not automatically mapped to the H.264 output — the output will be SDR unless you explicitly add tone-mapping and color space flags to the command. Opus audio in WebM is replaced by AAC, which has slightly different frequency response characteristics; at 128k both are transparent for most listeners, but Opus generally outperforms AAC at very low bitrates. The TS container does not support chapter markers, so any chapter metadata in the WebM file is silently dropped. Multiple audio tracks from the WebM are supported in TS, but the default command only maps the default audio stream — add -map 0:a to include all audio tracks. Subtitle streams embedded in the WebM can be included in the TS output but require explicit mapping and a compatible subtitle codec (e.g., -map 0:s -c:s copy for DVB subtitles).