Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th March 2007, 11:44   #1  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
EEDIBob - Batch Image Deinterlacing

Hi guys,

After some testing I found a solution that just blew me away with the results.
First of all, big thank you to Didée, scharfis_brain and all of the devs of the required filters.
Most of the time I work with DV video & finding a good deinterlacer is a challenge.
Recent script functions like MVBob, MCBob do a realy good job and this is another exploatation of MCBob by Didée.
Actualy, this is a helper script function built in the MCBob v0.3 called EEDIBob, courtesy of scharfis_brain.

I use this technique for deinterlacing still images, freeze frames from PAL DV video.
I did some testing with TDeint, Bob, Decomb, MVBob, MCBob and finally EEDIBob.
To my eyes EEDIBob output looks amazing, does the job perfectly, even in fast motion scenes.

This is the script that I use:
Code:
SetMemoryMax(512)
Import("C:\Program Files\AviSynth 2.5\plugins\MCBob_v03c.avs")
ImageReader("D:\Image17.jpg") # ( original source size 787,576 - timeline frame export from Vegas)
ConvertToRGB32() # ( imagereader requires RGB input source )
AssumeFrameBased()
Crop(41, 0, -42, -0) # ( crop to 704,576 for PAL / width MUST be even )
ConvertToYV12(interlaced=true) # ( EEDIBob, McBob works in YV12 colorspace )
AssumeBFF() # ( set field order correctly/check with VDub )
EEDIbob() # ( default parameters work just fine, but feel free to experiment )
SelectEven()
ConvertToRGB32()
ImageWriter("D:\Image02", start = 01, end = 01, type = "png", info = true)
If there is anything wrong with it, or maybe just a optimization tips, I'm open for suggestions.

I need a help with creating a batch script for processing multiple files at once.
I'm not very good with batch files so, if anyone can help, it would be a timesaver for me.
Also maybe GUI for this function would be great.
Maybe something similar to neuron2's JPEG Deinterlacer

The batch should give an option to modify:
  • %IMAGE_INPUT%
  • %IMAGE_INPUT_FOLDER%\%IMAGE_NAME%
  • %IMAGE_OUTPUT%
  • %IMAGE_OUTPUT_FOLDER%\%IMAGE_NAME%
  • %OUTPUT_NAMING_SCHEME%
  • %GENERATE_FILENAME_FROM_INPUT%
  • %FRAMES_WRITEN%
  • %OUTPUT_TYPE_FORMAT%
If someone can think of anything else, please post your suggestion.

This deinterlacing method works much better than Photoshop's Video Deinterlacing Filter.
I think it would be very useful for other forum members as well.
PLEASE NOTE: I am using this deinterlacing method ONLY for images !!!

Thanks for any contributions upfront.

DSP8000

Last edited by DSP8000; 8th March 2007 at 19:38.
DSP8000 is offline   Reply With Quote
Old 7th March 2007, 13:28   #2  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Have you tested speed against SecureBob? The speed difference should be minimal, but SecureBob should reduce EEDI2's shimmering noticeably. (Not like mcbob, of course, but we don't all have overclocked demons...) That was my result in testing, hm, 9 months ago or so. SecureBob uses a simple motionmask to blend in detail from both fields in static areas. In active scenes, there will be minimal difference.
foxyshadis is offline   Reply With Quote
Old 7th March 2007, 13:58   #3  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
But isn't SecureBob supposed to exhibit up-and-down bobbing on static scenes? I was refraining from using it instead of TDeint+EEDI2 as an alternate clip for TIVTC on my Simpsons rips for that reason.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.

Last edited by Chainmax; 7th March 2007 at 14:02.
Chainmax is offline   Reply With Quote
Old 7th March 2007, 14:03   #4  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
The speed it is not very important for me.
As long as I can get perfect looking deinterlaced picture I'll use whatever produces the best results.
I remember, I did some tests with SecureBob a while ago, but I'll give it a go again.
The script that I posted in my previous post does the job for me, but I need batch or GUI solution for multi file processing.
DSP8000 is offline   Reply With Quote
Old 7th March 2007, 14:17   #5  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Of course SecureBob has some bobbing/shimmering, it uses only very simple masking. TDeint+EEDI might be better, I'm not sure, but there's no TDeint in EEDIBob(). =p

