Log in

View Full Version : DVB-Captures in MeGUI: Audio not synchronous


landguy
4th December 2011, 17:30
Hello @all!
I'm new to the forum and I'm quite new in using MeGUI and I hope anybody can help me with my problem.

I'm capturing DVB-C via the Cinergy HTC USB XS to my PC. If the film is HD, I use TS-Doctor to cut.
Afterwards I want to encode the film with MeGUI to reduce the filesize. The encoding works fine, but after encoding and muxing the audio and video togehter, the audio is synchronous at the beginning of the film, but almost every time it is asynchronous at the end of the film. On one film e.g. the audio is 1.5sec "before" the video at the end of the film (runtime: 1hr50mins).

Here is the first part of the logs of the mentioned video (the rest is in the next post):
[Information] Log
-[Information] Versions
--[Information] [24.11.2011 20:51:34] MeGUI Version : 2050 (svn)
--[Information] [24.11.2011 20:51:34] OS : Windows Seven Premium Edition x64 SP1 (6.1.65536.7601)
--[Information] [24.11.2011 20:51:34] Latest .Net Framework installed : 4.0 (4.0.30319)
--[Information] [24.11.2011 20:51:34] Avisynth Version : 2.5.8.5 (21.12.2008 21:46:54)
-[Information] Update detection
--[Information] [24.11.2011 20:51:34] Connecting to server: http://megui.xvidvideo.ru/auto/stable/
--[Information] [24.11.2011 20:51:35] All files are up to date
-[Information] FileIndexer
--[Information] [24.11.2011 21:32:44] MediaInfo
---[Information] File: E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.ts
---[Information] General
----[Information] Format: MPEG-TS
----[Information] FormatString: MPEG-TS
----[Information] FileSize: 5003860640
----[Information] PlayTime: 01:50:12.987
---[Information] Video
----[Information] ID: 6110
----[Information] Width: 1280
----[Information] Height: 720
----[Information] FrameCount: 330645
----[Information] FrameRate: 50.000
----[Information] ScanType: Progressive
----[Information] Codec: AVC
----[Information] CodecString: AVC
----[Information] Format: AVC
----[Information] AspectRatio: 1.778
----[Information] AspectRatioString: 16:9
----[Information] Delay: 91419194.211
----[Information] Title:
----[Information] Language:
----[Information] LanguageString:
---[Information] Audio
----[Information] ID: 6120
----[Information] Format: MPEG Audio
----[Information] FormatProfile: Layer 2
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2:
----[Information] BitRateMode: CBR
----[Information] Delay: 91419369.333
----[Information] Title:
----[Information] Language: de
----[Information] LanguageString: German
---[Information] Audio
----[Information] ID: 6121
----[Information] Format: MPEG Audio
----[Information] FormatProfile: Layer 2
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2:
----[Information] BitRateMode: CBR
----[Information] Delay: 91419374.722
----[Information] Title:
----[Information] Language: 001
----[Information] LanguageString: 001
-[Information] Log for job5 (video, Beate Uhse - Das Recht auf Liebe_unkomprimiert.avs -> )
--[Information] [24.11.2011 21:42:02] Started handling job
--[Information] [24.11.2011 21:42:02] Preprocessing
--[Information] [24.11.2011 21:42:02] Avisynth input script
---[NoImage] DirectShowSource("E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.ts", fps=50.000, audio=true, convertfps=true).AssumeFPS(50,1)
---[NoImage] #deinterlace
---[NoImage] crop( 2, 2, -2, -2)
---[NoImage] Spline36Resize(1280,720) # Spline36 (Neutral)
---[NoImage] LoadPlugin("C:\Program Files (x86)\meGUI\tools\avisynth_plugin\UnDot.dll")
---[NoImage] Undot() # Minimal Noise
---[NoImage] ConvertToYV12()
--[Information] [24.11.2011 21:42:05] Job commandline: "C:\Program Files (x86)\meGUI\tools\x264\x264.exe" --preset slower --pass 1 --bitrate 2500 --stats "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.stats" --sar 1:1 --output NUL "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.avs"
--[Information] [24.11.2011 21:42:05] Encoding started
--[Information] [25.11.2011 07:48:17] Standard output stream
--[Information] [25.11.2011 07:48:17] Standard error stream
---[NoImage] avs [info]: 1280x720p 1:1 @ 50/1 fps (cfr)
---[NoImage] x264 [info]: using SAR=1/1
---[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
---[NoImage] x264 [info]: profile Main, level 3.2
---[NoImage]
---[NoImage] x264 [info]: frame I:2190 Avg QP:15.60 size: 66747
---[NoImage] x264 [info]: frame P:86136 Avg QP:18.82 size: 16368
---[NoImage] x264 [info]: frame B:242317 Avg QP:19.99 size: 2126
---[NoImage] x264 [info]: consecutive B-frames: 1.5% 1.7% 2.1% 94.7%
---[NoImage] x264 [info]: mb I I16..4: 33.3% 0.0% 66.7%
---[NoImage] x264 [info]: mb P I16..4: 19.5% 0.0% 0.0% P16..4: 60.9% 0.0% 0.0% 0.0% 0.0% skip:19.6%
---[NoImage] x264 [info]: mb B I16..4: 0.9% 0.0% 0.0% B16..8: 15.3% 0.0% 0.0% direct: 7.7% skip:76.2% L0:25.1% L1:64.3% BI:10.6%
---[NoImage] x264 [info]: final ratefactor: 18.12
---[NoImage] x264 [info]: direct mvs spatial:100.0% temporal:0.0%
---[NoImage] x264 [info]: coded y,uvDC,uvAC intra: 31.8% 54.2% 13.9% inter: 7.5% 11.8% 0.1%
---[NoImage] x264 [info]: i16 v,h,dc,p: 51% 22% 18% 9%
---[NoImage] x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 21% 16% 3% 8% 6% 6% 6% 6%
---[NoImage] x264 [info]: i8c dc,h,v,p: 53% 20% 24% 4%
---[NoImage] x264 [info]: Weighted P-Frames: Y:2.0% UV:0.9%
---[NoImage] x264 [info]: kb/s:2505.53
---[NoImage] encoded 330643 frames, 9.09 fps, 2505.53 kb/s
--[Information] [25.11.2011 07:48:18] Postprocessing
---[Information] Deleting intermediate files
--[Information] [25.11.2011 07:48:18] Job completed
-[Information] Log for job6 (video, Beate Uhse - Das Recht auf Liebe_unkomprimiert.avs -> Beate Uhse - Das Recht auf Liebe_komprimiert.mkv)
--[Information] [25.11.2011 07:48:18] Started handling job
--[Information] [25.11.2011 07:48:18] Preprocessing
--[Information] [25.11.2011 07:48:18] Avisynth input script
---[NoImage] DirectShowSource("E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.ts", fps=50.000, audio=true, convertfps=true).AssumeFPS(50,1)
---[NoImage] #deinterlace
---[NoImage] crop( 2, 2, -2, -2)
---[NoImage] Spline36Resize(1280,720) # Spline36 (Neutral)
---[NoImage] LoadPlugin("C:\Program Files (x86)\meGUI\tools\avisynth_plugin\UnDot.dll")
---[NoImage] Undot() # Minimal Noise
---[NoImage] ConvertToYV12()
--[Information] [25.11.2011 07:48:23] Job commandline: "C:\Program Files (x86)\meGUI\tools\x264\x264.exe" --preset slower --pass 2 --bitrate 2500 --stats "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.stats" --sar 1:1 --output "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.mkv" "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.avs"
--[Information] [25.11.2011 07:48:23] Encoding started
--[Information] [25.11.2011 22:29:42] Standard output stream
--[Information] [25.11.2011 22:29:42] Standard error stream
---[NoImage] avs [info]: 1280x720p 1:1 @ 50/1 fps (cfr)
---[NoImage] x264 [info]: using SAR=1/1
---[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
---[NoImage] x264 [info]: profile High, level 4.0
---[NoImage]
---[NoImage] x264 [info]: frame I:2190 Avg QP:16.34 size: 60557
---[NoImage] x264 [info]: frame P:86136 Avg QP:19.42 size: 16241
---[NoImage] x264 [info]: frame B:242317 Avg QP:20.78 size: 2208
---[NoImage] x264 [info]: consecutive B-frames: 1.5% 1.7% 2.1% 94.7%
---[NoImage] x264 [info]: mb I I16..4: 15.9% 71.1% 13.0%
---[NoImage] x264 [info]: mb P I16..4: 4.4% 5.6% 0.5% P16..4: 55.3% 13.7% 2.2% 0.2% 0.0% skip:18.1%
---[NoImage] x264 [info]: mb B I16..4: 0.1% 0.1% 0.0% B16..8: 27.5% 1.8% 0.3% direct: 1.7% skip:68.6% L0:31.2% L1:65.0% BI: 3.8%
---[NoImage] x264 [info]: 8x8 transform intra:56.3% inter:70.2%
---[NoImage] x264 [info]: direct mvs spatial:94.3% temporal:5.7%
---[NoImage] x264 [info]: coded y,uvDC,uvAC intra: 49.8% 59.8% 19.4% inter: 8.1% 12.3% 0.2%
---[NoImage] x264 [info]: i16 v,h,dc,p: 51% 16% 8% 25%
---[NoImage] x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 10% 12% 8% 11% 13% 11% 11% 10%
---[NoImage] x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 11% 7% 7% 12% 13% 11% 10% 9%
---[NoImage] x264 [info]: i8c dc,h,v,p: 39% 28% 24% 9%
---[NoImage] x264 [info]: Weighted P-Frames: Y:2.0% UV:0.9%
---[NoImage] x264 [info]: ref P L0: 51.4% 10.6% 16.9% 6.9% 4.6% 3.5% 3.2% 2.8% 0.1% 0.0%
---[NoImage] x264 [info]: ref B L0: 82.4% 9.9% 3.5% 1.6% 1.1% 0.9% 0.6%
---[NoImage] x264 [info]: ref B L1: 97.7% 2.3%
---[NoImage] x264 [info]: kb/s:2500.09
---[NoImage] encoded 330643 frames, 6.26 fps, 2500.09 kb/s
--[Information] Final statistics
---[Information] [25.11.2011 22:29:45] Video Bitrate Desired: 2500 kbit/s
---[Information] [25.11.2011 22:29:45] Video Bitrate Obtained (approximate): 2503 kbit/s
--[Information] [25.11.2011 22:29:45] MediaInfo
---[Information] File: E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.mkv
---[Information] General
----[Information] Format: Matroska
----[Information] FormatString: Matroska
----[Information] FileSize: 2068999884
----[Information] PlayTime: 01:50:12.860
---[Information] Video
----[Information] ID: 1
----[Information] Width: 1280
----[Information] Height: 720
----[Information] FrameCount: 330643
----[Information] FrameRate: 50.000
----[Information] ScanType: Progressive
----[Information] Codec: V_MPEG4/ISO/AVC
----[Information] CodecString: AVC
----[Information] Format: AVC
----[Information] AspectRatio: 1.778
----[Information] AspectRatioString: 16:9
----[Information] Delay: 0
----[Information] Title:
----[Information] Language: en
----[Information] LanguageString: English
--[Information] [25.11.2011 22:29:45] Postprocessing
---[Information] Deleting intermediate files
----[Information] [25.11.2011 22:29:45] Successfully deleted E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.stats
----[Information] [25.11.2011 22:29:45] Successfully deleted E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.stats.mbtree
--[Information] [25.11.2011 22:29:45] Job completed
-[Information] FileIndexer
--[Information] [25.11.2011 21:58:19] MediaInfo
---[Information] File: E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.ts
---[Information] General
----[Information] Format: MPEG-TS
----[Information] FormatString: MPEG-TS
----[Information] FileSize: 5003860640
----[Information] PlayTime: 01:50:12.987
---[Information] Video
----[Information] ID: 6110
----[Information] Width: 1280
----[Information] Height: 720
----[Information] FrameCount: 330645
----[Information] FrameRate: 50.000
----[Information] ScanType: Progressive
----[Information] Codec: AVC
----[Information] CodecString: AVC
----[Information] Format: AVC
----[Information] AspectRatio: 1.778
----[Information] AspectRatioString: 16:9
----[Information] Delay: 91419194.211
----[Information] Title:
----[Information] Language:
----[Information] LanguageString:
---[Information] Audio
----[Information] ID: 6120
----[Information] Format: MPEG Audio
----[Information] FormatProfile: Layer 2
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2:
----[Information] BitRateMode: CBR
----[Information] Delay: 91419369.333
----[Information] Title:
----[Information] Language: de
----[Information] LanguageString: German
---[Information] Audio
----[Information] ID: 6121
----[Information] Format: MPEG Audio
----[Information] FormatProfile: Layer 2
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2:
----[Information] BitRateMode: CBR
----[Information] Delay: 91419374.722
----[Information] Title:
----[Information] Language: 001
----[Information] LanguageString: 001
---[Information] Audio
----[Information] ID: 6122
----[Information] Format: AC-3
----[Information] FormatProfile:
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2: 2/0/0
----[Information] BitRateMode: CBR
----[Information] Delay: 91419211.467
----[Information] Title:
----[Information] Language:
----[Information] LanguageString:
---[Information] Audio
----[Information] ID: 6123
----[Information] Format: MPEG Audio
----[Information] FormatProfile: Layer 2
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2:
----[Information] BitRateMode: CBR
----[Information] Delay: 91419351.100
----[Information] Title:
----[Information] Language: 002
----[Information] LanguageString: 002
-[Information] Log for job4 (idx, Beate Uhse - Das Recht auf Liebe_unkomprimiert.ts -> Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga)
--[Information] [25.11.2011 21:59:32] Started handling job
--[Information] [25.11.2011 21:59:32] Preprocessing
--[Information] [25.11.2011 21:59:32] Job commandline: "C:\Program Files (x86)\meGUI\tools\dgavcindex\dgavcindex.exe" -i "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.ts" -o "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga" -e -h -a
--[Information] [25.11.2011 21:59:32] Indexing started
--[Information] [25.11.2011 22:02:27] Standard output stream
--[Information] [25.11.2011 22:02:27] Standard error stream
---[NoImage] Warning: no active SPS, timing SEI cannot be parsed
---[NoImage] Warning: no active SPS, timing SEI cannot be parsed
---[NoImage] Warning: no active SPS, timing SEI cannot be parsed
--[Information] [25.11.2011 22:02:29] MediaInfo
---[Information] File: E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga
---[Information] General
----[Information] Format:
----[Information] FormatString:
----[Information] FileSize: 7500055
----[Information] PlayTime:
--[Information] [25.11.2011 22:02:29] Postprocessing
---[Information] Deleting intermediate files
----[Information] [25.11.2011 22:02:29] Successfully deleted E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.log
--[Information] [25.11.2011 22:02:29] Job completed

Does anybody has any suggestions?
A big "Thank you!" for reading my post!

landguy
4th December 2011, 17:32
The 2nd part of the logs:
[Information] Log
-[Information] Versions
--[Information] [25.11.2011 22:39:02] MeGUI Version : 2050 (svn)
--[Information] [25.11.2011 22:39:02] OS : Windows Seven Premium Edition x64 SP1 (6.1.65536.7601)
--[Information] [25.11.2011 22:39:02] Latest .Net Framework installed : 4.0 (4.0.30319)
--[Information] [25.11.2011 22:39:02] Avisynth Version : 2.5.8.5 (21.12.2008 21:46:54)
-[Information] Update detection
--[Information] [25.11.2011 22:39:02] Connecting to server: http://megui.xvidvideo.ru/auto/stable/
--[Information] [25.11.2011 22:39:03] All files are up to date
-[Information] Log for job11 (audio, Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 156ms.mp2 -> Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 0ms.mp3)
--[Information] [26.11.2011 08:34:15] Started handling job
--[Information] [26.11.2011 08:34:15] Preprocessing
--[Information] [26.11.2011 08:34:15] MediaInfo
---[Information] File: E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 156ms.mp2
---[Information] General
----[Information] Format: MPEG Audio
----[Information] FormatString: MPEG Audio
----[Information] FileSize: 158682214
----[Information] PlayTime: 01:50:11.758
---[Information] Audio
----[Information] ID:
----[Information] Format: MPEG Audio
----[Information] FormatProfile: Layer 2
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2:
----[Information] BitRateMode: CBR
----[Information] Delay:
----[Information] Title:
----[Information] Language:
----[Information] LanguageString:
--[Information] [26.11.2011 08:34:15] Trying to open the file with NicAudio
--[Information] [26.11.2011 08:34:40] Successfully opened the file with NicAudio
--[Information] [26.11.2011 08:34:40] ignoring downmix as there are only 2 channels
--[Information] [26.11.2011 08:34:40] Avisynth script
---[NoImage] LoadPlugin("C:\Program Files (x86)\meGUI\tools\avisynth_plugin\NicAudio.dll")
---[NoImage] NicMPG123Source("E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 156ms.mp2")
---[NoImage] DelayAudio(156.0/1000.0)
---[NoImage] # detected channels: 2 channels
---[NoImage] # detected channel positions:
---[NoImage] Normalize()
---[NoImage] 32==Audiobits(last)?ConvertAudioTo16bit(last):last
---[NoImage] return last
---[NoImage] # 5.1 Channels L,R,C,LFE,SL,SR -> stereo + LFE
---[NoImage] function c6_stereo(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] lf = GetChannel(a, 4)
---[NoImage] sl = GetChannel(a, 5)
---[NoImage] sr = GetChannel(a, 6)
---[NoImage] fl_sl = MixAudio(fl, sl, 0.2929, 0.2929)
---[NoImage] fr_sr = MixAudio(fr, sr, 0.2929, 0.2929)
---[NoImage] fc_lf = MixAudio(fc, lf, 0.2071, 0.2071)
---[NoImage] l = MixAudio(fl_sl, fc_lf, 1.0, 1.0)
---[NoImage] r = MixAudio(fr_sr, fc_lf, 1.0, 1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 5 Channels L,R,C,SL,SR or L,R,LFE,SL,SR-> Stereo
---[NoImage] function c5_stereo(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] sl = GetChannel(a, 4)
---[NoImage] sr = GetChannel(a, 5)
---[NoImage] fl_sl = MixAudio(fl, sl, 0.3694, 0.3694)
---[NoImage] fr_sr = MixAudio(fr, sr, 0.3694, 0.3694)
---[NoImage] l = MixAudio(fl_sl, fc, 1.0, 0.2612)
---[NoImage] r = MixAudio(fr_sr, fc, 1.0, 0.2612)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 5 Channels L,R,C,LFE,S -> Stereo
---[NoImage] function c52_stereo(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] lf = GetChannel(a, 4)
---[NoImage] bc = GetChannel(a, 5)
---[NoImage] fl_bc = MixAudio(fl, bc, 0.3205, 0.2265)
---[NoImage] fr_bc = MixAudio(fr, bc, 0.3205, 0.2265)
---[NoImage] fc_lf = MixAudio(fc, lf, 0.2265, 0.2265)
---[NoImage] l = MixAudio(fl_bc, fc_lf, 1.0, 1.0)
---[NoImage] r = MixAudio(fr_bc, fc_lf, 1.0, 1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 4 Channels Quadro L,R,SL,SR -> Stereo
---[NoImage] function c4_stereo(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] sl = GetChannel(a, 3)
---[NoImage] sr = GetChannel(a, 4)
---[NoImage] l = MixAudio(fl, sl, 0.5, 0.5)
---[NoImage] r = MixAudio(fr, sr, 0.5, 0.5)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 4 Channels L,R,C,LFE or L,R,S,LFE or L,R,C,S -> Stereo
---[NoImage] function c42_stereo(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] lf = GetChannel(a, 4)
---[NoImage] fc_lf = MixAudio(fc, lf, 0.2929, 0.2929)
---[NoImage] l = MixAudio(fl, fc_lf, 0.4142, 1.0)
---[NoImage] r = MixAudio(fr, fc_lf, 0.4142, 1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 3 Channels L,R,C or L,R,S or L,R,LFE -> Stereo
---[NoImage] function c3_stereo(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] l = MixAudio(fl, fc, 0.5858, 0.4142)
---[NoImage] r = MixAudio(fr, fc, 0.5858, 0.4142)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 5.1 Channels L,R,C,LFE,SL,SR -> Dolby ProLogic
---[NoImage] function c6_dpl(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] sl = GetChannel(a, 5)
---[NoImage] sr = GetChannel(a, 6)
---[NoImage] bc = MixAudio(sl, sr, 0.2265, 0.2265)
---[NoImage] fl_fc = MixAudio(fl, fc, 0.3205, 0.2265)
---[NoImage] fr_fc = MixAudio(fr, fc, 0.3205, 0.2265)
---[NoImage] l = MixAudio(fl_fc, bc, 1.0, 1.0)
---[NoImage] r = MixAudio(fr_fc, bc, 1.0, -1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 5 Channels L,R,C,SL,SR -> Dolby ProLogic
---[NoImage] function c5_dpl(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] sl = GetChannel(a, 4)
---[NoImage] sr = GetChannel(a, 5)
---[NoImage] bc = MixAudio(sl, sr, 0.2265, 0.2265)
---[NoImage] fl_fc = MixAudio(fl, fc, 0.3205, 0.2265)
---[NoImage] fr_fc = MixAudio(fr, fc, 0.3205, 0.2265)
---[NoImage] l = MixAudio(fl_fc, bc, 1.0, 1.0)
---[NoImage] r = MixAudio(fr_fc, bc, 1.0, -1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 5 Channels L,R,LFE,SL,SR -> Dolby ProLogic
---[NoImage] function c52_dpl(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] sl = GetChannel(a, 4)
---[NoImage] sr = GetChannel(a, 5)
---[NoImage] bc = MixAudio(sl, sr, 0.2929, 0.2929)
---[NoImage] l = MixAudio(fl, bc, 0.4142, 1.0)
---[NoImage] r = MixAudio(fr, bc, 0.4142, -1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 5 Channels L,R,C,LFE,S -> Dolby ProLogic
---[NoImage] function c53_dpl(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] bc = GetChannel(a, 5)
---[NoImage] fl_fc = MixAudio(fl, fc, 0.4142, 0.2929)
---[NoImage] fr_fc = MixAudio(fr, fc, 0.4142, 0.2929)
---[NoImage] l = MixAudio(fl_fc, bc, 1.0, 0.2929)
---[NoImage] r = MixAudio(fr_fc, bc, 1.0, -0.2929)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 4 Channels Quadro L,R,SL,SR -> Dolby ProLogic
---[NoImage] function c4_dpl(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] sl = GetChannel(a, 3)
---[NoImage] sr = GetChannel(a, 4)
---[NoImage] bc = MixAudio(sl, sr, 0.2929, 0.2929)
---[NoImage] l = MixAudio(fl, bc, 0.4142, 1.0)
---[NoImage] r = MixAudio(fr, bc, 0.4142, -1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 4 Channels L,R,LFE,S -> Dolby ProLogic
---[NoImage] function c42_dpl(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] bc = GetChannel(a, 4)
---[NoImage] l = MixAudio(fl, bc, 0.5858, 0.4142)
---[NoImage] r = MixAudio(fr, bc, 0.5858, -0.4142)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 4 Channels L,R,C,S -> Dolby ProLogic
---[NoImage] function c43_dpl(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] bc = GetChannel(a, 4)
---[NoImage] fl_fc = MixAudio(fl, fc, 0.4142, 0.2929)
---[NoImage] fr_fc = MixAudio(fr, fc, 0.4142, 0.2929)
---[NoImage] l = MixAudio(fl_fc, bc, 1.0, 0.2929)
---[NoImage] r = MixAudio(fr_fc, bc, 1.0, -0.2929)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 3 Channels L,R,S -> Dolby ProLogic
---[NoImage] function c3_dpl(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] bc = GetChannel(a, 3)
---[NoImage] l = MixAudio(fl, bc, 0.5858, 0.4142)
---[NoImage] r = MixAudio(fr, bc, 0.5858, -0.4142)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 5.1 Channels L,R,C,LFE,SL,SR -> Dolby ProLogic II
---[NoImage] function c6_dpl2(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] sl = GetChannel(a, 5)
---[NoImage] sr = GetChannel(a, 6)
---[NoImage] ssl = MixAudio(sl, sr, 0.2818, 0.1627)
---[NoImage] ssr = MixAudio(sl, sr, -0.1627, -0.2818)
---[NoImage] fl_fc = MixAudio(fl, fc, 0.3254, 0.2301)
---[NoImage] fr_fc = MixAudio(fr, fc, 0.3254, 0.2301)
---[NoImage] l = MixAudio(fl_fc, ssl, 1.0, 1.0)
---[NoImage] r = MixAudio(fr_fc, ssr, 1.0, 1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 5 Channels L,R,C,SL,SR -> Dolby ProLogic II
---[NoImage] function c5_dpl2(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] fc = GetChannel(a, 3)
---[NoImage] sl = GetChannel(a, 4)
---[NoImage] sr = GetChannel(a, 5)
---[NoImage] ssl = MixAudio(sl, sr, 0.2818, 0.1627)
---[NoImage] ssr = MixAudio(sl, sr, -0.1627, -0.2818)
---[NoImage] fl_fc = MixAudio(fl, fc, 0.3254, 0.2301)
---[NoImage] fr_fc = MixAudio(fr, fc, 0.3254, 0.2301)
---[NoImage] l = MixAudio(fl_fc, ssl, 1.0, 1.0)
---[NoImage] r = MixAudio(fr_fc, ssr, 1.0, 1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 5 Channels L,R,LFE,SL,SR -> Dolby ProLogic II
---[NoImage] function c52_dpl2(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] sl = GetChannel(a, 4)
---[NoImage] sr = GetChannel(a, 5)
---[NoImage] ssl = MixAudio(sl, sr, 0.3714, 0.2144)
---[NoImage] ssr = MixAudio(sl, sr, -0.2144, -0.3714)
---[NoImage] l = MixAudio(fl, ssl, 0.4142, 1.0)
---[NoImage] r = MixAudio(fr, ssr, 0.4142, 1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
---[NoImage] # 4 Channels Quadro L,R,SL,SR -> Dolby ProLogic II
---[NoImage] function c4_dpl2(clip a)
---[NoImage] {
---[NoImage] fl = GetChannel(a, 1)
---[NoImage] fr = GetChannel(a, 2)
---[NoImage] sl = GetChannel(a, 3)
---[NoImage] sr = GetChannel(a, 4)
---[NoImage] ssl = MixAudio(sl, sr, 0.3714, 0.2144)
---[NoImage] ssr = MixAudio(sl, sr, -0.2144, -0.3714)
---[NoImage] l = MixAudio(fl, ssl, 0.4142, 1.0)
---[NoImage] r = MixAudio(fr, ssr, 0.4142, 1.0)
---[NoImage] return MergeChannels(l, r)
---[NoImage] }
--[Information] [26.11.2011 08:34:40] Commandline used: --abr 128 -h - "{0}"
--[Information] [26.11.2011 08:34:41] Encoding started
--[Information] [26.11.2011 08:34:41] Avisynth script environment opened
--[Information] [26.11.2011 08:34:45] Script loaded
--[Information] Output Decoder
---[Information] [26.11.2011 08:34:45] Channels: 2
---[Information] [26.11.2011 08:34:45] Bits per sample: 16
---[Information] [26.11.2011 08:34:45] Sample rate: 48000
--[Information] [26.11.2011 08:34:45] Commandline: C:\Program Files (x86)\meGUI\tools\lame\lame.exe --abr 128 -h - "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 0ms.mp3"
--[Information] [26.11.2011 08:34:45] Encoder process started
--[Information] [26.11.2011 09:02:06] Output from encoder via stderr
---[NoImage] LAME 3.98.4 32bits (http://www.mp3dev.org/)
---[NoImage] CPU features: MMX (ASM used), SSE (ASM used), SSE2
---[NoImage] Using polyphase lowpass filter, transition band: 16452 Hz - 17032 Hz
---[NoImage] Encoding <stdin>
---[NoImage] to E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 0ms.mp3
---[NoImage] Encoding as 48 kHz j-stereo MPEG-1 Layer III (12x) average 128 kbps qval=2
--[Information] [26.11.2011 09:02:06] MediaInfo
---[Information] File: E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 0ms.mp3
---[Information] General
----[Information] Format: MPEG Audio
----[Information] FormatString: MPEG Audio
----[Information] FileSize: 89470224
----[Information] PlayTime: 01:50:11.723
---[Information] Audio
----[Information] ID:
----[Information] Format: MPEG Audio
----[Information] FormatProfile: Layer 3
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2:
----[Information] BitRateMode: VBR
----[Information] Delay:
----[Information] Title:
----[Information] Language:
----[Information] LanguageString:
--[Information] [26.11.2011 09:02:06] Postprocessing
---[Information] Deleting intermediate files
----[Information] [26.11.2011 09:02:06] Successfully deleted E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 156ms.mp2.d2a
--[Information] [26.11.2011 09:02:07] Job completed

landguy
4th December 2011, 17:33
And the last part:

[Information] Log
-[Information] Versions
--[Information] [26.11.2011 11:41:57] MeGUI Version : 2050 (svn)
--[Information] [26.11.2011 11:41:57] OS : Windows Seven Premium Edition x64 SP1 (6.1.65536.7601)
--[Information] [26.11.2011 11:41:57] Latest .Net Framework installed : 4.0 (4.0.30319)
--[Information] [26.11.2011 11:41:57] Avisynth Version : 2.5.8.5 (21.12.2008 21:46:54)
-[Information] Update detection
--[Information] [26.11.2011 11:41:57] Connecting to server: http://megui.xvidvideo.ru/auto/stable/
--[Information] [26.11.2011 11:41:58] All files are up to date
-[Information] Log for job1 (mux, Beate Uhse - Das Recht auf Liebe_komprimiert.mkv -> Beate Uhse - Das Recht auf Liebe.mkv)
--[Information] [26.11.2011 11:46:51] Started handling job
--[Information] [26.11.2011 11:46:51] Preprocessing
--[Information] [26.11.2011 11:46:51] MediaInfo
---[Information] File: E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.mkv
---[Information] General
----[Information] Format: Matroska
----[Information] FormatString: Matroska
----[Information] FileSize: 2068999884
----[Information] PlayTime: 01:50:12.860
---[Information] Video
----[Information] ID: 1
----[Information] Width: 1280
----[Information] Height: 720
----[Information] FrameCount: 330643
----[Information] FrameRate: 50.000
----[Information] ScanType: Progressive
----[Information] Codec: V_MPEG4/ISO/AVC
----[Information] CodecString: AVC
----[Information] Format: AVC
----[Information] AspectRatio: 1.778
----[Information] AspectRatioString: 16:9
----[Information] Delay: 0
----[Information] Title:
----[Information] Language: en
----[Information] LanguageString: English
--[Information] [26.11.2011 11:46:51] MediaInfo
---[Information] File: E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 0ms.mp3
---[Information] General
----[Information] Format: MPEG Audio
----[Information] FormatString: MPEG Audio
----[Information] FileSize: 89470224
----[Information] PlayTime: 01:50:11.723
---[Information] Audio
----[Information] ID:
----[Information] Format: MPEG Audio
----[Information] FormatProfile: Layer 3
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2:
----[Information] BitRateMode: VBR
----[Information] Delay:
----[Information] Title:
----[Information] Language:
----[Information] LanguageString:
--[Information] [26.11.2011 11:46:51] Job commandline: "C:\Program Files (x86)\meGUI\tools\mkvmerge\mkvmerge.exe" -o "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe.mkv" --engage keep_bitstream_ar_info --default-duration 1:50fps "--compression" "1:none" -d 1 --no-chapters -A -S "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.mkv" --language 0:ger --track-name "0:MP3" "--compression" "0:none" -a 0 --no-chapters -D -S "E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 0ms.mp3" --ui-language en
--[Information] [26.11.2011 11:46:51] Muxing started
--[Information] [26.11.2011 11:48:42] Standard output stream
---[NoImage] mkvmerge v4.9.1 ('Ich will') built on Jul 11 2011 23:53:15
---[NoImage] 'E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.mkv': Using the Matroska demultiplexer.
---[NoImage] 'E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 0ms.mp3': Using the MP2/MP3 demultiplexer.
---[NoImage] 'E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_komprimiert.mkv' track 1: Using the MPEG-4 part 10 (AVC) video output module.
---[NoImage] 'E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe_unkomprimiert.dga PID 17eb L2 2ch 48 192 DELAY 0ms.mp3' track 0: Using the MPEG audio output module.
---[NoImage] The file 'E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe.mkv' has been opened for writing.
---[NoImage] The cue entries (the index) are being written...
---[NoImage] Muxing took 108 seconds.
--[Information] [26.11.2011 11:48:42] Standard error stream
--[Information] [26.11.2011 11:48:42] MediaInfo
---[Information] File: E:\Videos\Filme\Megui\Beate Uhse - Das Recht auf Liebe.mkv
---[Information] General
----[Information] Format: Matroska
----[Information] FormatString: Matroska
----[Information] FileSize: 2159068885
----[Information] PlayTime: 01:50:12.860
---[Information] Video
----[Information] ID: 1
----[Information] Width: 1280
----[Information] Height: 720
----[Information] FrameCount: 330643
----[Information] FrameRate: 50.000
----[Information] ScanType: Progressive
----[Information] Codec: V_MPEG4/ISO/AVC
----[Information] CodecString: AVC
----[Information] Format: AVC
----[Information] AspectRatio: 1.778
----[Information] AspectRatioString: 16:9
----[Information] Delay: 0
----[Information] Title:
----[Information] Language: en
----[Information] LanguageString: English
---[Information] Audio
----[Information] ID: 2
----[Information] Format: MPEG Audio
----[Information] FormatProfile: Layer 3
----[Information] FormatSettingsSBR:
----[Information] FormatSettingsPS:
----[Information] SamplingRate: 48000
----[Information] SamplingRateString: 48.0 KHz
----[Information] Channels: 2
----[Information] ChannelsString: 2 channels
----[Information] ChannelPositionsString2:
----[Information] BitRateMode: VBR
----[Information] Delay: 0
----[Information] Title: MP3
----[Information] Language: de
----[Information] LanguageString: German
--[Information] [26.11.2011 11:48:43] Postprocessing
---[Information] Deleting intermediate files
--[Information] [26.11.2011 11:48:43] Job completed

tebasuna51
4th December 2011, 21:10
Your video PlayTime: 01:50:12.987
Your audio PlayTime: 01:50:11.758

Seems you lose audio frames in capture or TS-Doctor cut process.

Ghitulescu
4th December 2011, 22:43
DVB recordings always have huge (compared to DVD) delays, sometimes up to 1.5 seconds. But this should be constant as PAL doesn't have the DF issue.
If the audio is lost during the processing, then you should note a sudden delay, where each audio frame is missing. Unfortunatelly few people can sense lipsynch errors under 40ms.
Is there any log of TS-doctor?

tebasuna51
5th December 2011, 11:14
I suppose the initial "DELAY 156ms" was well calculated by Dgavcindex because:
"the audio is synchronous at the beginning of the film"

But "it is asynchronous at the end of the film" only can be justified with missing audio frames.

Sometimes (not always) I get good results using eac3to to extract video (to mkv) and audio from .ts.
eac3to try to correct the missing audio frames (gaps) with timestamps in .ts, at least we have (in eac3to log) the problematic cut points to correct them after manually.

This job must be do here by TS-Doctor then, I agree with Ghitulescu, the log can help to solve the problem.

We can conclude than isn't a MeGUI problem (all the log show than run without errors), must be solved in previous process.