Stop Re-Encoding Your .ts Files Like a Caveman: The Ultimate FFmpeg Guide
How to remux your sketchy downloaded streams into MP4s in seconds, without crying over lost video quality.
“Why are you waiting two hours for a ‘Free Video Converter’ to compress your file into a pixelated mess when you can just repackage it in three seconds? Work smarter, not harder. Or just keep being you, I guess.”
So, you went down a rabbit hole on some obscure forum, downloaded a livestream, and now you’re staring at a .ts (Transport Stream) file like it’s an alien artifact. Your default media player is having a panic attack, Premiere Pro refuses to acknowledge its existence, and your storage is begging for mercy.
Are you seriously considering downloading some ad-ridden GUI software to re-encode it? Absolutely not. Not on my watch. Today, I’m going to teach you how to use FFmpeg via CMD. Yes, a black screen with text. Take a deep breath; I promise it won’t bite if you just follow the instructions.
Let’s fix your life.
Step 1: File Organization for Dummies & Opening the Matrix
Before we do any magic, let’s get your digital life together. If you’re the kind of person who leaves 400 files on your Desktop, this is an intervention.
- Create a Dedicated Folder: Right-click anywhere (preferably not your cluttered Desktop), create a new folder, and name it something simple like
VideoFix. - Move Your File: Drag your wretched
.tsfile into this folder. Let’s pretend your file is namedstream_record.ts. - The ‘Hacker’ Trick: Now, how do we open the Command Prompt here? Don’t you dare open the Start Menu and manually type
cd C:\Users\...like a boomer trying to use a VCR.
- Click on the address bar at the top of your File Explorer window (where it says the folder path).
- Delete whatever is there, literally just type
cmd, and press Enter.
Boom. A black command prompt window opens, and it’s already pointing exactly to your folder. You’re practically a hacker now. Don’t let it go to your head.
Step 2: Installing Your Tools (Because You Don’t Have Them)
You need FFmpeg to do this, and no, we are not downloading a ZIP file and setting Environment Variables manually. We are going to use Chocolatey, a package manager for Windows, because we live in the 21st century.
1. Open PowerShell as Administrator
Click your Start Menu, type PowerShell, right-click it, and select Run as Administrator. If a pop-up asks if you want to allow this app to make changes, click Yes. (I promise I’m not hacking you… yet).
2. Install Chocolatey
Copy this entire terrifying block of code, paste it into PowerShell, and hit Enter. Just trust the process.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))3. Install FFmpeg
Once the matrix text stops scrolling, type this and hit Enter:
choco install ffmpeg -yWait for it to finish. Once it says successful, close PowerShell. You’re done with the heavy lifting. Congratulations on successfully installing software without clicking “Next” ten times.
Step 3: The Magic Spell (Remuxing to MP4)
Go back to that CMD window you opened in Step 1 (the one pointing to your VideoFix folder).
Get Pesa S.’s stories in your inbox
Join Medium for free to get updates from this writer.
If you named your file stream_record.ts, you are going to type this exact command. Don’t typo it.
ffmpeg -i stream_record.ts -c copy output.mp4Press Enter.
Before you can even blink, it’s done. You now have an output.mp4 file in your folder. It plays everywhere, it works in video editors, and it looks exactly the same as the original.
Why did it take 2 seconds? Look at the
-c copypart of the command. I am literally forcing you to learn this:-c copytells FFmpeg to copy the video and audio streams directly into a new MP4 container without re-encoding them. It’s like taking a sandwich out of a ugly plastic bag and putting it into a nice shiny lunchbox. The sandwich didn’t change, only the box did. Stop re-baking the sandwich!
Step 4: For the Hoarders (Batch Conversion)
What’s that? You didn’t just download one video, you downloaded an entire season of a show in .ts format? Of course you did.
I’m not going to make you type that command 50 times. I have some mercy.
Make sure all your .ts files are in that same folder. In your CMD window, copy and paste this ridiculous line of code and press Enter:
for %i in (*.ts) do ffmpeg -i "%i" -c copy "%~ni.mp4" This tells your computer to look at every single .ts file, run our magic spell on it, and spit out an .mp4 with the exact same name. Go grab a coffee. Actually, don’t, it’ll probably be done before you stand up.
Final Words
You now know how to open CMD from a folder path, install tools via command line, and remux video files losslessly. You are officially 10% smarter than you were when you clicked on this article.
Don’t let it fade away. Use it. And for the love of everything holy, stop using sketchy web converters.
Leave a clap if you actually learned something today. Or don’t. I’m just a sassy cat on your screen, and your validation doesn’t buy me digital tuna.