EEDIBob will actually probably perform best on fast scenes. The areas you'd most notice a problem are text overlays and still scenes.

But if it's a single image, now that I read the entire post, I don't think you can get any better than EEDI. Aside from text overlays, which you'd have to mask off manually. (Like a timestamp.)

Last edited by foxyshadis; 7th March 2007 at 14:20.
foxyshadis is offline   Reply With Quote
Old 7th March 2007, 15:07   #6  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Do you still have the original video, or only the individual frames? If you have the original video you could pass that through mv/mcbob and then trim down to the single frame you want. This will allow you to keep (if there is any) detail available from other frames.

David
wonkey_monkey is offline   Reply With Quote
Old 7th March 2007, 16:37   #7  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
I do have the original video, but as I edit, do effects, color correction... I take freeze frames that I later on use them for a picture slideshow or highlights.

Manualy deinterlacing all of them just takes too much time.
The JPEG Deinterlacer by neuron2 does exactly this.

Batch or GUI solution would do the job automated, but based on the parameters that I use in the script.
DSP8000 is offline   Reply With Quote
Old 7th March 2007, 16:42   #8  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
Speaking of eedi. What if I tell you that eedi will be superseded by something else that uses a completely different method and is much better at retaining sharpness, avoiding artifacts, and maintaining spatial/temporal steadiness within a couple of months or so?

Anyways, DSP8000.
Quote:
Originally Posted by DSP8000
As long as I can get perfect looking deinterlaced picture I'll use whatever produces the best results.
The closest you'll get to perfectly deinterlaced frames, is by using the latest version of mcbob(). Make sure to tweak the default settings.
Terranigma is offline   Reply With Quote
Old 7th March 2007, 17:03   #9  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
Originally Posted by Terranigma View Post
Speaking of eedi. What if I tell you that eedi will be superseded by something else that uses a completely different method and is much better at retaining sharpness, avoiding artifacts, and maintaining spatial/temporal steadiness within a couple of months or so?

The closest you'll get to perfectly deinterlaced frames, is by using the latest version of mcbob(). Make sure to tweak the default settings.
Will this new thing beat EEDI2 on a single interlaced frame, or does it need to work on a set of frames? I ask because, after testing, it seems to me that mcbob reduces to EEDI2 in the case of a single frame, which is what DSP's working on.

David
wonkey_monkey is offline   Reply With Quote
Old 7th March 2007, 17:34   #10  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
Quote:
Originally Posted by davidhorman View Post
Will this new thing beat EEDI2 on a single interlaced frame, or does it need to work on a set of frames? I ask because, after testing, it seems to me that mcbob reduces to EEDI2 in the case of a single frame, which is what DSP's working on.

David
Well, EEDI2's not being worked on anymore (according to tritical). The replacement has been in development for over 6 months now. Now I don't know the full details yet, but about it being better. That's a definate yes. Watch this space!
Terranigma is offline   Reply With Quote
Old 7th March 2007, 21:16   #11  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
If you can keep temporal sharpness with a single frame, you've just invented psychic deinterlacing. Better reconstruction/interpolation methods are nice, though, of course. Especially if it has the level of static stability that mcbob does, while being faster, but as always we'll have to see what actually shows up. Can't deinterlace on promises alone. XD
foxyshadis is offline   Reply With Quote
Old 8th March 2007, 01:13   #12  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
Quote:
Speaking of eedi. What if I tell you that eedi will be superseded by something else that uses a completely different method and is much better at retaining sharpness, avoiding artifacts, and maintaining spatial/temporal steadiness within a couple of months or so?
I'm all ears, can't wait to test it.

