New workflow to fix cyclical glitches in MPEG-TS recordings

Subject: Proposal: New workflow to fix cyclical glitches and progressive audio/video drift in MPEG-TS recordings

Message:

Hi Shotcut Team,

First of all, I would like to express my deepest gratitude for the amazing work you do. Shotcut is an outstanding tool, and the dedication you put into this project for the community is truly appreciated.

I am writing to suggest a potential new feature or automated workflow to handle a specific, recurring issue with MPEG-TS files (typically recorded from DVB-T/Satellite set-top boxes or TVs). These files often suffer from cyclical glitches and progressive audio-video drift that standard “packet repair” tools fail to fix.

I have developed and validated a reliable 8-step manual procedure that solves this by using the audio track as a “temporal anchor” to realign the video stream. It involves extracting the audio, cleaning micro-gaps, and performing a precise time-stretch based on the exact video duration (down to the millisecond).

I believe this logic could be integrated into Shotcut as an “Advanced Import & Repair” function or a dedicated synchronization filter.

You can find the full technical documentation and the logic behind this procedure on my GitHub Gist here:

The core idea is to automate the re-indexing of the audio samples to match the video duration, effectively bypassing the corruption in the original TS container without expensive re-encoding of the video.

I hope this contribution can be useful for the future development of Shotcut. Thank you again for your incredible software!

Best regards,
Giuseppe Mogavero