Skip to main content

Building a TS Video Player: Why VLC Was Not Enough for High-Definition Streams

I have a Blu-ray ripping workflow that I have used for years to maintain digital copies of my physical disc collection. The output files are TS, M2TS, and MTS —…

BA
Building a TS Video Player: Why VLC Was Not Enough for High-Definition Streams

COVER // BUILDING A TS VIDEO PLAYER: WHY VLC WAS NOT ENOUGH FOR HIGH-DEFINITION STREAMS

I have a Blu-ray ripping workflow that I have used for years to maintain digital copies of my physical disc collection. The output files are TS, M2TS, and MTS — the MPEG-2 Transport Stream formats that Blu-ray and AVCHD cameras produce. These are the highest-quality formats for this source material, and they are also the formats that most media players handle poorly.

The problems were consistent. VLC would play the files but with occasional frame drops on high-bitrate streams. Windows Media Player had no meaningful support. MPC-HC played them reasonably well but had intermittent audio sync issues with multi-channel audio. The Windows 11 built-in player has no TS support at all. For a format that is the output of a significant portion of high-definition physical media, the playback situation was frustrating.

The technical reason for the poor support is that TS/M2TS files are transport stream containers optimised for broadcast and disc delivery, not for computer playback. They can contain multiple video streams, multiple audio tracks, multiple subtitle tracks, and programme-specific information that general-purpose media players do not handle correctly. Getting reliable playback requires a decoder that understands the transport stream layer, not just a container that can play the most common codecs.

I rebuilt my TS player from scratch in 2026 using LibVLC as the playback engine. Here is what I built and why.

What Makes TS Playback Hard

The transport stream structure

A TS file is not a simple container with one video and one audio track. It is a multiplexed transport stream containing one or more Programme Elementary Streams (PES). A Blu-ray rip may contain: a primary H.264 or H.265 video stream, a primary lossless audio stream (DTS-HD MA or TrueHD), secondary audio streams, a secondary video stream for picture-in-picture features, and multiple subtitle tracks in PGS (Presentation Graphic Stream) format.

A player that treats TS as just another container will play the first video and audio streams it finds, ignore the rest, and display no subtitles. A player that understands the transport stream structure can enumerate all the streams, let you select the audio track you want, and display PGS subtitles correctly.

Bitrate requirements

High-definition Blu-ray TS files have video bitrates of 20-40 Mbps and lossless audio at 10-15 Mbps. The total stream bitrate can exceed 50 Mbps for the full presentation. Players that buffer aggressively or that have inefficient demuxing pipelines produce frame drops and audio glitches at these bitrates even on capable hardware.

Subtitle format complexity

PGS (Presentation Graphic Stream) subtitles — used in all Blu-ray discs — are bitmap-based subtitles, not text subtitles. Each subtitle frame is a PNG-like image stored in the stream, positioned precisely in the video frame. Players that only handle SRT or ASS subtitle formats have no PGS support. VLC has PGS support but it has historically had rendering issues with certain disc-originated PGS tracks.

Why LibVLC Instead of Building From Scratch

LibVLC is the library version of VLC — the same playback engine that powers VLC media player, exposed as a programmable API. Using LibVLC means the transport stream demuxing, codec decoding, and audio output handling are all handled by the same engine that VLC uses, with two differences: I control the application layer entirely, and I can implement specific features for TS playback that the VLC UI does not expose conveniently.

An earlier version of DebMedia TS Player attempted to use Windows’ built-in media foundation APIs for TS playback. The results were inconsistent — media foundation’s TS support is good for broadcast-format TS (the kind that comes from TV tuner cards) but not for Blu-ray-originated M2TS with lossless audio codecs. Switching to LibVLC in the rebuild solved the codec compatibility problem definitively.

What DebMedia TS Player Provides

Stream selection

All audio tracks in the TS file are enumerated at load time and selectable from the player controls. All subtitle tracks — including PGS — are enumerated and selectable. Video streams are displayed — relevant for files with secondary video streams.

