Convert TS to AVI — Free Online Tool

Convert MPEG-2 Transport Stream (.ts) files to AVI format using H.264 video and MP3 audio — bridging broadcast-grade source material to one of the most universally supported legacy container formats. This tool re-encodes your TS file entirely in-browser using FFmpeg.wasm, with no server uploads required.

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 Stream files are designed for broadcast and streaming delivery, and may carry video encoded in H.264, H.265, or even MPEG-2, along with AAC or AC3 audio — plus optional subtitle tracks and multiple audio streams. Converting to AVI requires a full transcode: the video is re-encoded to H.264 (libx264) using the CRF quality model, and the audio is transcoded to MP3 (libmp3lame), since AVI does not natively support AAC or AC3 in a standardized way. AVI also does not support subtitles or chapters, so those tracks are dropped during conversion. The result is a self-contained AVI file with interleaved audio and video that plays on virtually any legacy or modern media player.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles all demuxing, decoding, re-encoding, and muxing for this TS-to-AVI conversion entirely within your browser via WebAssembly.
-i input.ts Specifies the input MPEG-2 Transport Stream file. FFmpeg will automatically detect and demux all contained streams — video, audio, subtitles, and any ancillary broadcast data — from the TS container.
-c:v libx264 Re-encodes the video stream using the H.264 codec via libx264. This is necessary because the source TS may use MPEG-2, H.265, or VP9 video, none of which AVI supports in a practical or standardized way.
-c:a libmp3lame Transcodes the audio to MP3 using the LAME encoder, replacing the AAC or AC3 audio typically found in broadcast TS files. MP3 is the most universally compatible audio codec for AVI and ensures playback on virtually all players that support the format.
-crf 23 Sets the Constant Rate Factor for H.264 video encoding to 23, which is the libx264 default and represents a visually high-quality output. Lower values (e.g., 18) increase quality and file size; higher values (e.g., 28) reduce both. This is the primary quality control for the video re-encode from your TS source.
-b:a 128k Sets the MP3 audio bitrate to 128 kilobits per second. This is a reasonable default for speech and general audio, though broadcast content with rich stereo sound or downmixed AC3 surround audio may benefit from a higher setting like 192k or 256k.
output.avi Defines the output filename and tells FFmpeg to mux the re-encoded H.264 video and MP3 audio into an AVI container using the RIFF/OpenDML structure.

Common Use Cases

  • Making recorded broadcast TV captures or DVR recordings compatible with older video editing software that only accepts AVI input
  • Preparing TS footage from set-top boxes or capture cards for playback on legacy Windows systems or devices that do not support modern containers like MP4 or MKV
  • Stripping out subtitle and secondary audio tracks from a multi-track broadcast TS file while re-packaging the primary content into a simpler, widely-supported format
  • Converting live-stream recordings or HLS segment files reassembled into a .ts file into a format compatible with older media players like Windows Media Player or early versions of VLC
  • Archiving digitized analog broadcast captures from TS format into AVI for compatibility with long-term archival workflows tied to legacy cataloguing systems
  • Preparing broadcast-sourced video clips for import into older versions of video editing tools such as Adobe Premiere Pro CS or Vegas Video that handle AVI natively

Frequently Asked Questions

Yes, this conversion involves a full transcode of both video and audio, so some quality loss is inherent. The video is re-encoded from whatever codec was used in the TS file (often H.264 or MPEG-2) into H.264 at CRF 23, which is a visually high-quality setting but not lossless. The audio is transcoded from AAC or AC3 (common in broadcast TS files) to MP3 at 128k. If your source TS already used H.264, you are re-encoding an already-lossy stream, so keeping the CRF value low (e.g., 18) will help preserve more detail.
AVI has very limited support for multiple audio tracks in practice, and no standardized support for subtitle streams at all. This conversion maps the default (first) audio track and drops any additional audio streams and subtitle tracks. If you need to preserve a specific secondary audio track, you would need to manually specify it in the FFmpeg command using the '-map' flag before converting. Subtitles cannot be embedded in AVI and would need to be saved as a separate .srt or .ass file if needed.
AC3 audio, which is common in broadcast and cable TV recordings stored as TS files, is not supported in AVI in a standardized way, so this tool transcodes it to MP3 using the LAME encoder at 128k. This means the 5.1 surround channels in an AC3 track will be downmixed to stereo. If preserving surround sound matters, AVI is not an ideal target format — consider MP4 or MKV instead.
To change video quality, adjust the '-crf' value: lower numbers (e.g., 18) produce higher quality and larger files, while higher numbers (e.g., 28) reduce quality and file size. The range is 0 (lossless) to 51 (worst). To change audio quality, modify '-b:a' — for example, use '-b:a 192k' or '-b:a 320k' for higher-fidelity MP3 output from your broadcast source. For a TS file originally encoded with high-bitrate AC3 audio, bumping the MP3 bitrate to at least 192k is recommended to reduce audible degradation.
Yes. On Linux or macOS, you can use a shell loop: 'for f in *.ts; do ffmpeg -i "$f" -c:v libx264 -c:a libmp3lame -crf 23 -b:a 128k "${f%.ts}.avi"; done'. On Windows Command Prompt, use: 'for %f in (*.ts) do ffmpeg -i "%f" -c:v libx264 -c:a libmp3lame -crf 23 -b:a 128k "%~nf.avi"'. This is especially useful for converting a batch of recorded broadcast segments or HLS-reassembled TS files in one pass.
TS files often carry overhead from broadcast packetization, null packets used for CBR padding, and multiple streams (audio tracks, subtitles, service data). Stripping these and re-encoding to a single H.264 video and MP3 audio stream in AVI can sometimes produce a smaller file. However, if the original TS used a highly efficient codec like H.265 (HEVC) and is being re-encoded to H.264 at CRF 23, the AVI output may be larger. File size depends heavily on the source codec, resolution, and the CRF value you choose.

Technical Notes

AVI (Audio Video Interleave) was designed in the early 1990s and carries significant structural limitations compared to the MPEG-2 Transport Stream format. TS is a packetized, time-stamped container built for resilience over unreliable broadcast channels, supporting H.264, H.265, AAC, AC3, and embedded subtitle streams (DVB, SCTE, etc.). AVI, by contrast, uses a simple RIFF-based interleaved structure with no native support for subtitles, chapters, variable frame rate, or standardized multi-track audio. During this conversion, only the primary video and audio streams are preserved. The video is re-encoded with libx264 using the CRF 23 default, which provides a good balance between quality and file size for most broadcast content. Audio is transcoded to MP3 via libmp3lame — AVI's most reliable and compatible audio codec choice — with the caveat that AC3 surround tracks will be downmixed to stereo. Broadcast TS files sometimes contain discontinuities, PCR resets, or timestamp anomalies from DVR recording; FFmpeg generally handles these gracefully but may emit warnings. Files larger than 2GB in AVI format may encounter playback issues in some legacy players due to the original AVI spec's 32-bit size limitation, though OpenDML AVI extensions (which FFmpeg uses automatically) extend this limit significantly.

Related Tools