Easily Convert TS Videos to MP4 File Format via CLI or GUI

Linux TLDR
Last Updated:
Reading time: 4 minutes

If you’ve ever downloaded a video file using a popular download manager such as IDM or JDownloader, you might have received a TS (Transport Stream) video file from the server.

If you want your video file to be in MP4 or any other file format, you can’t force the server to deliver it in that format, and most download managers do not offer an option to convert the file after downloading.

So, here you can take advantage of some CLI as well as GUI tools to convert your β€œ.ts” video files to β€œ.mp4” or any other file format you desire.

Tutorial Details

DescriptionConvert TS File to MP4 File Format
Difficulty LevelLow
Root or Sudo PrivilegesNo
OS CompatibilityWindows, macOS, and Linux
PrerequisitesFFmpeg, LosslessCut, VLC
Internet RequiredNo

When to Convert a TS File to an MP4 File Format

Modern video players can effortlessly handle TS video files without any problems. However, some codec issues may arise, as seen in VLC Media Player, which experiences lag when skipping forward or backward with TS files.

If your system has good hardware specs, you might experience a slightly choppy playback issue, but for a potato PC, it could be a terrible experience, and in that case, converting it to MP4 or any other format would be the best choice.

I’ve tried and tested all available options within the VLC media player to eliminate this issue, but none of them worked. If you have any other ways to solve this issue, do let me know in the comment section.

How to Convert TS File to MP4 File Format via CLI and GUI

There would be many options to convert your TS file to MP4 format, but I’ve given you my favorite and the one most recommended by othersβ€”starting with the CLI, which offers the most options and convenience.

Converting TS to MP4 Using FFmpeg (CLI)

FFmpeg is a robust cross-platform CLI tool that provides a range of options for multimedia processing, including the capability to convert any media file to its supported file formats.

So, to convert your desired TS file to MP4 file format, simply execute the following command, replacing β€œinput_file.ts” and β€œoutput_file.mp4” with your desired filename.

$ ffmpeg.exe -i input_file.ts -c copy output_file.mp4

If you have multiple TS files and other content mixed, and you only want to convert all your TS files to MP4 file format (or any other), you can use the following command:

This command will work on macOS and Linux, and on Windows if MinGW is installed.
$ for i in *.ts; do ffmpeg -i "$i" -c copy "${i%.ts}.mp4"; done

The above command might be a bit tricky to understand, so here is the breakdown.

  • for i in *.ts; do ...: This loop iterates over all files with a β€œ.ts” extension in the current directory.
  • ffmpeg -i "$i" -c copy "${i%.ts}.mp4": This is the β€œffmpeg” command for each iteration. It takes the input file β€˜-i "%i"β€˜, uses the same codecs as the input file β€œ-c copyβ€œ, and sets the output file name to be the same as the input file but with the β€œ.mp4” extension.

If you wish to use custom codecs for the output file, you can refer to the following command examples on how to achieve that with your desired options.

1. If your TS file uses H.264 video and AAC audio:
$ ffmpeg -i input_file.ts -c:v libx264 -c:a aac output_file.mp4

2. If you want to control the video bitrate to 2 Mbps: 
$ ffmpeg -i input_file.ts -c:v libx264 -c:a aac -b:v 2M output_file.mp4

Converting TS to MP4 Using VLC Media Player (GUI)

The VLC Media Player has a built-in file converterβ€”surprised? To learn more about its diverse list of features, check out our dedicated article.

This method is recommended for those who already have VLC installed on their system and are ready to sacrifice some time for conversion. If you are comfortable trying a new tool, then check out the next section, which can convert your TS file to MP4 at a faster rate.

Now, to convert your desired TS file to MP4 using VLC, launch VLC and navigate to the β€œFile” -> β€œConvert / Save…” option or use the β€œCtrl +R” shortcut key.

file converting option in VLC

It will launch the following window; you need to click on the β€œAdd” button to select the file with the TS format, and the file will be listed in the β€œFile Selection” column.

Finally, click on the β€œdown arrow” next to the β€œConvert / Save” button, and from the dropdown, select the β€œConvert” button, or you can alternatively use the β€œAlt+O” shortcut key.

converting ts file to mp4 using vlc

Now, the Convert window will appear. From here, choose the β€œdestination location” for the output file (the default format would be MP4), and then click the β€œStart” button to begin.

saving ts file to mp4 in vlc

Once the process is initiated, your VLC player will pop up, and its progress bar will run as if a video is playing. However, behind the scenes, it’s converting your desired TS file to MP4.

file conversion in vlc

Once this process is complete, you will discover the output file in MP4 format at the designated destination location.

Converting TS to MP4 Using LosslessCut (GUI, Recommended)

LosslessCut is an incredible free, open-source, and cross-platform video editing tool that can convert your TS file to MP4 (or any other format) at a faster rate than VLC can achieve.

If you haven’t installed this tool on your system, you can refer to our dedicated article for guidance and then easily launch, open, or drag and drop the TS video file onto the application.

opening ts file in losslesscut

In the above picture, it indicates that the file is not natively supported. You can simply ignore that and click directly on the β€œExport” button, which will prompt the following window.

converting ts file to mp4 using losslesscut

Here, ensure that the output format is set to MP4, the output path is configured to the location where the output file will be saved, and then click on the β€œExport” button to convert the TS file to MP4 using LosslessCut.

Finally, when the process completes, it will prompt a warning message that you can simply close.

warning message in losslesscut

You can now close the LosslessCut window and navigate to the output directory, where you’ll discover your MP4 file with a name identical to this: β€œinput_file-β€œ.

Final Word

I hope this article has helped you successfully convert your TS file to MP4 with ease. If you encounter any problems, have questions, or have requests, please let us know in the comment section, as we are always at your service.

Till then, peace!

Join The Conversation

Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy.