PDA

View Full Version : Avisynth and MPEG-2


vlada
27th January 2004, 13:23
Hi, I have a couple of teoretical questions abou avisynth and it's support for MPEG2 decoding.
1) If I want to make a script for frameserving an MPEG-2 video, why do I have to use DVD2AVI first, to make the .d2v file? What information are in this file? Why can't be the .m2v file used as an input?
2) And another question, what is the difference between MPEG2Dec and MPEG2Dec3?
3) And now, what would You suggest to smooth a noisy movie? I tried mipsmooth, it looks good. Is there something better, that would support YV12 colors?
4) And my last question, I tried to playback a script which was only frameserving the MPEG-2 movie. No other filters, just MPEG-2 decoding. It was using 70% CPU on my Athlon 2000+, is it normal? I think that MPEG-2 decoding should use much less CPU time. I use the DVD2AVIdg and MPEG2DEC3dg versions.
Thank You for explanation of any of this and excuse my English, please. Vlada

stax76
27th January 2004, 13:40
I'm wondering about 4) as well

sh0dan
27th January 2004, 14:47
1) Because MPEG are not seekable by default, so DVD2AVI creates a frame index, so AviSynth knows where to find each frame.

2) Evolution. MPEG2DEC3 is the only one that can return YV12 + some bugfixes and optimizations.

3) Search. There are lots of topics regarding this topic.

4) There must be something happening somewhere. Perhaps a colorpspace conversion in DirectShow.

Manao
27th January 2004, 14:52
3) Try all the denoisers, all have their use. Look at the sticky (http://forum.doom9.org/showthread.php?s=&threadid=51181) to know the names of the different denoisers, and try it on your video. A good all purpose filter is COnvolution3D

4) What did you use to show the video. Most of the time in your case is spent into drawing, not decoding. As a test, make a clip with :

MPEG2Source("C:\foo.d2v").simpleresize(8,8)

And make it play with VDubMod, without outputting the video. You should have a very high framerate.

stax76
27th January 2004, 15:40
I made a test now, it's a little bit slower than elecard splitter/sonic decoder but not much, ~40 on my Athlon XP 2200+

what I don't understand is with the DirectShow decoder there is not much CPU time difference if the video is visible or not but there is a big difference with mpeg2dec3

vlada
28th January 2004, 00:47
Dolemite: I belive it is because if You use directshow, the whole process of displaying and resizing is done by Your graphic card.
Manao: I used WMP 6.4 and VDMod to play the video, I got almost the same results with both. I try it with the resize later. I know about the cleaners, I already downloaded a tried most of them. I couldn't use 2dcleaner and SmoothHiQ because they dont support YV12 colors. I just thought, that somebody will have some interesting epxperiences with other denoisers. I was looking for a fast one because the encoding seems very slow to me, I get an average of about 5 fps when encoding to XviD. I use MPEG2DEC3dg, MipSmooth and LanczosResize to 640x360. The XviD codec settings are for highhest quality so the 5 fps might be O.K.
Thanks to all of You, Vlada