Log in

View Full Version : Help with AVISynth


gr0x
20th February 2002, 06:12
I've wanted to tackle AVISynth for some time in order to use virtualdub with my captured mpeg-2 files. So today I figured I'd go ahead and do that.

After reading many tutorials around the net, I found this (http://nickyguides.digital-digest.com/synth-vdub.htm) one to be the most straightforward. Most of the other guides I read would explain in detail about AVISynth, but stop at the point where you open the avs file in VD. This is where I need some insightful help.

When I open my avs file, I get the following:

Avisynth open failure:
DirectShowSource: unable to determine the duration of the video.
(C:\MOVIE.AVS, line 1)

I have tested AVISynth to see if it works. version.avs reports AVISynth v1.0 beta 5 in media player, so it would seem AVISynth is correctly installed. WinDVD is installed and my mpeg-2 file plays fine in media player. I have tried VD 1.4.7 and 1.4.8 but both report the same error.

I have tried putting the mpeg-2 file on both NTFS and fat32 drives, in case permissions were the culprit. This made no difference. Neither did changing the filename to less than 8 characters.

So it would seem, based on most of the tutorials I've read, that everything is in order. What am I missing here? Is there something wrong with my mpeg-2 decoder? Are my proxy settings in vd messed up? I've messed around with everything here to no avail.

Any help would be greatly appreciated.

Thanks,
~g

western shinma
20th February 2002, 06:31
You need to use DVD2AVI to save a project file and load that in Avisynth with the MPEG2DEC plugin.

Which tutorial suggested using DirectShowSource for decoding an MPEG2 file?

gr0x
20th February 2002, 06:44
western shinma- thanks for the input.

I'm figureing my way around avisynth- got it to open an .asf in VD 1.4.8, processing that now.

I provided the link to the tutorial so you can see it- but in short, it was the one at digital digest, by Nicky, i think.

I'll use a dvd2avi project file on my next attempt. Thanks for the help man!

~g

hakko504
20th February 2002, 08:39
[list=1]
It seems like Nicky hasn't updated his ripping pages in ages. They now refer to old versions that doesn't work in most cases.
The DirectShowSource is very unstable in AVISynth. It also wants a framerate as a parameter.
[/list=1]

I tried to use nicky's guide to convert The World Is Not Enough with VD, only to find that a) I had no sound b)frames with the MGM lion inserted through the whole picture at random intervals.

gr0x
20th February 2002, 08:57
OK! I have finally used AVIsynth and virtualdub to process an Mpeg-2 file in one[?] step. I can see why AVIsynth isn't used by many people- but like anything, once you learn its ins and outs, it's not too hard to handle.

So now my question is this- the flaw in this process is in the way DVD2AVI demuxes the sound. Since my hardware doesn't have DD5.1, my capture's sound encodes as mpeg audio. DVD2AVI encodes DD5.1 (from .vob files, etc) as WAV, but normal mpeg-2 streams are demuxed as their native format (.mpa).

So, this method introduces yet another step- converting this .mpa file to wav or mp3, and either including it using AVISynth or importing it into VD.

What method is recommended for sound? Doom9's guide only covers the .vob/.wav angle of this method. I converted the .mpa file to .wav using BeSweet and used AVISyth's audiodub() to re-mux the audio. Is there a better way? Or am I just being an ox, and DVD2AVI can convert the .mpa to .wav and I just don't know how?

Thanks for the help guys.
~g

Rauli
19th May 2002, 23:45
I want to ad my two cents here as to why I am thinking of using direct show source with avisynth.

I capture DVB broadcast with Hauppauge WinTV Nova-t and as a result I get mpeg2 stream. This stream has errors in it for reasons I don't yet know. The error is that the stream is missing video frames, even 5 frames every one to two minutes. If I use dvd2avi, avisynth and mpeg2dec and than convert to divx (gordian knot) the avi is out of synch. That's because the demuxed and frameserved videofile is shorter than the audiofile. I repeat the original mpeg2 file is missing videoframes but the audio is fine. I don't know how mpeg2dec decodes the mpeg2 video but it results in a shorter videofile than what the audio is.

The original mpeg2 file can be played with windvd and it plays back fine. Where it misses the video frames it just stops the picture while the audio playes on and continues with the video when it has passed the missing frames. Windows MP playes the file back somehow slowly.

I tried just yesterday to convert an mpeg2 file by demuxing it with dvd2avi than opening the original mpeg2 with avisynth using directshowsource to virtualdub. In virtualdub I than encoded to divx4.12 and muxed the audio as wav. The result seems to be in sync.

So the mpeg2dec and directshowsource handle the video in a different way. This is one reason as to why I am forced to use the directshowsource with atleast some files.

I know I can correct the original mpeg2 file with PvaSturmento but it cuts the audio where it finds missing video, and the result is quite annoying. Ofcourse in the end I should find out what is wrong with my captures, but for the moment I havent been able to sort that out.