Log in

View Full Version : Repairing damaged TS files


frobber
18th January 2026, 01:18
I am trying to process a TS file using AviSynth, but the audio goes out of sync due to some slight corruption of the file.

To attempt repairs, here's what I've tried, thus far:

(1) Running the TS file through TS-Doctor, which reports several errors.

After attempting to fix these errors with TS-Doctor, I then tried converting the container from TS to MP4 with ffmpeg, but that fails with "Packet corrupt ...Error parsing ADTS frame header", so it seems TS-Doctor couldn't straighten out all the issues.

(2) Running the TS file through tsMuxer and then ffmpeg before running the result through AviSynth.

By doing this, I can get ffmpeg to complete without errors, though it complains about "non-monotonic DTS". But again, when I mux the audio and video back together, the audio goes out of sync.

It is of course possible I'm just doing these steps wrong, but are there other approaches, or a guide somewhere for doing this?

Thanks in advance!

hydra3333
23rd April 2026, 09:25
Hello.

I just found and subscribed to this thread because OTA recorded as TS files can and are "problematic" either intentionally by the broadcaster or due to the vagaries of transmission/reception.
I would LOVE there to be a reasonable solution but I have not found one to replace VideoReDo (VRD) - now defunct, the author passed away a few years ago and apparently his partner would not sell nor open-source it.

I tested a few and kept an eye on the VideoHelp forum but there is still nothing on this planet which comes anywhere close to VRD's "QuickStreamFix" function which fixed things intentionally keeping audio sync and which had the added advantage of eliminating/reducing video/audio delays in the stream. I did some fiddling with various options available in ffmpeg however it couldn't manage to detect/fix things really.

There are a couple of very long threads over at the VideoHelp forum, eg this one:
https://forum.videohelp.com/threads/417438-VideoReDo-TVSuite-Professional-General-Discussion-Thread
which mentions a couple of products however nothing really works reliably let alone works within cooee of VRD.

Good luck to us both in this search, however I reckon the lack of responses to your thread probably tells the story.