Log in

View Full Version : Note about denoising method


Pages : [1] 2

Isochroma
24th December 2005, 19:37
I had a private message this morning inquiring about whether I use Deen() for denoising. This inspired me to write this long and windy description of how the current (much improved!) workflow goes. It makes use of two denoisers, one radically different in both method and workflow than the usual avisynth filters.

Here is my reply:

Nope, no Deen()!!!

Here's a short and quick summary of the last 6 months of denoising work...

I found that a program called Neat Image denoises far better on the spacial plane than any other program could hope to:

http://www.neatimage.com/

It uses wavelets rather than FFT and the results on still images are superb. So, I built Neat Batch and Neat Batch AVI:

http://isochroma.com/Testfiles/NB/neatbatch.htm

Here are some comparative screenshots of before and after. Note that the text above them is very out-of-date, and doesn't reflect my current workflow:

http://isochroma.com/Testfiles/DeltaChroma-2.htm#Noir

Due to limitations in Windows (all versions) selector boxes crash when trying to select more than 16,383 files at once. The goal was to separate a video into still images and pass them through Neat Image, then reassemble them.

Worse, Neat Image uses more memory as more images are loaded into the queue, making it impossible to queue more than 4000 with reasonable memory usage.

So I built Neat Batch & Neat Batch AVI to create batch files which call Neat Image's commandline interface. This means virtually no memory usage and processing of vast numbers of images. Please see the site for more details.

I used this program to process Armitage: Poly-Matrix. The strange thing is, each frame looks beautiful on its own, but when animated, temporal noise is very visible and a big problem!

In just the last two days I realized that if the video were preprocessed with a temporal denoiser (FFT3D) it would remove the noise that the purely spacial Neat Image didn't touch. Then NI would do the spacial cleaning.

