View Full Version : Directshowsource and directshow filter posprocessing
modrak
25th January 2010, 11:47
I was wondering if there is a way how to enable video postprocessing by directshow filters used by directshowsource in avisynth. According to what I have found on the internet it looks like avisynth disables all kind of video postprocessing by directshow filters. I would especially appreciate if deinterlacing was done by built-in filters in Win7. I donīt want to spent time on analyzing different types of video and write appropriate scripts if I can simply use the output from the directshow filter and encode it with respective framerate. The result has an excellent quality and it saves a lot of time before encoding.
Another advantage of using directshow filters is that I donīt have to worry about the video content (sometimes I transcode h264 in ts from DVB-T broadcast, later itīs DVD NTSC interlaced source). All these are supported natively in the latest windows and I donīt see any reason for using different filters as it was the case in previous years. I also feel that the quality of deinterlacing/postprocessing is superior when using WIN7 native directshow filters to methods available for avisynth. Itīs possible of course that I didnīt use the best deinterlacing method available for the given purpose but my goal is to simplify the pre-encoding work as much as possible while still enjoying the excellent video quality that avisynths gives...
Midzuki
25th January 2010, 13:37
Hi there.
AFAIK, DirectShowSource() does support .GRF files built with GraphEdit or GraphStudio --- so, all you would need is add your favorite video processing filters to the graph, open this latter with DirectShowSource(), and voilā!
(The "trick" works under Windows XP, I know nearly nothing about Windows 7,
sorry).
modrak
25th January 2010, 14:44
Thanks for the reply,
I know that, but it doesnīt help me because I already use the right filter. The problem is that the filter deinterlaces video content correctly during playback and the result is excellent. On the other hand the output to the encoder is not deinterlaced during encoding using avisynth. For example, if I open the video directly in the video player (mpc hc) I get nice looking deinterlaced video. When I open the avisynth script in the same player and I check that the same chain of filters is used for playback, the result is not deinterlaced.
So all I want is to allow directshow filter to do the same thing when used with avisynth as it does during normal video playback. I would like to encode the same thing that I see when watching the movie.
I also know that I can postprocess the video using ffdshow postprocessing for example but this doesnīt solve the basis of the problem.
Keiyakusha
25th January 2010, 15:36
I also feel that the quality of deinterlacing/postprocessing is superior when using WIN7 native directshow filters to methods available for avisynth.
I really doubt that. These filters somewhat crappy to be honest. Anyway quality of deinterlacing probably not easily comparable to avisynth, since avisynth has wider range of speed/quality choices. Any non-realtime deinterlacing in avisynth should be superrior.
Anyway about not seeing result of the deinterlacing:
If you have this kind of directshow chain: source/splitter -> decoder -> renderer
you set some deinterlacing in decoder options and it works in player but this kind of chain: source/splitter -> decoder -> avisynth
doesn't works as expected, maybe the thing you set is some kind of hardware deinterlacing? Because I don't see the reason why software processing wouldn't work... But this is just a guess.
EDIT: also its probably will be good if you show exact screenshot of your directshow graph that you feeding to avisynth.
IanB
25th January 2010, 23:40
Yes, DirectShowSource does some explicit property poking on the graph. Sometime in the future I want to make this configurable, but it is very low priority. You can try Haali's DSS2, I don't think he pokes any properties.
Currently the graph is scanned for "WMVideo Decoder DMO" with _DECODERDEINTERLACING=False and "WMAudio Decoder DMO" with _HIRESOUTPUT=True. Then for all filters supporting the COM interface IIPDVDec call the method put_IPDisplay(DVRESOLUTION_FULL).
Generally any deinterlacing provided by "WMVideo Decoder DMO" is pretty horrible. One of Avisynths forte's is interlaced video processing, so most users need the raw interlaced source. Also most of the W7 interlaced video processing is done on the graphics card, with "WMVideo Decoder DMO" having special private conversations about deinterlacing with the Video Renderer and not actually doing the fancy deinterlacing itself.
modrak
26th January 2010, 12:23
It becomes clearer now since it really looks like the deinterlacing I was talking about was done by GPU and the graph for video playback looked like this:
Demultiplexer -> Microsoft DTV-DVD Video decoder -> Enhanced Video Renderer
The result is really good both for MPEG2 and for h264. I also think that the quality has changed considerably from winXP to win7 but as I said itīs mainly my subjective feeling. Itīs a pity that these filters canīt be easily used for encoding using their full potential capacity...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.