[FFmpeg-user] align audio and video using PTS

Dave P lists.davep at gmail.com
Tue Sep 4 21:25:41 CEST 2012


On Sep 4, 2012 4:57 AM, "Rares Pop" <raresp at axz.ro> wrote:
>
> Fellow ffmpeg users,
>
> I have 2 TS files that have been split (by a vdr recorder): file1.ts and
file2.ts.
> file1.ts ends with x miliseconds of video that don't have audio packets
because they are actually at the beginning of file2.ts.
>
> How can I use ffmpeg to construct a synchronized file1 by taking the
missing audio from file2.ts ?
> I hope this could be done intelligently by using the PTS information in
each file, I just don't know how. Please bare in mind that x is variable
for every split.
>
> Your help would be greatly appreciated.
>
> Thanks for your time,
> Rares
>
On windows I would use "copy /b file1.ts+file2.ts file3.ts" and then use
ffmpeg to process file3.  I'm not sure of the bash equivalent. "xxd -b" ?


More information about the ffmpeg-user mailing list