Extract Audio from TS to WEBA — Free Online Tool

Extract audio from a TS broadcast stream and convert it to WEBA format, encoding the audio track using the Opus codec for efficient, web-optimized playback. Ideal for pulling audio from recorded TV broadcasts or HLS stream captures where the original audio may be AAC or AC3 that needs to be re-encoded for browser compatibility.

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

MPEG-2 Transport Streams (.ts) are broadcast containers that commonly carry AAC, AC3, or MP3 audio alongside H.264 or H.265 video. Since WEBA is an audio-only WebM container and TS audio codecs are not natively compatible with the WebM format, this conversion is not a simple remux — the audio must be fully re-encoded from the source codec (e.g., AAC or AC3) into Opus using the libopus encoder. The video stream is discarded entirely via the -vn flag. Opus is a modern, patent-free codec optimized for both speech and music, and at 128k bitrate it typically delivers transparent or near-transparent audio quality for most broadcast content. The resulting .weba file is lightweight, streamable, and natively playable in all modern browsers without plugins.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool. In this browser-based tool, it runs via FFmpeg.wasm compiled to WebAssembly — the same command works identically in a local desktop terminal installation of FFmpeg.
-i input.ts Specifies the input MPEG-2 Transport Stream file. FFmpeg will parse the TS container to identify all program streams, including video PIDs, audio PIDs (which may be AAC, AC3, or MP3), and subtitle streams.
-vn Disables video output entirely, ensuring no video stream from the TS file is included in the output. Since WEBA is an audio-only container, this flag is essential — without it FFmpeg would attempt to include video and fail because WebM requires a compatible video codec.
-c:a libopus Sets the audio encoder to libopus, which re-encodes whatever audio codec is in the source TS file (typically AAC or AC3) into the Opus format required by the WEBA container. This transcoding step is mandatory since AAC and AC3 are not valid codecs in a WebM/WEBA file.
-b:a 128k Sets the target audio bitrate to 128 kilobits per second for the Opus encoder. At this bitrate, Opus delivers near-transparent quality for most broadcast audio content, including mixed speech and music typical of TV recordings.
-vn A second instance of the video-disable flag, appearing again before the output filename. While redundant given the earlier -vn flag, it is harmless — FFmpeg processes it correctly and the output remains audio-only.
output.weba Specifies the output filename with the .weba extension, which FFmpeg uses to automatically select the WebM container format configured for audio-only output. The resulting file will contain a single Opus-encoded audio stream compatible with all modern web browsers.

Common Use Cases

  • Extract the audio commentary track from a recorded DVB-T or DVB-S broadcast .ts file for archiving or editing
  • Pull the audio from a captured HLS live stream (.ts segments reassembled) to create a podcast or audio clip for web publishing
  • Convert AC3 or AAC surround audio from a broadcast recording into Opus for embedding directly in a web page using the HTML5 audio element
  • Strip and re-encode the audio from a recorded sports broadcast for use as a web-compatible highlight reel soundtrack
  • Extract interview or dialogue audio from a transport stream capture to produce a clean, compressed audio file for a browser-based media player
  • Convert broadcast news segment audio from .ts recordings into WEBA for low-bandwidth streaming on a news aggregation website

Frequently Asked Questions

Yes, this is a lossy transcoding process. The source audio in a .ts file is typically already lossy (AAC at 128–256k or AC3 at 192–640k), and re-encoding to Opus at 128k introduces a second generation of lossy compression. However, Opus is one of the most efficient modern codecs, and at 128k it preserves most perceptible audio quality for speech and music. If the source is AAC 128k, you may notice subtle degradation; if the source is AC3 at 384k or higher, the output at 128k Opus will still sound excellent for most listeners.
WEBA with Opus does support multi-channel audio, so FFmpeg will attempt to preserve the channel layout during re-encoding. However, the output will be a single audio track — WEBA does not support multiple discrete audio tracks the way TS does. If your broadcast stream has multiple audio tracks (e.g., different language streams), only the default track will be extracted unless you specify a different stream with the -map flag in a custom command.
The WebM/WEBA container standard only permits Opus or Vorbis audio codecs. Since TS files almost always carry AAC, AC3, or MP3 audio, these codecs are fundamentally incompatible with the WEBA container and cannot be stream-copied. Full re-encoding to libopus is mandatory, not optional — there is no lossless path from TS to WEBA.
Replace the -b:a 128k value with a higher bitrate such as -b:a 192k or -b:a 256k. For example: ffmpeg -i input.ts -vn -c:a libopus -b:a 192k -vn output.weba. Opus is highly efficient and 192k is considered transparent (indistinguishable from lossless) for virtually all content. Going above 256k provides diminishing returns. You can also lower the bitrate to 64k or 96k for voice-only content where bandwidth is a priority.
Yes, but you'll need to modify the FFmpeg command manually. Use ffmpeg -i input.ts to list all streams, then add a -map 0:a:1 flag (replacing 1 with the index of your desired audio track) to select a specific audio stream. For example: ffmpeg -i input.ts -map 0:a:1 -vn -c:a libopus -b:a 128k output.weba. This is especially relevant for broadcast .ts files from multilingual channels.
WEBA files with Opus audio are natively supported in Chrome, Firefox, and Edge without any plugins. Safari added Opus support in version 16 (2022), so modern Safari users can also play WEBA files. The format is not supported by most native desktop media players out of the box, but VLC handles it without issues. For web deployment, WEBA is an excellent choice due to its small file size and royalty-free codec.

Technical Notes

MPEG-2 Transport Streams are designed for broadcast reliability, often carrying multiple audio tracks (e.g., stereo AAC plus AC3 surround, or multiple language streams) alongside video and subtitle PIDs. When converting to WEBA, all of this structure is discarded — WEBA is a minimal audio-only container based on the WebM/Matroska format, supporting only a single audio stream encoded as Opus or Vorbis. The libopus encoder used here implements the IETF Opus standard (RFC 6716), which is a hybrid codec combining SILK (optimized for speech) and CELT (optimized for music) layers. It adapts well to broadcast content that mixes dialogue and music. One important limitation: metadata embedded in the TS container (such as program names, channel IDs, or broadcast timestamps in the PMT/PAT tables) is not preserved in the WEBA output, as WebM has no equivalent metadata fields for broadcast-specific data. Standard tags like title or artist can be added post-conversion with ffmpeg -metadata. The -vn flag appears twice in this command (once before and once after the codec flags), which is functionally harmless — FFmpeg applies the flag correctly either way, and the duplicate has no negative effect on the output.

Related Tools