Smooth playback at high bitrates

LibVLC’s demuxer pipeline handles high-bitrate TS files without the frame drops or audio desync that simpler players produce. DebMedia TS Player runs LibVLC in a background process that feeds the video and audio output directly without the UI overhead that can affect playback consistency.

File browser for TS collections

TS files are often stored in folder structures mirroring the disc structure — a top-level folder for the title, with BDMV and BACKUP subdirectories. DebMedia TS Player presents a file browser that understands this structure and shows the main feature file directly rather than requiring navigation into the BDMV/STREAM folder to find the main M2TS file.

Minimal interface

The interface is the playback surface plus a controls bar. No media library management. No streaming features. No recommendations. The player opens a TS file and plays it correctly.

DebMedia TS Player vs Competing Options

FeatureDebMedia TS PlayerVLCMPC-HCWindows Media Player
TS/M2TS/MTS supportYes (full)YesYes (with CCCP codecs)No
PGS subtitle supportYesPartialYes (with madVR)No
Multi-audio track selectionYesYesYesNo
High-bitrate playback (50+ Mbps)YesYesYesNo
Lossless audio (TrueHD, DTS-HD MA)YesYesYesNo
Blu-ray folder structure awarenessYesNoNoNo
Modern interface (HiDPI)YesPartialNoYes
Actively maintainedYesYesMinimal updatesYes

The Bridge Architecture

DebMedia TS Player uses a bridge architecture between the VB.NET application layer and LibVLC. The VB.NET code handles file selection, UI state, and player controls. LibVLC runs in-process through its .NET bindings and handles all media playback. The bridge exposes playback state — position, duration, playback status, track lists — to the WebView2 UI layer through a JavaScript interface, so the playback controls displayed in the web UI update in sync with the actual playback state.

This architecture has one key requirement: LibVLC’s native DLLs must be bundled with the application, since LibVLC is not a Windows system component. The installer includes the LibVLC runtime, which adds to the installer size but ensures the player works correctly on any Windows machine without requiring the user to separately install VLC or manage codec packages.

Who DebMedia TS Player Is For

  • Users who rip Blu-ray and AVCHD discs and store the output as TS/M2TS/MTS files
  • Video professionals working with broadcast TS recordings from capture cards or network streams
  • Anyone who needs PGS subtitle support and reliable multi-audio track selection for disc-format video files
  • Users who find VLC’s interface unsuitable for a focused TS playback workflow

For users whose media collection is entirely in MP4 and MKV, DebmediaCinema is the more appropriate tool — it handles those formats well and includes library management. DebMedia TS Player is specialised for the transport stream formats that disc ripping workflows produce.

Quick Summary

  • TS, M2TS, and MTS files are transport stream formats from Blu-ray discs and AVCHD cameras — high bitrate, multi-stream, with PGS bitmap subtitles. Most media players handle them poorly.
  • The problems: VLC has occasional frame drops at high bitrates; MPC-HC requires codec package configuration; Windows Media Player has no TS support; Windows 11’s built-in player has no TS support.
  • DebMedia TS Player uses LibVLC as the playback engine, providing VLC-class codec coverage with a focused interface designed for TS file workflows.
  • Key features: full stream enumeration (all audio tracks, all subtitle tracks), PGS subtitle rendering, Blu-ray folder structure awareness, smooth high-bitrate playback.
  • LibVLC runtime is bundled with the installer — no separate VLC installation or codec management required.

High-definition disc content deserves a player that handles the format correctly. DebMedia TS Player is available here for users who need reliable TS/M2TS/MTS playback on Windows.

Let's Talk

Have a Project in Mind?

Whether it's a software challenge, an AI integration, or a course enquiry — I'm always open to a real conversation.

hello@debasisbhattacharjee.com · +91 8777088548 · Mon–Fri, 9AM–6PM IST