Convert TS to WebM — Free Online Tool

Convert MPEG-2 Transport Stream (.ts) files to WebM using VP9 video and Opus audio — the open, royalty-free format natively supported by all modern browsers. Ideal for repurposing broadcast or DVR recordings into lightweight, web-ready video without licensing restrictions.

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

TS files typically carry H.264 or H.265 video alongside AAC or AC3 audio, none of which are natively supported in WebM. This means the conversion is a full transcode: the video stream is re-encoded from scratch using the VP9 codec, and the audio is re-encoded using Opus. VP9 generally achieves better compression than H.264 at equivalent quality, so the resulting WebM file is often smaller than the source TS despite being a complete re-encode. The TS container's broadcast-oriented metadata (PAT/PMT tables, PCR timestamps, MPEG-2 transport overhead) is stripped entirely, and the streams are repackaged into the Matroska-based WebM container, which supports chapters and subtitle tracks in WebVTT format. Processing happens entirely in your browser via FFmpeg.wasm — no upload required.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool. In the browser version this runs via FFmpeg.wasm (WebAssembly), producing identical output to a native desktop installation of FFmpeg.
-i input.ts Specifies the input MPEG-2 Transport Stream file. FFmpeg automatically detects the TS container and demuxes its video and audio elementary streams (typically H.264/H.265 video and AAC/AC3 audio) for re-encoding.
-c:v libvpx-vp9 Re-encodes the video stream using the VP9 codec, the only video codec supported in WebM. Since TS files carry H.264 or H.265 video, a full re-encode is unavoidable — stream copying is not possible here.
-c:a libopus Re-encodes the audio stream using the Opus codec, the preferred audio codec for WebM. Opus replaces the original TS audio (commonly AAC or AC3) and delivers comparable or better perceptual quality at the same bitrate, with excellent results at 128k.
-crf 33 Sets the Constant Rate Factor for VP9 video quality. A value of 33 is a reasonable default for web delivery of broadcast content — lower values (e.g., 20) produce sharper video at larger file sizes, while higher values (e.g., 45) reduce file size at the cost of visible quality degradation.
-b:a 128k Sets the Opus audio bitrate to 128 kilobits per second. This is sufficient for stereo audio from broadcast sources; if the original TS has high-quality AC3 5.1 surround, consider raising this to 192k or 256k to better preserve fidelity.
-b:v 0 Required companion to -crf when using VP9. Setting the video bitrate target to zero tells VP9 to operate in pure constant-quality mode driven entirely by the CRF value, rather than capping to a fixed bitrate. Without this flag, -crf is ignored.
output.webm The output filename, with the .webm extension signaling FFmpeg to write a Matroska-based WebM container holding the re-encoded VP9 video and Opus audio streams.

Common Use Cases

  • Preparing DVR recordings or broadcast captures for embedding directly in a website's HTML5 video element without requiring a plugin or additional codec
  • Converting HLS-recorded .ts segment files into a single WebM file for archival or redistribution under an open, patent-free format
  • Reducing the file size of a broadcast TV recording before uploading to a web platform that prefers or requires VP9/WebM input
  • Repurposing IPTV or satellite recordings into a format compatible with Chromebook or Linux environments where H.264 playback support may be limited
  • Converting transport stream captures from screen recorders or capture cards into a shareable WebM for embedding in documentation, wikis, or Electron apps
  • Stripping broadcast-specific container overhead from a .ts file and repackaging the content with Opus audio, which offers better quality-per-bit than the original AAC or AC3 at lower bitrates

Frequently Asked Questions

Yes, this is a lossy transcode in both video and audio. The original TS video (typically H.264 or H.265) is fully re-encoded to VP9, and the audio (often AAC or AC3) is re-encoded to Opus. However, VP9 at CRF 33 with Opus at 128k is a very watchable quality level for most broadcast content — often visually indistinguishable from the source at normal viewing sizes. If you need to minimize quality loss, lower the CRF value (e.g., to 20 or 16) and raise the audio bitrate before converting.
TS files carry significant broadcast overhead — PAT/PMT tables, null padding packets, PCR timestamps, and sometimes multiple audio tracks — that inflates the file size beyond the raw audio/video data. WebM strips all of that and repackages only the streams you need. Combined with VP9's superior compression efficiency over H.264 (roughly 30–50% smaller at equivalent quality), the resulting WebM is commonly 40–60% smaller than the source TS, even after a full transcode.
Both TS and WebM support subtitles, but the formats differ. TS files often carry DVB subtitles or MPEG-4 timed text, which are not directly compatible with WebM's subtitle format (WebVTT). FFmpeg can convert compatible text-based subtitle tracks during this transcode, but bitmap-based DVB subtitles from broadcast streams typically cannot be embedded in WebM. You may need to pass additional flags like -c:s webvtt to explicitly handle subtitle remuxing, or check whether your specific subtitle track type is supported.
WebM does support multiple audio tracks, and FFmpeg will attempt to include all audio streams by default. However, you may need to add -map 0 to the command to explicitly map all streams from the input, as FFmpeg sometimes selects only the default audio track during a transcode. The command shown here processes the default streams; edit it locally if you need to preserve all language tracks from a multi-track broadcast recording.
Adjust the -crf value. For VP9, CRF ranges from 0 (lossless/best quality) to 63 (worst quality), with the default here set to 33. Lowering the value increases quality and file size — try CRF 24 for a noticeably sharper result, or CRF 40 for a smaller file when quality is less critical. Note that unlike H.264, VP9's CRF must always be paired with -b:v 0 to engage true constant-quality mode, which is already included in this command.
Yes. On Linux or macOS, you can run: for f in *.ts; do ffmpeg -i "$f" -c:v libvpx-vp9 -c:a libopus -crf 33 -b:a 128k -b:v 0 "${f%.ts}.webm"; done. On Windows Command Prompt: for %f in (*.ts) do ffmpeg -i "%f" -c:v libvpx-vp9 -c:a libopus -crf 33 -b:a 128k -b:v 0 "%~nf.webm". This is especially useful for converting a folder of DVR recordings or HLS .ts segments in one pass. The browser-based tool processes one file at a time, so the command line is the best route for batch jobs.

Technical Notes

VP9 encoding is significantly more CPU-intensive than H.264, so large TS files (especially HD or 1080i broadcast recordings) will take noticeably longer to convert than other format pairs. The -b:v 0 flag is not optional for VP9 in quality mode — omitting it disables CRF-based rate control and forces a fixed bitrate, degrading quality consistency. TS files from broadcast sources often contain interlaced video (1080i, 576i); VP9 and web players do not handle interlacing well, so for interlaced source material you should add a deinterlace filter (-vf yadif) to the command before converting. AC3 surround audio (5.1) common in broadcast TS files will be downmixed to stereo Opus at 128k by default — raise the audio bitrate and add -ac 6 if you want to preserve surround channels. Chapters are not carried in TS containers, so no chapter metadata will be present in the output WebM even though the format supports them. The Matroska-based WebM container preserves stream-level metadata such as language tags from the original TS, provided the streams are explicitly mapped.

Related Tools