TS to MP4 Converter is a lightweight Windows desktop utility built with C# and WPF (.NET Framework 4.8) for batch converting MPEG Transport Stream (.ts) files to MP4.
Select a folder and all .ts files inside it are instantly listed as queued entries. Hit Start and the converter processes them one by one — remuxing each file with mkvmerge and stream-copying to MP4 with ffmpeg — while updating every row's status live in the table. Progress, timing, and per-file results are tracked in real time and can be exported to CSV when done.
- Instant file preview — selecting a folder immediately lists all
.tsfiles found (recursively) with aWAITINGstatus before conversion even starts. - Live in-place status updates — each row transitions
WAITING → CONVERTING... (N%) → COMPLETEDwithout adding or removing rows, keeping the list stable throughout. - Real-time progress — per-file percentage is derived from mkvmerge's native stdout progress output, updating smoothly from 0 to 99 %.
- Batch processing — converts all files in a folder sequentially to avoid CPU/IO contention during video encoding.
- Keep or delete source files — optionally remove the original
.tsafter a successful conversion. - Overwrite control — skip files whose MP4 output already exists, or overwrite them.
- Flexible output — save converted files to the same source folder, or pick a separate output directory.
- Cancellable — a Stop button cancels the running conversion cleanly, killing the active process and recording an abort entry in the log.
- Log filtering — filter the conversion table by status (
All,COMPLETED,FAILED,SKIPPED) at any time. - CSV export — export the full conversion log (action, prefix, source, destination, status) to a
.csvfile; only enabled after a successful run. - Completion actions — optionally play a notification sound and/or open the output folder when the batch finishes.
- Dark / Light theme — toggle between themes at any time; preference is persisted across sessions.
- Dependency check — on launch, verifies that both
ffmpeg.exeandmkvmerge.exeare reachable on the systemPATHand disables Start if either is missing. - Custom window chrome — frameless, draggable title bar for a clean, modern look.
- Styled info dialogs — success, info, and error notifications use a themed in-app dialog instead of the system MessageBox.
- Windows 7 SP1 or later (Windows 10 / 11 recommended)
- .NET Framework 4.8 (pre-installed on modern Windows)
- ffmpeg — add
ffmpeg.exeto your systemPATH(ffmpeg.org) - MKVToolNix — add
mkvmerge.exeto your systemPATH(mkvtoolnix.download) - Visual Studio 2019 / 2022 with the .NET desktop development workload (only required to build from source)
- Clone the repository:
git clone https://github.com/xecvas/TS-to-MP4.git cd TS-to-MP4 - Open
TS to MP4.slnin Visual Studio. - Build the solution (
Ctrl+Shift+B) or publish aReleasebuild. - Run
TS to MP4.exefrombin/Release(orbin/Debug).
Alternatively, download the latest pre-built executable from the Releases page and run TS to MP4.exe directly — no installation required.
- Launch TS to MP4 Converter. The app checks for
ffmpegandmkvmergeon startup — both must be on thePATHbefore conversion can begin. - Click Browse next to Source Folder and select the folder containing your
.tsfiles. All files found (including subfolders) are immediately listed in the table with aWAITINGstatus. - Set your Output Folder, or tick Save to Source Folder to convert in place.
- Choose your Conversion Options:
- Keep Original Source Files — leaves the
.tsfiles untouched after conversion. - Overwrite Existing Files — replaces any MP4 that already exists at the output path.
- Play Notification Sound on Finish — plays a system sound when the batch completes.
- Open Output Folder on Finish — opens the output directory in Explorer after the run.
- Keep Original Source Files — leaves the
- Click START CONVERSION. Each row updates live:
WAITING → CONVERTING... (N%) → COMPLETED / FAILED / SKIPPED. - Click STOP / CANCEL at any time to abort. The active file is terminated cleanly and an abort entry is added to the log.
- Use the All Status filter dropdown to narrow the log view by outcome.
- Once the batch completes, click Export Log to save the full conversion table as a
.csvfile. - Click 🔄 Recheck to reset the UI and re-run the dependency check at any time.
TS to MP4/
├── Models/
│ └── Models.cs # AppSettings, LogInfo (INotifyPropertyChanged), SummaryStats
├── Utilities/
│ ├── ThemeHelper.cs # ThemeHelper (brush switching), DialogHelper (folder picker), ProcessHelper (async process runner)
│ └── ConverterEngine.cs # SettingsService (JSON persistence), ConverterService (batch engine + dependency check)
├── App.xaml / App.xaml.cs # Application entry point
├── InfoWindow.xaml / .xaml.cs # Themed info / success / error notification dialog
├── AboutWindow.xaml / .xaml.cs # About dialog
└── MainWindow.xaml / .xaml.cs # Main UI — file selection, batch control, live log table, theme toggle
- C# / WPF on .NET Framework 4.8
- mkvmerge (MKVToolNix) — remuxes
.tsto.mkv; stdoutProgress: N%lines drive the per-file progress bar - ffmpeg — stream-copies the remuxed
.mkvto.mp4with-c copy(near-instant, no re-encode) System.Threading.Tasks+CancellationToken— cancellable, non-blocking async batch conversion loopIProgress<T>— marshals per-file progress callbacks from the background thread to the UISynchronizationContextINotifyPropertyChanged— live in-place DataGrid cell updates (Status, Action, Prefix) without row replacementSystem.Web.Script.Serialization— lightweight JSON settings persistence to%LocalAppData%\TS to MP4\settings.json
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/my-feature). - Commit your changes (
git commit -m "Add my feature"). - Push to the branch (
git push origin feature/my-feature). - Open a Pull Request.
Please keep changes consistent with the existing .NET Framework 4.8 / WPF target and avoid introducing dependencies on newer .NET runtimes.
This project is licensed under the terms found in LICENSE.txt.
Created with ❤️ by xecvas
