![]() |
Ffmpeg won't convert VHS captured .ts to .mkv?
Hi - I'm digitizing vhs tapes with a Hauppauge Colossus capture card and Mediaportal on windows 7. They're captured as .ts files and the .ts files play well, with no sign of corruption.
But I'd like to convert them to .mkv, and ffmpeg (version 2023-08-28-git-b5273c619d-essentials_build-www.gyan.dev) fails at this. I use Code:
ffmpeg.exe -i test.ts -c copy test.mkvCode:
[mpegts @ 00000000003d6d40] Packet corrupt (stream = 0, dts = 46105).Ffmpeg seems to be complaining about corruption, though again the .ts files play fine. Is there some way to use ffmpeg to convert these files to mkv? Or do I need to capture them differently somehow? Thanks! |
You do not specify what you want to do. Do you just want to change .ts to .mkv for fun? for playback issues? trying to compress the files for storage? re-encoding for (web) distribution?
"Ffmpeg won't convert VHS captured .ts to .mkv" Is actually a weird way to ask your question. It's simply "Ffmpeg won't convert .ts to .mkv". FFmpeg does not care where that .TS came from. Your .ts being a vhs transfer does not make it special, it's just a .ts file and the question is a simple format transfer question that has nothing to do with analog and vhs capture. > the .ts files play well, with no sign of corruption. With no sign of corruption to your naked eye. How do you know for sure there is no corruption? > The resulting mkv file is much smaller than the .ts, I am not sure that makes sense... you're using "copy" so if your codec is compatible with the mkv container ffmpeg is supposed just "re-mux" the same video just in an mkv container with ~almost the same size. Try using a more explicit command chose you codec, specify that the source is interlaced if it is, etc or use a gui encoder like https://sourceforge.net/projects/x26....8.7z/download if you're not familiar with FFmpeg CLI commands (or find an ffmpeg GUI) |
You might use MediaInfo to inspect the input and output files to see what's different other than the container itself.
It's possible that the output file is perfectly good but mpc-hc just doesn't know how to play it. You could try converting the .ts to HuffYUV and see if you can open it in VirtualDub: Code:
ffmpeg -i test.ts -acodec copy -vcodec huffyuv test.avi |
Thanks for the replies. I want to transmux from .ts container to mkv, because with my players (Mediaportal and mpc-hc) mkv's navigate (skip, fforward, rewind) better than ts's. And they're slightly smaller.
The original .ts file is tff interlaced - here's the MediaInfo output (ignoring the audio stream): Code:
GeneralCode:
ffmpeg -i test.ts -codec copy test.mkvCode:
GeneralCode:
ffmpeg -i test.ts -codec copy -flags +ilme+ildct -top 1 -x264opts tff=1 test.mkvI've also transcoded with command: Code:
ffmpeg -i test.ts -vf yadif test.mkv |
use mkvmergeGUI (mkvtoolnix).
Just drag and drop the .ts into the tool then "stat multiplexing"you will get an mkv output. Try mpv for playback of the ts files, they usually seek fine. Quote:
MPC-HC can play ts and navigate perfectly if the ts is seekable from my experience... Maybe just a mere format conversion will solve the problem for u, maybe not. IDK Some videos are just not very seekable (and there are many possible reasons behind it) so this may force you to re-transcode. |
Quote:
|
What happens when you transmux them into .MP4 files? That is generally the most universally compatible container for AVC (H.264) video.
|
Quote:
|
probably your source is corrupted and every software that tries to remux it fails after a few frames.
care to share the file? |
Well ffprobe/ffmpeg does report numerous "Packet corrupt" messages as I mentioned above. Still it seems odd that a deinterlaced transcode succeeds, giving a playable mkv file without obvious corruption, using the command:
Code:
ffmpeg -i test.ts -vf yadif test.mkv |
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.