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!
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!