Log in

View Full Version : Help, script dropping frames


lbecque
27th May 2005, 06:00
I'm trying to convert a 4:3 aspect ratio file saved with my tuner card to a true widescreen format while removing the black bars in the file.
I generated the following script with FitCD:

# -= AviSynth v2.5.5.0 script by FitCD v1.2.4 =-
DirectShowSource("D:\movies\Battlestar Galactica 106 Litmus 0513-2200(TV65).mpg", fps=29.97)
#ConvertToYV12(a , interlaced=true)
SeparateFields()
Lanczos4Resize(720,240,0,29,720,180).Weave()
#info()
#Trim(0,-1).FadeOut(150)

The file is an MPEG2 program stream (video and audio), interlaced and BFF. The script above seems to do the job of resizing the video in the widescreen format that I need.

However, when I play the file through virtualdubmod strange things happen:
1. the video and audio are out of sync (video much faster)
2. video plays at something like 2X speed or more
3. using virtualdub to play and compare to the original file I noted that there where 1200 frames taking 41 seconds to the beginning of a certain scene in the original file. In the resulting file its only 450 frames and 15 seconds to the same scene.

What am I doing wrong???
Why is avisynth dropping frames???

communist
27th May 2005, 14:28
I'm not sure but I think your DShow decoder is screwing things up in combination with AviSynth. You're best of using DGMPGDec when feeding MPEG files into AviSynth.
http://neuron2.net/dgmpgdec/dgmpgdec.html

lbecque
28th May 2005, 12:35
You were right.
I switched to using DGDecode.dll that was part of dgmpgdec130 and it works now. I get all the frames.

Only there are a couple of new problems:
1. I don't get any audio
2. seeking or going back and forth a few frames in virtual dub doesn't work. I can only play the video in virtual dub.

Should I try the audiodub command in my .avs?
Or
Would I be better off using MPEG2Dec3.dll instead?

Guest
28th May 2005, 13:42
Originally posted by lbecque
1. I don't get any audioYou have to demux it using the Audio menu of DGIndex and then load it using VirtualDub.

2. seeking or going back and forth a few frames in virtual dub doesn't work. I can only play the video in virtual dub. You must be doing something wrong; thousands of people seek with no problem and I've never heard such a complaint. Please explain more what you mean by "it doesn't work". Better yet, post a link to a short fragment of your MPG file, or upload it to my FTP server, so that I can try to duplicate the problem. Also, post the Avisynth script that you are serving into VirtualDub.

lbecque
28th May 2005, 20:17
Originally posted by neuron2
You must be doing something wrong; thousands of people seek with no problem and I've never heard such a complaint. Please explain more what you mean by "it doesn't work".

Must have been a fluke. I went back and tried it again with the exact same mpg and avs and it worked fine.
At the time I was doing a lot of editing inside the avs to try things with the script editor of virtualdubmod so I went back and tried most of the things that I tried before to see if I could reproduce the problem. I couldn't break it this time! Works fine now.

The only difference I can recall is that when I initially ran the avs I got some error messages about needing to change the color space from YV12. That's why I started editing the script and got it to run but had the problem with seeking (dragging the pointer through the file, advancing frame by frame with the arrow keys, the only thing that worked was 'play').

BTW,
What's the difference in my case between using dgdecode.dll and mpeg2dec3.dll? They look pretty much the same to me.

Guest
28th May 2005, 20:35
Originally posted by lbecque
What's the difference in my case between using dgdecode.dll and mpeg2dec3.dll? They look pretty much the same to me. Assuming you use the matching D2V file generator and don't need the latest features and fixes of DGDecode, the basic functionality is the same. The changes in DGDecode are documented in each version's changes.txt file. I'd recommend using DGDecode because it has many useful new features and fixes.