So I made the usual batch file with Neat Batch AVI, and made sure to use FFT3D in the .avs file used as the source (frameserved into an AVI via ffdshow's AVIS maker):

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll")
MPEG2Source("G:\Shinjuku\AVISynth Scripts\Escaflowne\VOB Input\Escaflowne.IP.Tex.d2v")
Telecide(order=1)
Decimate(cycle=5, mode=0)
FFT3DFilter(sigma=3,plane=4)
LimitedSharpen(ss_x=2.0, ss_y=2.0, Smode=3, strength=800)

VFAPI cannot be used in this case because it will not process .avs files containing the FFT3DFilter function, due to some strange error - this behaviour has been verified by Fizick.

The processing is very slow with two denoisers, running at 1/10 fps on my Duron 1600 in the basement. Beyond just denoising, the batch script sequentially calls IrfanView to convert Neat Image's raw BMP output to PNG compression level 2. This saves disk space and uses little CPU.

But Wow! The frames are so slick they just slide through my mind like greased bananna peels. No temporal flicker like the Armitage disaster! And don't forget, this isn't the end of processing, only the beginning!

As the processing is occuring on the machine downstairs, I sit upstairs running Vegas 6.0, editing the sharpened raw frame by frame, selecting the best duplicate in every dup-group for replicative replacement of its neighbors. The current project is Escaflowne the movie, which rings in at 140,636 frames. My record is 6,500 frames in a day, and average is 4,000.

The Vegas 6.0 projects are each around 4,000 frames long. More than this and Vegas starts to slow down too much and uses too much memory. Sequences are created by using Trim(start,end) on the original source:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
MPEG2Source("Escaflowne.IP.d2v")
Telecide(order=1)
Decimate(cycle=5, mode=0)
Trim(4194,8220)
ConvertToRGB24()
Crop(13,11,696,454)
Lanczos4Resize(704,464)
ConvertToYUY2()
LimitedSharpen(ss_x=2.0, ss_y=2.0, Smode=3, strength=800)

A VFAPI AVI file is made from this script and loaded into Vegas for editing. Before frames can be replaced, they must be split from the video uniblock on the timeline. For this, I use Hot Keyboard, with a simple script that repeats the s key and the right arrow key thousands of times. It takes about 10 minutes to split the 4,000 frames.

After editing in Vegas is complete for a segment, I replace the VFAPI AVI file with another of the same name, made from a different script:

ImageSource(file = "S:\VideoDone\Escaflowne\EF.%06d.png", start = 0, end = 140636, fps = 23.976)
Trim(4194,8220)
Crop(13,11,696,454)
Lanczos4Resize(704,464)

The first line is autogenerated by Neat Batch AVI, the other three were added by me later.

It is importatant to never open the folder with these files in it, as this locks explorer for hours as it counts the vast number of files. Instead, all work is done via the .avs and .bat files auto-generated by Neat Batch AVI. The .avs contains the user-specified image-sequence reassembly (see above) and other arguments added later. The .bat auto purges all the images when work with them is done - just double-click it to activate:

DEL /Q /F "D:\VideoDone\Escaflowne\EF.*.png" >nul

When I load the Vegas project, it is fooled and takes the substituted file as if it was the original. So the frame-selection and replacement based on quality that is made from the sharpened (to highlight differences) raw is applied to the temporal-spacial denoised material. Relative quality between frames in a dup-group (note that I do not use the dup() filter - just a convenient term) is probably the same in both versions or extremely close.

The file is then rendered to a lossless format and to DIV6 with quantizer 1 with GMC/QPEL unchecked. Any DCT codec ruins the perfectly smooth, blockless, grainless gradients made by this method, though wavelet codecs such as SNOW work fine. So I am upgrading the playback machine so it can run Lagarith & HFYU in VMR7 renderless with subs, maybe even MSU...

The rendered segments are merged using VirtualDub's direct stream copy mode. The DIV6 file is then used for subtitle work. When subtitles are done, the lossless copy is muxed into an mkv with appropriate AR corrrection values, .ass file, fonts, etc.

The results of this process are breathtaking, to say the least.

rfmmars
24th December 2005, 20:11
I had a private message this morning inquiring about whether I use Deen() for denoising. This inspired me to write this long and windy description of how the current (much improved!) workflow goes. It makes use of two denoisers, one radically different in both method and workflow than the usual avisynth filters.

Here is my reply:

Nope, no Deen()!!!

Here's a short and quick summary of the last 6 months of denoising work...

I found that a program called Neat Image denoises far better on the spacial plane than any other program could hope to:

http://www.neatimage.com/

It uses wavelets rather than FFT and the results on still images are superb. So, I built Neat Batch and Neat Batch AVI:

http://isochroma.com/Testfiles/NB/neatbatch.htm

Here are some comparative screenshots of before and after. Note that the text above them is very out-of-date, and doesn't reflect my current workflow:

http://isochroma.com/Testfiles/DeltaChroma-2.htm#Noir

Due to limitations in Windows (all versions) selector boxes crash when trying to select more than 16,383 files at once. The goal was to separate a video into still images and pass them through Neat Image, then reassemble them.

Worse, Neat Image uses more memory as more images are loaded into the queue, making it impossible to queue more than 4000 with reasonable memory usage.

So I built Neat Batch & Neat Batch AVI to create batch files which call Neat Image's commandline interface. This means virtually no memory usage and processing of vast numbers of images. Please see the site for more details.

I used this program to process Armitage: Poly-Matrix. The strange thing is, each frame looks beautiful on its own, but when animated, temporal noise is very visible and a big problem!

In just the last two days I realized that if the video were preprocessed with a temporal denoiser (FFT3D) it would remove the noise that the purely spacial Neat Image didn't touch. Then NI would do the spacial cleaning.

So I made the usual batch file with Neat Batch AVI, and made sure to use FFT3D in the .avs file used as the source (frameserved into an AVI via ffdshow's AVIS maker):

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll")
MPEG2Source("G:\Shinjuku\AVISynth Scripts\Escaflowne\VOB Input\Escaflowne.IP.Tex.d2v")
Telecide(order=1)
Decimate(cycle=5, mode=0)
FFT3DFilter(sigma=3,plane=4)
LimitedSharpen(ss_x=2.0, ss_y=2.0, Smode=3, strength=800)

VFAPI cannot be used in this case because it will not process .avs files containing the FFT3DFilter function, due to some strange error - this behaviour has been verified by Fizick.

The processing is very slow with two denoisers, running at 1/10 fps on my Duron 1600 in the basement. Beyond just denoising, the batch script sequentially calls IrfanView to convert Neat Image's raw BMP output to PNG compression level 2. This saves disk space and uses little CPU.

But Wow! The frames are so slick they just slide through my mind like greased bananna peels. No temporal flicker like the Armitage disaster! And don't forget, this isn't the end of processing, only the beginning!

As the processing is occuring on the machine downstairs, I sit upstairs running Vegas 6.0, editing the sharpened raw frame by frame, selecting the best duplicate in every dup-group for replicative replacement of its neighbors. The current project is Escaflowne the movie, which rings in at 140,636 frames. My record is 6,500 frames in a day, and average is 4,000.

The Vegas 6.0 projects are each around 4,000 frames long. More than this and Vegas starts to slow down too much and uses too much memory. Sequences are created by using Trim(start,end) on the original source:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
MPEG2Source("Escaflowne.IP.d2v")
Telecide(order=1)
Decimate(cycle=5, mode=0)
Trim(4194,8220)
ConvertToRGB24()
Crop(13,11,696,454)
Lanczos4Resize(704,464)
ConvertToYUY2()
LimitedSharpen(ss_x=2.0, ss_y=2.0, Smode=3, strength=800)

A VFAPI AVI file is made from this script and loaded into Vegas for editing. Before frames can be replaced, they must be split from the video uniblock on the timeline. For this, I use Hot Keyboard, with a simple script that repeats the s key and the right arrow key thousands of times. It takes about 10 minutes to split the 4,000 frames.

After editing in Vegas is complete for a segment, I replace the VFAPI AVI file with another of the same name, made from a different script:

ImageSource(file = "S:\VideoDone\Escaflowne\EF.%06d.png", start = 0, end = 140636, fps = 23.976)
Trim(4194,8220)
Crop(13,11,696,454)
Lanczos4Resize(704,464)

The first line is autogenerated by Neat Batch AVI, the other three were added by me later.

It is importatant to never open the folder with these files in it, as this locks explorer for hours as it counts the vast number of files. Instead, all work is done via the .avs and .bat files auto-generated by Neat Batch AVI. The .avs contains the user-specified image-sequence reassembly (see above) and other arguments added later. The .bat auto purges all the images when work with them is done - just double-click it to activate:

DEL /Q /F "D:\VideoDone\Escaflowne\EF.*.png" >nul

When I load the Vegas project, it is fooled and takes the substituted file as if it was the original. So the frame-selection and replacement based on quality that is made from the sharpened (to highlight differences) raw is applied to the temporal-spacial denoised material. Relative quality between frames in a dup-group (note that I do not use the dup() filter - just a convenient term) is probably the same in both versions or extremely close.

The file is then rendered to a lossless format and to DIV6 with quantizer 1 with GMC/QPEL unchecked. Any DCT codec ruins the perfectly smooth, blockless, grainless gradients made by this method, though wavelet codecs such as SNOW work fine. So I am upgrading the playback machine so it can run Lagarith & HFYU in VMR7 renderless with subs, maybe even MSU...

The rendered segments are merged using VirtualDub's direct stream copy mode. The DIV6 file is then used for subtitle work. When subtitles are done, the lossless copy is muxed into an mkv with appropriate AR corrrection values, .ass file, fonts, etc.

The results of this process are breathtaking, to say the least.

Thanks for sharing a detailed acount of your research. I have used Neat Image too and it is great. In my slide work I use Noise Ninja, I wonder if your batch file will work there too?

richard

Isochroma
24th December 2005, 21:03
It will work, but Neat Batch AVI would need to be modified to support different command-line options that Noise Ninja provides... this of course assumes that NN provides a command-line interface?

Isochroma
24th December 2005, 22:53
Fun!

The avs files below allow slow, but live examination of the before and after frames of the currently running process. Save the three files below anywhere and (presuming you have AVISynth and VirtualDub), open the two avs files. EF-DN is the denoised version, EF-RAW is raw. Currently the processing is up to frame 10,813, so you should be fine seeking up to there.

http://isochroma.com/Testfiles/Misc/EF-DN.AVS
http://isochroma.com/Testfiles/Misc/EF-RAW.avs
http://isochroma.com/Testfiles/Misc/EF.d2v

To view the EF-RAW (raw) you'll need:

http://isochroma.com/Testfiles/Apps/decomb521.zip
http://isochroma.com/Testfiles/Apps/dgmpgdec145.zip

The .d2v was made with 1.4.5, so you'll need that version of the plugin in your AVISynth plugins folder.

If you open both in two vdubs, you can alt-tab between them and step through the timeline to view the difference.

Tripx
25th December 2005, 01:50
Hey Isochroma,

I've tried Neat Image and it does do great noise reduction. However, using a DVD source at 720 x 480 Neat Image will often say that it can't find a uniform area to build a profile. If I click to continue, it will blur the picture badly and not denoise it very well. The workaround I have found is to super size the picture to 2880 x 1920 in order for Neat Image to find a uniform area to build a profile for noise reduction. Doing so greatly slows the process down though.

Am I doing something wrong? How do you denoise with Neat Image without resizing and still get good results?

Thanks.

Isochroma
25th December 2005, 01:57
Don't resize the image... NI uses the size of the noise pixels to build a noise profile (frequency vs. power spectrum). Resizing the sample will tell NI to remove noise of that size from the image - which will not match.

Instead, step thru the movie using virtualdub until you find a frame with a uniform area which contains just noise. Then copy the frame using CTRL-1 and paste it into paint or irfanview, save as bmp (do not save in a lossy format like jpg!).

Use this to generate a noise profile, then save the profile as .dnp. If you can't find a good frame (you should be able to), here's a sample which might resemble the grain in your film:

http://isochroma.com/Testfiles/Misc/Escaflowne.127712.dnp

It is pretty uniform fine-grain noise in this case.

Tripx
25th December 2005, 02:07
Thanks, I'll try that.

Will the noise profile from one image apply throughout the video or should I find a profile for each scene?

Isochroma
25th December 2005, 03:01
Film grain tends to remain the same (at least the frequency spectrum), though the amount may change throughout the film. NI has an option to auto-fine-tune the noise filter.

Now, MPEG noise is notoriously nonlinear and can change its frequency spectrum depending on the image and its motion. Checking through the frames, you should be able to distinguish the amount of noise vs. the MPEG amplification of this noise and other nonlinear distortions.

falcon2000eg
25th December 2005, 04:54
Neat Video v1.0 is here

Tripx
25th December 2005, 05:27
Neat Video 1.0 even has support for VirtualDub, I was just trying out the demo version.

Edit: It also works with Adobe After Effects 6.0 / 6.5 and Adobe Premiere Pro 1.0 / 1.5

Isochroma
25th December 2005, 05:35
Holy crap! The guy damned stole my idea! I let him know some time ago on his forum about my tool...

FredThompson
25th December 2005, 05:38
Your screenshot samples are blurring a lot of detail. Are those post or pre-LimitedSharpen()?

Neat Video is for VirtualDub and not AviSynth? Would be far better to stay with the same color model if at all possible. RGB is fine if you're doing lossless capture, not so great if the source is any flavor of MPEG...

Tripx
25th December 2005, 05:43
Holy crap! The guy damned stole my idea! I let him know some time ago on his forum about my tool...

Well, I don't think it's stealing an idea if you spam your technique all over their boards. :D

At the very least they listened to their users for what they wanted.

Neat Batch / Neat Batch AVI: Video Processing for Neat Image

After several weeks of intense coding, I am finally ready to present v.1 to the world!

The reason for all this work, was the need to process very large numbers of video frames with Neat Image (119,000 +). I soon realized that I could add features to the barebones code and make the tools useful to others, who had also expressed an interest in this usage.

http://www.isochroma.com/Testfiles/NB/neatbatch.htm

Partial list of features:

> Open Source
> AVI or Image File input
> Very large batches (up to 2,147,483,646 images)
> Priority setting
> Input/Output sequence name & number remapping
> Input & Output image format conversion
> Automatic AVS generation for video output
> DNP, NFP, all switches supported
> Automated cleanup of input, output files

All done on-the-fly... with only 1 frame overhead.

FredThompson
25th December 2005, 06:08
Holy crap! The guy damned stole my idea! I let him know some time ago on his forum about my tool...Yeah, nobody who ever did noise reduction for photos would think of noise reduction on a series of images... http://home.mindspring.com/~fredthompson/Smiley-LOL.gif

Isochroma
25th December 2005, 08:07
I was just kidding! But really, I'm very glad they finally made the code... the developer and I had great correspondences and I even purchased Neat Image for just the job...

foxyshadis
25th December 2005, 13:08
Your screenshot samples are blurring a lot of detail. Are those post or pre-LimitedSharpen()?

Neat Video is for VirtualDub and not AviSynth? Would be far better to stay with the same color model if at all possible. RGB is fine if you're doing lossless capture, not so great if the source is any flavor of MPEG...
Neat Image is definitely optimized for high-resolution photos that aren't totally sharp, I've found that using it on crisp lower resolutions is almost guaranteed to blur edges up no matter what settings. Even following with Photokit Sharpener (Photoshop's version of Limited Sharpen) doesn't get it all back.

Still, I'm interested in their new video plugin.

Mug Funky
26th December 2005, 03:18
there's a limited sharpen for potatoshop?

dang, and i've been emulating it using buttloads of layers and masks and putting it into an action... kinda makes you appreciate the blinding speed of avisynth in comparison.

Fizick
26th December 2005, 10:11
Yeah, nobody who ever did noise reduction for photos would think of noise reduction on a series of images... http://home.mindspring.com/~fredthompson/Smiley-LOL.gif

I suppore, he also read this:
http://forum.doom9.org/showthread.php?t=90042


It seems, "neat video" is similar to fft3dfilter and defreq.
Lets will be use it as a tutorial.

foxyshadis
26th December 2005, 13:29
there's a limited sharpen for potatoshop?

dang, and i've been emulating it using buttloads of layers and masks and putting it into an action... kinda makes you appreciate the blinding speed of avisynth in comparison.
Well, it costs $100 and is put together by the finest minds in the industry, so I wouldn't feel too bad. You'd be interested to note that it's mainly put together as a series of sharpen/blur/mask/repeat steps. I'm not sure of the specifics since it usually goes by too fast to tell. (It also has capture and output sharpening in addition to utility sharpening.)

http://www.pixelgenius.com/sharpener/

Isochroma
26th December 2005, 20:01
Indeed, that was the mystical article that informed me of Neat Image's possibilities, and so I decided that it would be an interesting avenue to explore! I was doing an exhaustive search & test of all the denoisers available, and happened to find it in my travels.

Dr3
10th January 2006, 14:18
Hi, I just read this article and wanted to try out Neat Batch AVI to use it on an Anime. I followed the installation and through all the questions asked in the DOS Window...but when I`m done, nothing happens. The *.avs and *.bat file were created but not a single image. There was also no error message or something like that.

Am I missing something? Plese tell me what I migNo ht did wrong.

Edit: These are the last messages I get

No output file auto-deletion batch will be made.

Creating main batch file...
Done!

Creating AVS file for AVI extraction...
All Done!

Press any key to exit...

mp3dom
10th January 2006, 18:17
You need to run the batch file (.BAT) to start the processing. When finished, load the AVS in VDub to reassemle all the images sequence.

Dr3
10th January 2006, 18:31
Thx for the reply but when i do what you told me to I get the message that Neat Image is a Demo and so on...then I hit "OK" and another message appears saying: Error! Can't load C:\images\outframe.00001.tif and when I hit "OK" now the whole process repeats itself.

Isochroma
10th January 2006, 19:24
Sorry to take so long to reply... can you post the exact paths you specified for the noise profile, filter preset, input AVI, output files, etc.?

If you load the batch into Wordpad or Word (don't use Notepad! it can't handle large text files), then you can examine the first few lines to see whether the paths are accurate. For example, there should be an avs file located in the folder you specified.

Also, if you specified any output image type other than TIFF or BMP, you have to have irfanview installed for the conversion to work. The main page here (http://www.isochroma.com/Testfiles/NB/neatbatch.htm) has a link to a downloadable copy of irfanview.

Finally, you could copy/paste the first 13 lines of the .bat file into a message posted here, so I could check them. Here's an example from one of my jobs:

C:
CD \
CD "C:\Program Files\Neat Image"
SET a="D:\NB-Temp\EF\process.avs"
SET b="D:\NB-Temp\EF\000000.bmp"
SET d="D:\VideoDone\Escaflowne\EF.
SET e="G:\Shinjuku\Video Edit Logs\Escaflowne\NI Files\Escaflowne.127712.dnp"
SET f="G:\Shinjuku\Video Edit Logs\Escaflowne\NI Files\Escaflowne.nfp"
SET g="C:\Windows\gsar.exe"
SET h="C:\Program Files\AVS2AVI\avs2avi.exe"
SET i=START /LOW /WAIT NeatImage.exe
SET j="C:\Program Files\IrfanView\i_view32.exe"
SET k=/convert=

The gsar.exe program is required for the auto-increment process to work. Because NB-AVI orchestrates a number of different apps to make the entire process work, each one must be present and in the specified location. They have to hand each other the files in sequence - if there is one broken link in the chain then it all falls apart.

Here is how it works; below is the first 5 working lines (after the 13 above) of the .bat file example:

%h% %a% -q -o n -c null >nul
%i% %b% %d%082791.tif" %e% %f% /sl
%j% %d%082791.tif" %k%%d%082791.png
DEL /Q /F %d%082791.tif"
%g% -s(082791 -r(082792 -o %a% >nul


when the %h% is translated it becomes "C:\Program Files\AVS2AVI\avs2avi.exe" and the others respectively:

C:\Program Files\AVS2AVI\avs2avi.exe D:\NB-Temp\EF\process.avs -q -o n -c null >nul

If you go to your Start menu and click Run, then type cmd and hit enter, then you can in the black box that appears type yourbatchname.bat. Then after it runs for a little bit press ctrl-c. Then you can look at the list and see which command(s) aren't running right.

The above 5 lines do these things:

1. avs2avi loads the premade avs which spits out a single image file from your specified AVI file.

2. neatimage.exe is given that image file and told to denoise it with the settings you provided. it outputs the file to the file and folder you specified (%d%082791.tif). In this case the script starts at frame 82791 because it's cut so that it resumes there (had to do a reboot for other reasons).

3. to save hdd space I specified the final image output format to be PNG with compression level 2, so IrfanView is called (%j%) to do the conversion.

4. DEL. The tiff made by Neat Image is deleted, leaving only the final PNG.

5. Finally, gsar.exe (general search and replace) is run and told to increment the frame number to cut in the .avs file


Then we just go back to #1 and start the next cycle!

Dr3
10th January 2006, 20:06
...k that appears when i start the *.bat

C:\Batches>D:
D:\>CD \
D:\>CD "D:\Encoding\Neat Image"
D:\Encoding\Neat Image>SET a="C:\temp\process.avs"
D:\Encoding\Neat Image>SET b="C:\temp\000000.bmp"
D:\Encoding\Neat Image>SET d="C:\Images\outframe.
D:\Encoding\Neat Image>SET e="C:\NI\Babel2.dnp"
D:\Encoding\Neat Image>SET f="C:\NI\Babel2.nfp"
D:\Encoding\Neat Image>SET g="C:\Windows\gsar.exe"
D:\Encoding\Neat Image>SET h="C:\Program Files\AVS2AVI\avs2avi.exe"
D:\Encoding\Neat Image>SET i=NeatImage.exe
D:\Encoding\Neat Image>SET j="D:\Graphics\IrfanView\i_view32.exe"
D:\Encoding\Neat Image>SET k=/convert=

D:\Encoding\Neat Image>"C:\Program Files\AVS2AVI\avs2avi.exe" "C:\temp\process.a
vs" -q -o n -c null 1>nul

D:\Encoding\Neat Image>NeatImage.exe "C:\temp\000000.bmp" "C:\Images\outframe.00
001.tiff" "C:\NI\Babel2.dnp" "C:\NI\Babel2.nfp" /mf /sl

D:\Encoding\Neat Image>"D:\Graphics\IrfanView\i_view32.exe" "C:\Images\outframe.
00001.tiff" /convert="C:\Images\outframe.00001.png


...this is where the IrfanView Error appears saying: "Error! Can't load C:\images\outframe.00001.tiff"

Is it important to compress the images?

rfmmars
10th January 2006, 22:08
Holy crap! The guy damned stole my idea! I let him know some time ago on his forum about my tool...

Yes it's easy to use and excellent, "But Wait" my 97 min. clip render will take 92 hours on a 3.1 gig AMD. Good things take longer.

Richard

Isochroma
11th January 2006, 02:51
Check in your C: drive under "C:\Images\outframe.00001.tiff"...

If the file exists, then something weird is going on; if there's no file there, then Neat Image isn't processing anything, or there's a file there but the name is not outframe.00001.tiff

Depending on which case applies, different solutions may exist. I'll recheck this post tomorrow morning when I get some energy back...

Dr3
11th January 2006, 07:20
That's what I mean...there is not a single image file being processed because there is no outframe.00001.tiff

Isochroma
11th January 2006, 19:25
Ok, next step is to check c:\temp for the process.avs file.

Here's the file from one of my current jobs:

AVISource("G:\Shinjuku\AVISynth Scripts\Escaflowne\VOB Input\Escaflowne.IP.TC.LS.FFT3D.TX.avi")
Trim(099431,-1)
ConvertToRGB24()
ImageWriter("D:\NB-Temp\EF\", 0, 0, "bmp")

When i double-click on this avs file, it will save a .bmp of frame 99431 as "D:\NB-Temp\EF\000000.bmp"

This is where the whole process starts. So if you have such a .bmp file in the directory listed in this .avs, open it with paint and see if it looks like the first frame of your video. If it doesn't exist, you may have an outdated copy of AVISynth or the AVI you specified couldn't be decoded or read. If you open the .avs in VirtualDub, the video input/output panes will give you more diagnostic info as well.

So, if you don't have the .bmp file in the specified location, then try double-clicking this avs file and see if it drops said .bmp in the location. If it doesn't, next step is to try to open the AVI file specified.

We'll narrow it down until the bug is caught for sure!

Dr3
11th January 2006, 20:57
Cool thx for the help...I appreciate it! ^^

Well when I double-click the process.avs:

AVISource("F:\MyEncodes\Babel2\Episode1\test.avi")
Trim(00002,-1)
ConvertToRGB24()
ImageWriter("C:\temp\", 0, 0, "bmp")


...and NO .bmp is being created.

So you say the AVI is problem. I made the AVI with the ffdshow makeAVIS of my .avs which is:

function Preset0(clip c) {
c
DeGrainMedian(limitY=5,limitUV=7,mode=0)
LimitedSharpen(ss_x=2.0, ss_y=2.0, Smode=3, strength=800)

WarpSharp(depth=25, blur=2, bump=128, cubic=-0.6)
return last
}
mpeg2dec3_Mpeg2Source("F:\MyEncodes\Babel2\Episode1\Episode1.d2v")

FieldHint(ovr="F:\MyEncodes\Babel2\Episode1\Episode1.d2v.fh.txt")
FieldDeinterlace(blend=true,dthreshold=7)

PresetClip0=Preset0()
PresetClip0.Trim(0,41297)

Decimate(cycle=5,quality=3,ovr="F:\MyEncodes\Babel2\Episode1\Episode1.d2v.dec.txt")

Crop(8,2,-8,0)
LanczosResize(640,480)

Isochroma
11th January 2006, 21:37
ok, when you open the .avs in vdub, do you see your video?

Dr3
11th January 2006, 21:51
The .avs file YES but the created .avi, NO...at the bottom of vdub it says:

"Error decompressing video frame #: The operation is not supported (error code -1)

Isochroma
11th January 2006, 22:23
Sorry I meant your original avi file, was that the one you tried to open? The problem may be with the virual avi made by ffdshow. You can open that in vdub right?

Dr3
12th January 2006, 01:18
No, I can't open the .avi created by makeAVIS (error)

Isochroma
12th January 2006, 01:32
Ah! So there's your problem. If your script doesn't include fft3d, then you should be able to use an alternative framserver called VFAPI (http://www.isochroma.com/Testfiles/NB/apps/VFAPIConv-1.05-EN.zip).

Both the ffds frameserver and VFAPI have several peculiarities, fft3d incompatibility for vfapi, and for both they are sensitive to paths:

1. all files referenced inside the .avs script must be absolute, ie. start with the drive letter, then the path, and finally the file:

"c:\directory\file.avi" but not "directory\file.avi" or even "file.avi"

2. the virtual avi made by VFAPI must not be moved to another folder/drive; one made by by ffdshow should probably be kept in the same location it was originally saved to, and not be renamed. Also, no spaces in the filename might help.

Dr3
12th January 2006, 13:03
k...i installed VFAPIConv 1.05 and ReadAVS but when I want to create a .avi of my .avs it says "Error saving file" under Options. (I also tried to disable all the filters to check if that's the reason, but no luck)...I don't know what's happening lately :(

Isochroma
12th January 2006, 19:12
Your only other option (aside from debugging your script - it does open in vdub right?) would be to open it in vdub and save it as an avi file. Hopefully you have the HDD space to do this.

If neither ffdshow's ffds virtual avi or vfapi will work, there's probably something wrong with your script. I have never been able to make a script which won't work in either, so I think a top priority would be to check your script carefully.

Besides Neat Batch, many other very useful (and sometimes necessary) video editing/conversion processes require (if you don't have hundreds of gigs of HDD space) frameserving using either VFAPI or ffdshow's ffds fourcc files. Thus it would be very useful to figure out why neither is working...

jriker1
2nd April 2006, 01:43
I'm trying to clean up a particularly dirty video from 1960 something that was put on a VHS tape and then moved to digital(mpg). I am trying to extract all the frames to individual images (if I could find the room) then use Neat Image to batch clean the images and put things back. The below script that was quoted by Isochroma in this thread. Do I need to add the Imagewriter line in there also to extract the images as it goes? Or is this something that is pre-run on the video, then you take the video file created from the below script and extract the frames and create NI profiles with the below created file? By the way, wow, I'm getting 0.09 speed in CCE with this script. Thanks.

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
MPEG2Source("Escaflowne.IP.d2v")
Telecide(order=1)
Decimate(cycle=5, mode=0)
Trim(4194,8220)
ConvertToRGB24()
Crop(13,11,696,454)
Lanczos4Resize(704,464)
ConvertToYUY2()
LimitedSharpen(ss_x=2.0, ss_y=2.0, Smode=3, strength=800)

FredThompson
2nd April 2006, 02:57
IMNSHO, this is not a wise procedure. Neat Image is a noise reduction method for individual still images. Video is a series of temporally-linked still images. Neat Image is also intended for the higher resolution of digital cameras. It is slow and tends to overly flatten and posterize video. You might want to try Neat Video which is designed for video but, to be brutally honest, TANSTAAFL.

rfmmars
2nd April 2006, 02:59
IMNSHO, this is not a wise procedure. Neat Image is a noise reduction method for individual still images. Video is a series of temporally-linked still images. Neat Image is also intended for the higher resolution of digital cameras. It is slow and tends to overly flatten and posterize video. You might want to try Neat Video which is designed for video but, to be brutally honest, TANSTAAFL.

Use "Neat Video" for the job.

Richard

Isochroma
2nd April 2006, 03:40
Actually, I found Neat Video to be inferior to Neat Image using the same noise reduction settings, profile, etc.

I use fft3d first to remove the temporal noise, then Neat Image to take out the spacial. It works very well, but does smooth a bit more than either alone.

My current project involves lots of hand-replaced frames and will be done in about 1-2 months. It uses sequential fft3d->Neat Image

jriker1
2nd April 2006, 04:10
Posted the wrong script from the beginning of this thread.

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll")
MPEG2Source("G:\Shinjuku\AVISynth Scripts\Escaflowne\VOB Input\Escaflowne.IP.Tex.d2v")
Telecide(order=1)
Decimate(cycle=5, mode=0)
FFT3DFilter(sigma=3,plane=4)
LimitedSharpen(ss_x=2.0, ss_y=2.0, Smode=3, strength=800)

OK, So I'll run my video through the above, then convert that to images using imagewriter. I'm going to use Neat Image to batch redo the images and then rebuild the video however will not be going through each frame one at a time like it sounds like you are doing. Hopefully Neat Image can bulk convert these by using a single profile for all with decent results.

Also for the comments from people to use Neat Video. I have Adobe After Effects and tried the plugin for it. Kept crashing when I hit "apply" so that's not going to work for me. Also already own Neat Image so if I can use that, all the better.

Isochroma
2nd April 2006, 05:56
Sounds good!

Find a frame of the video that has a good section of just noise - no detail and get a noise profile from that. Then play around with the filter settings on different frames until you find settings that are ok.

FredThompson
19th June 2006, 04:38
Anyone using Neat Image? If so, you might be interested in Noisewave's products which are getting good press lately. If they truly are faster/more accurate.

http://forum.doom9.org/showthread.php?t=112562

Isochroma
19th June 2006, 05:28
Ah, thanks for the info! Will check up on it...

Isochroma
19th June 2006, 17:38
See here (http://isochroma.com/Testfiles/DeltaChroma-2.htm) for comparative screenshots. When you click one of the three links for each image (text), you will be end up at a page with the image. Click the image to flip between raw/denoised. Note: use Internet Explorer because other browsers handle layers differently; otherwise, you may see the image shift between layer flips.

Fizick
19th June 2006, 18:00
Such method can be used for anime only, and even for anime it produced blurred pictures.
Spatial smoothers is bad thing for video . it produces stir.
For real video we must use temporal (spatial-temporal), motion compensated denoisers for best results.
All IMHO. :)

Isochroma
19th June 2006, 18:14
Yes, it smooths live-action too much. Do you have any suggestions for a purely temporal filter? Perhaps the MVDenoise motion-compensated one is best?

Fizick
19th June 2006, 19:30
Wait next version of MVTools ;)

SirCanealot
21st June 2006, 11:38
I really don't see the big thing. I can get that level of smoothing by slapping a load of the filters I currently use on at fairly high levels. Am I missing something? Does this do something my current filter chain does not?