Log in

View Full Version : Avisynth and grf files


Razza4567
17th February 2004, 02:34
I’m using avisynth 2.5.4 . I have struck the following problem with some mpeg files, for example:

1. I wrote a one line script containing DirectShowSource(“d:\testfiles\test1.mpg”)
2. I opened the avi script with Media Player 6.4.09
3. “the filter graph manager won’t talk to me” message was given for both audio and video
4. Media Player will play test1.mpg directly and I can manually construct filter graphs that play test1.mpg.
5. According to the home page of avisynth it should be possible for avisynth to connect to a .grf file. My problem is I can’t work out what to do based on the information provided there. Eg. Do you refer to the .grf file in the avi script?

Is there an example explained somewhere that might help?
Has anyone else used this technique successfully?
Help!

SoonUDie
17th February 2004, 03:21
If you want to load a .grf file, you can do it with DirectShowSource(). However, in order for it to work there need to be open pins for the audio and video (get rid of the renderers).

Razza4567
17th February 2004, 04:06
Thank you SoonUDie for your quick reply. I tried the following:

1. Constructed a graph manually that played test1.mpg
2. Deleted the renderers
3. Saved the graph as test1.grf
4. Wrote a one line avisynth file with the command DirectShowSource(“d:\testfiles\test1.grf”)
5. I opened the avi script with Media Player 6.4.09

Result was that I still got the “the filter graph manager won’t talk to me” messages.

SoonUDie
17th February 2004, 07:47
That's definately... interesting. Maybe one of these threads will help you:

http://forum.doom9.org/showthread.php?s=&threadid=49384&highlight=filter+graph+manager

http://forum.doom9.org/showthread.php?s=&threadid=41314&highlight=filter+graph+manager

I load .grfs all the time, and I don't recall having this problem except for when I forget to keep the pins open (video AND audio!).

sh0dan
17th February 2004, 09:46
Sounds strange could you take a snapshot of the graph you are trying to open in graphedit?

Maybe enabling "Raw Mode" in ffdshow and inserting it into the filter graph will help you.

Wilbert
17th February 2004, 10:27
I think you could also put one of those overlay mixers in your graph. It gave an extra pin for me, when I was fiddling around with this stuff.

when I forget to keep the pins open (video AND audio!).
Probably a dumb question. Which pins?

Razza4567
17th February 2004, 10:46
Looks like I can't post a jpeg as there is no "browse" button at the bottom of post composition page. I'll contact moderator.


It is just a plain vanilla graph. File-> Mpeg2-splitter -> video goes to video-in of Sonic video decoder and AC3 goes to audio-in of Sonic Audio decoder. I left the video-out and audio-out of the Sonic filters open. I assumed they were the ones meant by SoonUDie.

SoonUDie
17th February 2004, 11:17
That sounds right.

Just in case anyone needs a visual, you should be going from something like this:
http://students.oxy.edu/tcoldwell/forum_uploads/grf1.png

To something like this:
http://students.oxy.edu/tcoldwell/forum_uploads/grf2.png

... which can be loaded by DirectShowSource("blah\snarf.grf")

sh0dan
17th February 2004, 16:46
The problem is most likely with the Sonic Filters. Sorry - I don't have them, so I cannot confirm. Try another MPEG2 decoder. IIRC Elecard works nice and AC3Filter for the sound.

The best way to open MPEG2 files are through DVD2AVI / MPEG2Ssource (from the mpeg2dec3 plugin).

To dub the audio (using AC3Filter), try:

Video = MPEG2Source("file.d2v")
Audio = DirectShowSource("file.mpg", video=false)
Audiodub(Video, Audio)


Otherwise the safest solution is to demux audio. See more here (http://forum.doom9.org/showthread.php?s=&threadid=71023).

Razza4567
17th February 2004, 21:29
Thank you shOdan. I had already tried graphs with other combinations of filters (Cyberlink and intervideo)- just about any combination worked OK in graphs.
Before that I had tried DVD2AVI with the mpeg2dec3 plugin and I had tried demuxing first with ProjectX. I tried using just a .m2v file. No combination of anything worked with mpeg2 starting files. DVD2AVI would read them OK and produce a .d2v file but avisynth would do nothing with it.

I turned to the graphedit approach because I'd made no progress with the other.

Could there be something basic I've missed in the way I've setup?
I'm using Windows XP Pro with SP1.