Log in

View Full Version : No audio using MPEGDEC/MPEG2DEC3DG


Torsten Kobialka
24th February 2005, 08:46
Hi,

I have a TV-capture card recording MPEG2 (details below) and try to cut out the ads.
I tried simple scripts using MPEGDecoder as well as MPEG2DEC3DG, but I get no sound, only video.
Using DIRECTSHOW I only get sound, but no video.
Combining DIRECTSHOW and MPEG(2)SOURCE audio and video are not in sync. They start sync, but then (depending if I use MEPGDEC or MEP3DEC3DG) the video (?) is slower or faster then the audio. Same result if I use DVD2AVI to produce a seperate MPA-File and combine it using MPASOURCE.

How do I solve that ? Thanks in advance.

Feel free to bann this thread if answered already, but give me a hint, I couldn't find an answer in the FAQs etc.

Video: MPEG2 PAL 720x576 (4:3), 25 fps, YV12, progressiv (frame-based) BFF ?, 0% Film
Audio: MPEG 1 Layer2 44100 Hz 224 kbps
(CPU supports MMX ISSE SSE 3DNow 3DNow-Ext (AMD Athlon XP 2600+))

MPEGDECODER and MPEG2DEC3DG do not count the same frames nor video length using idential D2V-Files resulting in several frames difference for the same scene - in my case 250 frames difference for a 2 hours video. (MEPGDECODER and DVD2AVI produce more or less identical D2V-Files)

Guest
24th February 2005, 16:36
Mpeg2dec3dg is ancient. You should use the newest version, DGMPGDec 1.2.1.

To get your audio you have to pull down the Audio menu and select Demux All Tracks. Then later when you render the D2V in VirtualDub, you add the audio and set the offset in Audio/Interleaving/Audio Skew Correction.

MPEGDecoder does not honor the RFF flags, so if there is pulldown, there will be a big difference in the frame count.

Torsten Kobialka
24th February 2005, 22:35
Thanks. Using the newest suite I discovered: D2V-File is different, bigger. MPA-File seems the same as before.
My problem seems to last. I have the increasing delay (not a constant one, that could be solved with "DelayAudio" or "skew" in VirtualDub).

Still the video runs much faster, and therefore the delay is zero in the beginning (in sync) and then grows at the rate of approx. 0.2 sec per minute video. After 1 hour video delay is approx. 12 sec.

What do I wrong ?

Guest
25th February 2005, 00:42
Did you select Field Operation Raw? Don't do that.

After you run DGIndex, open the audio and get its total playing time. Then open the D2V in VirtualDub and use File Information to get its total playing time. What are they?

Torsten Kobialka
25th February 2005, 09:23
Field op is to "none"
Video (with DGDecode) reports to 1:59:08.160 (seems too short), 178704 frames
Audio reports to 1:59:59.920, which seems quite right, becauses I recorded 2 hours and players (e.g. WMP) also report length to be 2:00:00 of the original mpg.File.
(For my file framecounts, length etc. are the same in DGDecode as in MPEG2DEC3 by the way)

Guest
25th February 2005, 14:16
Try opening the MPEG video file directy in VirtualDub MPEG2 just to double check the frame count. If it is indeed short of frames, then your capture card must be dropping frames and not compensating for it.

jggimi
25th February 2005, 15:09
Typically, when capturing .avi, dropped frames cause a duplicate of the previous frame, rather than a missing frame. This is to avoid de-sync.

(I haven't captured with software MPEG-2 in so long, I can't recall exactly what happens on a dropped frame; I assume the previous frame is duplicated, but I wonder what happens to the GOP sequence. When I did capture in MPEG-2, I set my GOPs to 100% I-frames, so I never paid attention.)

Torsten Kobialka
26th February 2005, 17:45
After hours of trying and surfing (didn't eat and sleep;-):
Yes, its loosing frames, the video is (after processing with any MPEGdecoder I found) shorter than it should be. Nevertheless the originally captured file plays perfectly fine and synchronous in any MPEG2-capable SW-player.
Tried cutting with ULEAD Video Studio 8 SE DVD (as OEM version with my TV-capture card): Same result, audio and video are not synchronous any more. But unfortunately ULEAD gives no technical support for OEM-versions.
Tried compressing with testversion of DivX: Works perfect. They obviously can handle that effect.
Tried to analyse further with PVAStrumento: Can't fix the effect either (=video is still too short) and scrambles the audio completely. But analysis gives e.g.:
ALERT> Audio 1: 275 audio frames missing at 00:00:15.146
Re-syncing.
Closing starting GOP.
Aiming for sync at 00:00:15.146
Cutting audio.
Audio stream 1 now starts at 00:00:18.692
Video stream 1 now starts at 00:00:15.146
Catching up on audio 1: 24 silent frames.
Catching up on audio 1: 24 silent frames. ......more
It seems (to my humble understanding) that my MPEG2-encoder is not working correctly in terms of compensating for lost frames, but that does not bother players or e.g. the DivX-compressor (=there is a way to handle that). My MPEG2encoder does not allow for configuration of GOPs, I-frames and stuff like that.

I will try to forward that to the LeakTec-people that produce my capture card and software for caturing. I the meantime I try to use different codecs for caturing, or convert the whole thing to avi and cut it afterwards.
Nevertheless, if you find a solution, I would be glad to know.
Thanks for your effort !!