Convert TS to GIF — Free Online Tool

Convert MPEG-2 Transport Stream (.ts) broadcast video files into animated GIFs directly in your browser. This tool decodes your TS video — which may contain H.264, H.265, or other broadcast codecs — and re-encodes every frame into the GIF palette-based format, producing a looping, universally shareable animation with no audio.

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 carry video encoded in codecs like H.264 or H.265 alongside multiplexed audio, subtitle, and timing data used in broadcast and streaming pipelines. Converting to GIF is a full re-encode: FFmpeg decodes each video frame from the TS container, then re-encodes it using the GIF codec, which maps each frame's colors to a 256-color palette. All audio tracks, subtitles, and broadcast metadata are discarded entirely, since GIF supports none of these. The output is set to loop infinitely with the -loop 0 flag. Because GIF is limited to 256 colors per frame, complex broadcast footage with gradients or fine detail will show visible color banding and dithering artifacts compared to the original TS source.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg media processing tool. In this browser-based tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm), meaning your TS file never leaves your device.
-i input.ts Specifies the input MPEG-2 Transport Stream file. FFmpeg reads and demuxes the TS container, extracting the video stream (typically H.264 or H.265) for decoding, while ignoring audio and subtitle streams since GIF supports neither.
-c:v gif Sets the video codec to GIF, instructing FFmpeg to fully decode the TS video frames and re-encode them using the GIF format's palette-based, LZW-compressed encoding. This is a complete transcode, not a remux.
-loop 0 Configures the output GIF to loop infinitely when played in a browser or compatible viewer. The value 0 is the standard setting for an endlessly looping animated GIF, which is the expected behavior for web-shared animations.
output.gif Defines the output filename and format. The .gif extension tells FFmpeg to write a Graphics Interchange Format file containing the re-encoded, palette-reduced animation derived from the TS source video.

Common Use Cases

  • Clip a highlight moment from a recorded broadcast or live stream capture (.ts file from a DVR or HLS recording) and share it as a looping GIF on social media or in a chat.
  • Extract a short reaction clip from a Transport Stream recording of a TV program to create a reaction GIF for forums, Reddit, or messaging apps.
  • Turn a brief segment of a broadcast sports or news recording into an animated GIF thumbnail or preview for a blog post or article.
  • Convert a short tutorial or demo recorded via a broadcast capture card (output as .ts) into a looping GIF for embedding directly in documentation or README files where video embeds are not supported.
  • Create a looping GIF teaser from a raw .ts file captured from an HLS live stream, for use in email newsletters where video autoplay is blocked.
  • Repurpose a short animated segment from a broadcast intro or bumper (stored as a .ts file) into a GIF for use in presentations or websites.

Frequently Asked Questions

No. GIF is a purely visual format and has no audio channel whatsoever. During this conversion, all audio tracks present in the Transport Stream — whether AAC, AC3, MP3, or otherwise — are automatically discarded. If you need to preserve audio alongside animation, consider converting to a video format like WebM or MP4 instead.
This is an inherent limitation of the GIF format. GIF supports a maximum of 256 colors per frame, while your TS broadcast video was likely encoded with millions of colors using H.264 or H.265. FFmpeg generates a palette to best approximate the original colors, but footage with gradients, skin tones, or complex backgrounds will show visible color banding and dithering. This is most noticeable in broadcast content, which often contains rich, highly saturated color information.
GIF files are almost always significantly larger than the equivalent H.264 or H.265 video in a TS container. Transport Streams use highly efficient modern video compression, while GIF uses only basic LZW lossless compression on indexed-color frames. Even a few seconds of broadcast video can produce a GIF many times larger than the TS source for the same duration. Keep your clips short — ideally under 10 seconds — to keep GIF file sizes manageable.
Yes, but you'll need to modify the FFmpeg command directly. Add -ss to set the start time and -t to set the duration before the input flag — for example: ffmpeg -ss 00:01:30 -t 5 -i input.ts -c:v gif -loop 0 output.gif. This will start at 1 minute 30 seconds and extract 5 seconds. For long broadcast recordings, trimming before conversion is strongly recommended to avoid extremely large GIF files.
The -loop 0 flag instructs the GIF to loop indefinitely when displayed in a browser or image viewer. The value 0 specifically means infinite looping. You can change this to -loop 1 for a GIF that plays once and stops, or -loop 3 for one that plays exactly 3 times. Remove the flag entirely or use -loop 1 if you want the animation to play through only once, which is useful for instructional GIFs where looping would be confusing.
Yes. The command on this page performs a single-pass conversion, which uses a generic palette. For better color accuracy — especially important with broadcast footage that has rich color — you can use a two-pass approach: first generate a custom palette with -vf palettegen, then apply it with paletteuse. For example: ffmpeg -i input.ts -vf 'fps=15,scale=480:-1:flags=lanczos,palettegen' palette.png followed by ffmpeg -i input.ts -i palette.png -filter_complex 'fps=15,scale=480:-1:flags=lanczos[x];[x][1:v]paletteuse' -loop 0 output.gif. This produces noticeably better results for broadcast content.

Technical Notes

MPEG-2 Transport Streams are designed for robust broadcast and streaming delivery, often containing H.264 (AVC) or H.265 (HEVC) video with multiple multiplexed audio tracks, program-specific information (PSI) tables, PCR timing data, and embedded subtitles. None of this metadata, subtitle data, or audio is carried into the GIF output — GIF simply has no mechanism to represent it. The conversion is a full decode-and-reencode pipeline: FFmpeg must fully decode every video frame from the TS before encoding to GIF, making this more CPU-intensive than a simple container remux. GIF's 256-color palette limit per frame (using 8-bit indexed color) means this conversion always involves color reduction, even though GIF itself is technically lossless in how it stores its palette-indexed data. Frame rate is preserved from the source, but high frame rates (broadcast TS files are commonly 25fps, 29.97fps, or 60fps) result in very large GIF files; adding -vf fps=10 or fps=15 to the command is advisable for practical output sizes. There is no quality parameter for GIF output — the only meaningful variables are frame rate, output resolution (adjustable via -vf scale), and palette generation strategy.

Related Tools