Log in

View Full Version : Who's using ffdshow on their captures?


Neo Neko
6th May 2004, 23:03
It has become my new favorite thing to run all my captures through ffdshow via avisynth when compressing in virtualdub. I don't have a pure digital capture source and it is even rarer that I actually capture a digital source via analog as well. So I always have some signal noise. I have found that recent versions of ffdshow with spp deblocking and soft threshold put serious hurting on signal noise. That and it has all sorts of other nice filtering features built into it. A sort of spiffy all in one gui for avisynth after a fashion.

I searched and could not find any other related threads. And I just had to know if anyone else was doing this? It helps my worst sources immensly. And the worst I can say about it is that a slight bit of sharpness is lost. Though that is fine since I am resizing as a final step anyway.

avih
7th May 2004, 01:19
here (http://forum.doom9.org/showthread.php?s=&threadid=75046) ;)

Neo Neko
7th May 2004, 03:21
So you are actually using it with ffvfw during capture? I had very little luck with getting ffvfw to filter. Or take over decoding Mjpeg from picvideo. It just was not happening. Which is why I am using ffdshow via avisynth. Though the settings I am using can't be done in real time on my athlon 2500+. But I am not going for PVR. But archive instead. What are your thoughts on spp deblocking? Have you tried it? I have found it really cuts the noise.

I attached the ffpreset I have been using for it lately.

avih
7th May 2004, 12:37
let me 1st understand you.

you say you cap lossless (or mjpeg), then frameserve to vdub from avisynth, and in avisynth u use directshowsource which feeds from ffdshow with some filters in ffdshow and possibly some avisynth filters too?

i was talking about something else, yet i still use ffdshow abilities as pre-encoding filter. since the new ffdshow builds have both encoder/decoder, i use the encoder part for capture (previously known as ffvfw). and the encoder part can use ffdshow filters. and that's what i do, in real time. the filters i'm usually using is the dscaler's adaptive noise filter, which i find real good. especially for real-time. and sometimes also the mplayer noise reduction. sometimes also i blur the chroma a bit. these filters makes it much easier on the codec while encoding, so i get a pretty good result. i even tried using this technique on motorsport (moto-GP) 400x576 interlaced, 900kbps in ffvfw, bframes, 4mv. and what can i say, the results are acceptable. that is, u can watch the race quite nicely. ffvfw does a nice job of puting the focus on the high contrast areas.

about spp deblocking. i don't have a conclusion yet about it, yet, it sounds strange that u use deblocking as a general noise reduction filter. afterall, it seeks for a very specific kind of noise (blocks) which u don't have in arbitrary analog signal. u do get them with low quality digital signal (that might have been transformed to analog), but this way it depends on the algorithm of spp (which i don't know). 'lesser' deblockers seek for blocks in 8x8 pixels boundries, and smooth only those. do u think spp is looking for 'generic' deblocking? (i.e. not only in 8x8 boundries)?

Neo Neko
7th May 2004, 19:59
Originally posted by avih
let me 1st understand you.

you say you cap lossless (or mjpeg), then frameserve to vdub from avisynth, and in avisynth u use directshowsource which feeds from ffdshow with some filters in ffdshow and possibly some avisynth filters too?

Yep that's the basic gist.

Originally posted by avih
about spp deblocking. i don't have a conclusion yet about it, yet, it sounds strange that u use deblocking as a general noise reduction filter. afterall, it seeks for a very specific kind of noise (blocks) which u don't have in arbitrary analog signal. u do get them with low quality digital signal (that might have been transformed to analog), but this way it depends on the algorithm of spp (which i don't know). 'lesser' deblockers seek for blocks in 8x8 pixels boundries, and smooth only those. do u think spp is looking for 'generic' deblocking? (i.e. not only in 8x8 boundries)?

I honestly could not say what it is looking for or how it works. All I know is that it works. Temporal smoothers and temporal cleaners can only remove signal nose so much before they cause more dammage. But if you throw spp deblocking with soft threshold at it the regular temporal smoother/cleaner function settings are superb. Eliminating almost all noise. That preset is the one I have been using with my captures from cartoon network [Harvey Birdman et all] It is a little agressive for non cartoon material. But that can be easily adjusted. Whatever part of spp deblocking that does this would make a kick arse vdub/avisynth filter if isolated. I know spp deblocking is not designed to be used like that. But then again strictly ffdshow is not either.

I have experimented using ffdshow to capture to huffyuv or Mjpeg but have not had good luck. Right now it seems as if ffdshow swaps chroma channels when encoding huffyuv. There is no such problem with playback. Which makes for some weird colors if you capped with ffdshow. The mjpeg part is as good as picvideo mjpeg but not as fast. Which gives me dropped frames. Which I hate. I usually get 0 for an hour or two of video. So basic double digits are not acceptable. Which is what ffdshow mjpeg gives me. All this without filtering.

avih
7th May 2004, 21:07
i compiled a very short and very non-scientific test. i captured directly: 1. no filters. 2. spp filter. 3. dscaler adaptive nose reduction and blur. the source is NOT exactly the same, but it's from the same 'program' and taken few minutes apart. i picked a noisy channel with quite a static scenery (press conference). capture at 400x576. i copied the image from vdub afterwards, cropped it and saved as jpeg in quality 90 using irfanview. ffdshow was set to capture in mpeg4, 900kbps, 4mv, bframes (1 max) and intercaled.

i used ffdshow 2004-05-01 from athos and vdubvcr 1.4.9 (old, but with timer).

here are my results.

1. source without any encoding:
http://img3.imageshack.us/img3/8637/src-small.jpg

2. encoding without any filters:
http://img3.imageshack.us/img3/6198/no-filter-small.jpg

3. encoding with spp deblocking + soft threashold:
http://img3.imageshack.us/img3/8479/spp-small.jpg

4. encoding with
- dscaler filter: adaptive noise: stability: 20, reduction: 85, spatial smoothing
- Blur & NR: chrominance smoother: about 30%, gradual denoise: 40
http://img3.imageshack.us/img3/7657/anfblur-small.jpg

cpu is about 70-75% with dscaler filter, about 50-60% with spp and slightly less unfiltered. but at least in this example (probably even more so in cartoons) the 4th option is clearly the best.

again it's not a scientific test, but u get the general idea.


modified image host to imageshack after reading this (http://forum.doom9.org/showthread.php?s=&threadid=75653) ;) let's see how long would it last

Neo Neko
7th May 2004, 22:48
well if you have spp deblocking set low or auto quality control on then spp deblocking will be of no real use. With spp on full and auto quality control off it makes a noticable difference. Though for PVR user it is of no use right now as spp deblocking is CPU hungry.

I was just playing around capturing with ffdshow and filtering while doing it. I am having better sucess that previously. And oddly enough I was capping the same material. :p The ffmpeg deinterlace filter does a superb job handling hybrid non animated material. For instance a news channels ticker is often at a different fps than the footage. But it all deinterlaced smooth as silk. However for animated material the ffmpeg deinterlace algo is not so hot. I have used the 5 tap low pass deinterlace the last couple of times with better results. The ffmpeg deinterlacer causes jaggies on lines and outlines. And even though it will detect and fix telecine the jaggies are unacceptable.

avih
22nd May 2004, 09:49
sorry to be a bit late to answer. i totally misused the spp filter :/ sorry. i didn't understand it uses the sliders at the top, bahhh

anyway, i tried it some more, and indeed it's interesting. i don't quite understand what it does, but it seems to reduce the resolution quite heavily on areas of the image that need filterring. very interesting. andy222 was interested in it too in the ffdshow thread. if a link about it pops up, i'll update this thread.

sorry for the misjustice i previously gave this filter ;)

avih

ps, this is what i get from the mplayer man:

spp[=quality[:qp[:mode]]]
simple postprocessing filter

s
0-6 (default: 3)
s
force quantization parameter (default: 0, use qp from video)
s
0: hard thresholding (default)
1: soft thresholding (better deringing, but blurrier)

avih
22nd May 2004, 11:09
here's a quote from Vitos on the ffdshow thread (the google stuff was ment for me :/):

Originally posted by Vitos
Google sometimes can be very helpful:
http://www.hydrogenaudio.org/index.php?showtopic=19578&

And for those who want to go straight to the source:
http://www.utdallas.edu/~aria/papers/vlsisp99.pdf
http://www.utdallas.edu/~aria/papers/spl03.pdf

ShinSan
20th July 2006, 05:34
ffvfw without filters though can be handy. When I have the extra CPU power and not much hard drive space, the XVid option is nice to cap with.

Revgen
20th July 2006, 21:35
Why are you bringing up an old thread?:)