I have recorded broadcast-ed material using a DVB-T tuner.
That produces several TS files per recording (most likely to keep filesize within FAT32 limitations).
I have concatenated each recording into a single TS file using:
ffmpeg.exe -f concat -i $filelist -c copy -y $outputfile
From there, I need to perform edits to remove commercials, strip extra stuff from the start and end, and optionally extract each episode into a separate file.
I own Pinnacle Studio 23 Ultimate, that doesn't support TS as input so I'm converting TS to MP4 using something like:
ffmpeg -y -i foo.ts -crf 18 -ac 2 -r 25 -c:v libx265 -ar 48000 -b:a 192k -c:a aac -aspect 16:9 bar.mp4
(I've tried several ways/options, including using HandBrake for that conversion).
What happens is that in the resulting edited material, audio and video are out of sync. Can be in the whole file, or only in some sections.
This could be linked to glitches (missing frames...) in the original recording.
But when I play the original single-file TS, or the MP4 version, in any player such as VLC, audio and video are properly aligned. So these players are able to deal with the aforementioned glitches and "re-align" the audio and video streams.
How can I "rewrite" the whole input file in such a way that audio and video are "fully synchronized" so that editing will be possible?
Thanks in advance for your help.