Quote:
retaining sharpness, avoiding artifacts, and maintaining spatial/temporal steadiness
After some testing(again) I found that even that EEDIBob does an excellent job on a single frame, looses a bit of sharpness.
For me, that's not a big issue, considering that I'm processing pictures. ATM I'm doing a full video test just to see how performs on video as well.

Current processing speed 2.20FPS

Any tips on how to incorporate this deinterlacing technique in my first ever GUI?
DSP8000 is offline   Reply With Quote
Old 8th March 2007, 09:03   #13  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
Well, seems like there's no easy solutions for my needs. I've searched thru the forum & the only thing that's getting close to what I want is avsutil, which does not work at all.

Here's couple of questions:


How do I get ImageWriter to write just one frame & then exit?
How do I open the avs script without MPC, mplayer, Vdub... & then exit?
How to produce 1 frame with avsutil(also maybe updated working binary) & then exit the program?
And finally,
How do I automate this process?

I found AVISynth Batch Scripter & modified the settings.ini to read images in jpg, jpeg format & that part of the problem is solved & works well.

Any help is greatly appreciated
DSP8000 is offline   Reply With Quote
Old 8th March 2007, 10:51   #14  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
How do I open the avs script without MPC, mplayer, Vdub... & then exit?
Have you tried avs2avi? It's a command-line AVS renderer.

David
wonkey_monkey is offline   Reply With Quote
Old 8th March 2007, 13:49   #15  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
You could use AvsP and save the image that comes up, and drive it with macros. Or save images from virtualdub's file menu, and drive it with sylia script. Both overcomplicated solutions when avs2avi will probably work.

btw, you're probably better off using imagereader(end=0) if you're not splicing it into another video, to prevent all the duplicate frames from being written out.
foxyshadis is offline   Reply With Quote
Old 8th March 2007, 16:51   #16  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
After the suggestions from foxyshadis & davidhorman I finally found very good solution that automates the process.


The batch will process 20 images/pictures with avs2avi & put them in DEINT_IMAGES folder.
It's not a GUI solution, but it works
I'll post all of the required filters & the batch file tomorrow.

Last edited by DSP8000; 8th March 2007 at 19:35.
DSP8000 is offline   Reply With Quote
Old 9th March 2007, 02:59   #17  |  Link
HeadBangeR77
Registered User
 
HeadBangeR77's Avatar
 
Join Date: Dec 2006
Location: Heidelberg (DE), Kraków (PL)
Posts: 519
Quote:
Originally Posted by DSP8000 View Post
The batch will process 20 images/pictures with avs2avi & put them in DEINT_IMAGES folder.
It's not a GUI solution, but it works
I'll post all of the required filters & the batch file tomorrow.
I would be very much interested, yet from other reasons: mostly denoising, sometimes subtle sharpening instead of just using UnsharpMask. Waiting impatiently.

cheers,
HDBR77
__________________
"Only two things are infinite: the universe and human stupidity, and I'm not sure about the former."
HeadBangeR77 is offline   Reply With Quote
Old 9th March 2007, 11:33   #18  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
EEDIBob_BATCH_DEINTERLACE

OK, here we go,

This is automated image/picture deinterlacing batch that will process the files in the provided directories.
In the package are included all of the required filters/plugins, so first of all you'll have to unzip'em in your AVISynth plugins directory. There is a separate folder for the deinterlaced pictures and be sure to double check the dirs in the scripts and the batch files.
I find this deinterlacing batch very useful, for deinterlacing freeze frames from DV video that I use almost every day.
I've tested a lots of deinterlacers and to my eyes EEDIBob does excellent job. Of course, you can modify the scipts or the batch to suit your needs.

After searching the forums I couldn't find a solution for my needs, so here we are. Maybe this will be useful to someone else.

Thanks again to Didée for providing MCBob and scharfis_brain for EEDIBob, foxyshadis, davidhorman, ABatchScripter, avs2avi.

Here's the link for the batch EEDIBob_BATCH_DEINTERLACE.7z

DSP8000
DSP8000 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.