It appears to me that depending on the broadcast quality of the stream, some demuxers do the job better than others. Sometimes I have to use vdrsync, and sometimes its project-x, but I have never been able to find a demuxer that works all the time on every recording. Vdrsync will most often drop the audio stream if it finds many audio gaps in the recording (most certainly related to cutting and editing within vdr). It is safe to assume that about 100ms of audio is lost per cut in vdr. After some testing, I have been able to use lve-050112.src.tar.bz2 to demux and create perfect A/V sync in mpg vobs for DVD creation. The combination of libdvbmegtools (0.5.5.1) used to convert VDRs PES to a PS stream is also a critical step.
mkfifo file.m2v file.mpa cat 00*.vdr|pes2ts2 100 101|ts2ps 100 101 > file.ps lvedemux file.ps | lvemux -p -1 -r -sh -400 -v file.m2v -a file.mpa -o file.mpg
The following command gets perfect sync on a recording with 4 cuts (note the 400ms timeshift to compensate for the lost audio frames. What would be cool is to have the ability to detect the number of cuts in a recording to automatically adjust for the audio loss to create better A/V sync (if we can agree on an average frame loss per cut). Some other methods of demuxing, including mencoder and vlc, seem to do the job as well, but the A/V sync is off when several cuts have been made (and transcoding does not help). It seems the only method that really works all the time is to count the cutmarks and adjust the timeshift accordingly (~100ms per cut).
Best Regards, C.Y.M.
C.Y.M wrote:
What would be cool is to have the ability to detect the number of cuts in a recording to automatically adjust for the audio loss to create better A/V sync
I usually let VDR keep recording fragments in separate files, so each break corresponds to one file change. To get mpeg2 material, I demux each part separately using ProjectX (use file collections) and do a final frame-precise re-cut with Cuttermaran (unfortunately .NET only).
On the other hand, I never had sync problems on demuxing, PX always filled the gaps quite well.
Cheers,
Udo
Udo Richter wrote:
On the other hand, I never had sync problems on demuxing, PX always filled the gaps quite well.
PX does have the ability to keep good sync, but, when it fills in the audio gaps after dropping frames, thats when I wind up having lots of skips during playback. Also, PX does not work for me all the time.. Sometimes I am forced to use vdrsync when PX fails. Im mainly trying to find a solution that will work 99% of the time with good sync. I have a feeling that most of my problems are due to using NTSC vs. PAL. PX is a great tool but it is definitly optimized for PAL and I need a stable solution for NTSC if possible.
Best Regards, C.Y.M.