Log in

View Full Version : avisynth filters for divx/xvid


Rosey
10th October 2003, 01:24
hi

could someone give me an example or point me in the right direction with this? when i play a mp4 file it uses varying levels of post processing to "cleanup" the picture.

are there any filters for avisynth that can match the output of the postprocessing? ie....backing up an avi to dvd, you dont get the postprocessing, therefore the dvd looks worse than the avi you started with. how do you navigate around this? thanks!!!!

KpeX
10th October 2003, 02:20
There are tons of denoising filters available for AviSynth, here are two threads to start you out that compare the features of some of the most common denoisers:

http://forum.doom9.org/showthread.php?s=&threadid=62332
http://forum.doom9.org/showthread.php?s=&threadid=51181

Also, you can download most of those filters here:
http://www.avisynth.org/~warpenterprises


Basically, you can smooth spatially or temporally, or both. However, be careful not to have a knee-jerk overfilter reaction, as many avisynth users do initially. And remember that you can't improve the quality of video no matter what filter you run it through. hope this helps,

Rosey
10th October 2003, 03:14
Originally posted by KpeX
And remember that you can't improve the quality of video no matter what filter you run it through. hope this helps,
i dont understand....i thought that was the point of denoisers? i realize that the origional avi wont be different, but wouldnt the video look better being shot out of the other end of certain filters?

p.s. thanks for the links!

KpeX
10th October 2003, 04:19
This is where things get complicated. The answer to your question depends on the definition of 'better looking video'.

The first thing to remember is that you can never improve quality by compressing (encoding) video or audio. Especially when the video is stored in a lossy format, such as divx or xvid, the video must be decompressed and reencoded into MPEG-2. So what you're doing is taking a lossy encoded format, and encoding that into another lossy format, so you have loss introduced into the video on two separate occasions.

Think of it this way. Intuitively, video is a three dimensional color media, it has width, height, and time, like a stream of consecutive pictures. Most denoisers work on the premise of smoothing video in time or in space. Smoothing in space examines individual video frames; as the filter examines the filter spatially, it smooths the video, or it modifies the color values based on given thresholds; a textured surface would be closer to one color, ect. Clearly this would make the video smoother, but decrease the detail. This makes the video more compressible when it is fed to an encoder like Xvid. Temporal smoothing works on a similar basis, but smooths a single pixel and pixels in different frames in the same position. This also increases the compressibility of video, especially for video encoders that use the concept of I and P frames (which is virtually all). A number of filters also smooth spatially and temporally.

So, the conclusion is, smoothing only improves the quality of video if you prefer smooth video to video with a high amount of detail. Another way of thinking of it: a completely smoothed video would be all black, but obviously would have zero detail. An unsmoothed image has all the detail of the original, but no increase in compressibility.

IMO, when encoding to DVD, you have enough bitrate to work with that little denoising if any should be needed.

Hoping my rambling makes sense,

manono
10th October 2003, 07:13
Hi-

However, be careful not to have a knee-jerk overfilter reaction, as many avisynth users do initially.

Sounds like me in my early days. I watch some of those movies now and I cringe at my ignorance and stupidity.

I hope you're paying attention, Rosey. KpeX gave you some invaluable information and advice. If you have a difficult to compress video, the trick is to filter to gain compressibility, but without losing any more detail than necessary. Read the first thread to which he linked very carefully. And with time, you may decide that you prefer watching your .avis without any postprocessing at all.

Wilbert
10th October 2003, 15:49
I guess Rosey is talking about deblocking and deringing here. I might help if you upload a dozen frames of your avi somewhere.

qwerpoi
10th October 2003, 21:14
Assumming you are watching your DVDs on your pc, and you are just looking for post-processing features on dvd playback, look no further than ffdshow. It can be used to decode dvds as well as divx/xvid avi files, and has a couple of postprocessors to choose from (as well as cleaning/sharpening filters you can apply on the fly). There are a lot of unstable versions floating around (search Doom9 to read about it), I'm currently using the ffdshow-20021213.exe version (find at sourceforge (http://sourceforge.net/project/showfiles.php?group_id=53761&release_id=113671) ). You'll have to configure ffdshow to decode raw video along with whatever other codecs you want.

Rosey
10th October 2003, 22:51
sorry, i should have been more clear in what i was talking about. there wasnt any one avi inparticular, but rather just some ponderings to use in future projects. more or less, an avi looks better played with advanced postprocessing through my video cards tv-output, than a dvd made with no filters of that same avi. all i had in mind was how to use avisynth filters to "cleanup" the source as it shot it into cce so that a dvd project would atleast match the same clarity as the tvout without as much "grit" as an unfiltered dvd. and thanks to everyone for the discussion, im REALLY learning a bunch here!

Rosey
15th October 2003, 01:26
was getting ready to start another dvd project and began looking back through the above posts and i cant believe i didnt catch all this the first time.

im looking for a avisynth filter/deringer (whatever) for feeding an avi INTO cce with the final goal of a dvd for my standalone. if i read right above, most of you all were talking about going from dvd to avi. im doing the opposite.

Rosey
15th October 2003, 03:30
ok, starting to feel like a one sided conversation here :) (its my fault,im excited cause i think im starting to learn something here)

ive been reading and reading here and not really stumbling across anything that i can say is definitively is my answer, but i read this in one thread.....avi synth will use whichever codec is required (be it xvid, divx....) if you use the argument avisource("") and ffdshow codecs if you use DirectShowSource(""). if thats true, then all i would have to do i configure the postproccessing through the respective codecs and load the avs file into cce and go to bed, right? thanks guys!

Rosey
15th October 2003, 23:43
hmm....ok, when i use directshowsource and configure ffdshow-20021213
(the version "qwerpoi" said worked well for him/her) and load that into cce, and start to encode, it acts like everything is going well; but the ffdshow icon shows up in the task bar like 5-6-7 x's then CCE shits down.

so, my alternative is use AviSource and configure the xvid decoder. the xvid options are only chroma and luma deblocking. im giving those a whirl. heres my script im using:

AviSource("e:\movie.avi",false)
killaudio()
assumefps(23.976)
bicubicresize(704,380,0.1,0.45)
addborders(0,50,0,50)

i changed the bicubicresize just to see if i could notice any changes in the video (btw, origional avi is 592x320) if my math skills are still sharp, the formula should be c=(1-b)/2.

if i use divx player to play the video, and crank up the postprocessing settings, combined with the hardware acceleration via the radeon graphics board, this file looks pretty sharp fullscreen with tvout. if i preview my avs script with windows media player, it doesnt come close. any ideas on what else i should be adding/subtracting from my script to beef up the *perceived* visual quality? thanks guys!!!

Wilbert
16th October 2003, 15:35
Deblocking and deringing: use BlindPP. It comes with mpeg2dec3, and can be used on any clip. See: http://forum.doom9.org/showthread.php?s=&threadid=63392

Rosey
17th October 2003, 03:35
thanks you so much!