Log in

View Full Version : Improving resolution


Pages : 1 [2] 3 4 5

carlmart
16th March 2009, 18:31
OK. With some help from the friends on another topic, at least I could run Blue_MiSfit script in VirtualDubMod.

Probably due to something I'm missing, I get errors from the lines

TempGaussMC_Alpha3()

lsfmod(smode=5)

grainfactory3(g1str=5, g2str=8, g3str=10)
addgrainc(0,2)

Without them I can get the file to run, but not as smoothly as it should.

carlmart
16th March 2009, 18:47
2Bdecided,


Would love to try your script... as soon as I solve the problems I described above.


Note: to match HDV, the size needs to be 1440x1080. Using NNEDI gives a little useful anti-aliasing of some diagonals - the difference is just visible.

About HDV, I have yet to determine to what format will it be exported for editing and after editing. This should be the format the DV should get to too.

As for downsizing HDV to match this DV - I think the HDV clip you supplied is a little over exposed and requires colour matching, but a simple bob, resize, slight soften and then (over!) sharpen will match quite well.

Yes, it's a bit over exposed. Exposure is something I will be more careful next time I shoot with both cameras. In general I prefer video to be a bit over exposed, as long as highlights are not blocked out. Detail you don't get in video for overexposure won't get back, but so are if it's lost in underexposure noise.

WorBry
16th March 2009, 20:24
Just a comment about the halo-ing. I see its already present in your source DV sample and most likely a by-product of the camcorders internal (electronic) sharpening mechanism. 3CCD DV cams in particular are quite prone to it, including my Panasonic NV-GS400, which, in auto-mode, has a bias toward slight over-sharpening....all part of the illusion of crisp detail ;). I've had little success myself at eliminating it in-post, at least with the commonly used AVS de-halo filters. If your PDX10 allows you to manually adjust the picture sharpness, you might find some benefit in turning it down a notch or two.

carlmart
16th March 2009, 22:03
David:

These were the only filters I could get to work from your suggestions:


LoadPlugin("C:\video\AviSynth 2.58\plugins\FFT3dGPU.dll")
LoadPlugin("C:\video\AviSynth 2.58\plugins\addgrain.dll")
LoadPlugin("C:\video\AviSynth 2.58\plugins\nnedi.dll")
LoadPlugin("C:\video\AviSynth 2.58\plugins\RSharpen.dll")
import("C:\video\AviSynth 2.58\plugins\LimitedSharpenFaster.avsi")
import("C:\video\AviSynth 2.58\plugins\BlindDeHalo3.avs")

AVISource("C:\pedro\testDV1_a.avi")

converttoyv12(interlaced=true)

#a=last

nnedi(field=0,dh=true).TurnRight().nnedi(field=0,dh=true).TurnLeft()

limitedsharpenfaster()

spline36resize(1280,960)

sharpen(0.5)

spline36resize(1440,1080)

limitedsharpenfaster()

#interleave(last,a.Bob().spline36resize(1440,1080))

return last

separatefields.selectevery(4,0,3).weave


Things that resulted in errors were:

TempGaussMC_Alpha3() (This is obvious, because I can't find it for download)

BlindDeHalo3(rx=3.2,ry=4.5): it's on my script directory. Could make it work.

grainfactory3(g1str=2, g2str=4, g3str=5)
addgrainc(0,2): it's on my script directory.

Thanks,


Carlos

2Bdecided
17th March 2009, 11:23
OK, firstly, you don't need to use "LoadPlugin" for things in your AVIsynth plugin folder - they will auto load. Not sure why (other) people include these useless lines in their scripts.

Secondly, you need to Google for each filter. Just googling AVIsynth and then the filter name usually finds it. Some are .dll files (in zip archives) - put the .dll in your AVIsynth plugins folder. Some are scripts/functions posted as text files or quotes in posts right here on doom9 - save those with the filters filename, with the extension .avsi, in the avisynth plugins folder.

The problem with functions like TempGaussMC_Alpha3 (and the comparable mcbob, which FWIW I think is fractionally grittier (in a good way!) in this case) is that they depend on many many other filters. It's a real pain tracking them down - if you find the appropriate thread on doom9 (again, Google is your friend) you'll probably find a list with download links. If not, Google each name separately.

Before you do all this, you probably want to see what this script achieves - you might not think it's worth it (I'm not sure I do). So I'll try to upload an example somewhere soon.

Cheers,
David.

2Bdecided
17th March 2009, 11:44
Here is frame 98:

http://www.mediafire.com/?sharekey=605ee2b5f85656f5e62ea590dc5e5dbb5d75094fb909faa7b8eada0a1ae8665a

I don't have a GPU, so that's not exactly Blue_MiSfit's script - I used FFT3DFilter instead. Also, I used 1440x1080 on both scripts for easy comparison. For all the differences in the scripts, 90% of the visible difference is due to the dehalo.

Notice how "forgiving" of faults 1280x720 is compared with 1440x1080. 1920x1080 is slightly worse again.


I don't think his hair looks very natural after dehaloing and sharpening. The dehalo line removes the nasty halos, but it also removes far too much real detail (look at the bottom end of the guitar(?) strings where they go over the white part). You can do more or less dehaloing by changing the dehalo parameters - there's a "strength" parameter too - the default is 125.


Ditto what WorBry said - if you can reduce the sharpening in the DV camera, you'll get a much more pleasing result. With less/no AVIsynth dehaloing (and less sharpening), it'll look less like a cartoon / plastic - though that look is somewhat inevitable when upscaling.


If you're stuck with the halos (and I am on my old DV footage - no chance to re-shoot it!) I think it's time to beg one of the gurus here to take another look at dehaloing.

Cheers,
David.

carlmart
17th March 2009, 17:37
OK, firstly, you don't need to use "LoadPlugin" for things in your AVIsynth plugin folder - they will auto load. Not sure why (other) people include these useless lines in their scripts.

You were right. But I did have to include the "import" lines.

Secondly, you need to Google for each filter. Just googling AVIsynth and then the filter name usually finds it. Some are .dll files (in zip archives) - put the .dll in your AVIsynth plugins folder. Some are scripts/functions posted as text files or quotes in posts right here on doom9 - save those with the filters filename, with the extension .avsi, in the avisynth plugins folder.

I'm already doing that, googling to find the filters. When I ask here is because I didn't find it. The extension has to be avs or avsi? I am not quite sure about that. The scripts/functions are all on my plugin directory.

The problem with functions like TempGaussMC_Alpha3 (and the comparable mcbob, which FWIW I think is fractionally grittier (in a good way!) in this case) is that they depend on many many other filters. It's a real pain tracking them down - if you find the appropriate thread on doom9 (again, Google is your friend) you'll probably find a list with download links. If not, Google each name separately.

Will probably have to look further. What does TempGaussMC_Alpha3 do? Can I replace it for some other filter?

carlmart
17th March 2009, 17:49
Here is frame 98:

http://www.mediafire.com/?sharekey=605ee2b5f85656f5e62ea590dc5e5dbb5d75094fb909faa7b8eada0a1ae8665a

I don't have a GPU, so that's not exactly Blue_MiSfit's script - I used FFT3DFilter instead. Also, I used 1440x1080 on both scripts for easy comparison. For all the differences in the scripts, 90% of the visible difference is due to the dehalo.

Notice how "forgiving" of faults 1280x720 is compared with 1440x1080. 1920x1080 is slightly worse again.


I don't think his hair looks very natural after dehaloing and sharpening. The dehalo line removes the nasty halos, but it also removes far too much real detail (look at the bottom end of the guitar(?) strings where they go over the white part). You can do more or less dehaloing by changing the dehalo parameters - there's a "strength" parameter too - the default is 125.


Ditto what WorBry said - if you can reduce the sharpening in the DV camera, you'll get a much more pleasing result. With less/no AVIsynth dehaloing (and less sharpening), it'll look less like a cartoon / plastic - though that look is somewhat inevitable when upscaling.


If you're stuck with the halos (and I am on my old DV footage - no chance to re-shoot it!) I think it's time to beg one of the gurus here to take another look at dehaloing.


Comparing the photos you uploaded, I certainly do not want the halos like on the subject's right arm or on the nose. That you can see more clearly on dv_upscale_Blue_MiSfit_frame98_1440x1080. I am always looking for a film-like look, and the border sharpening is something I never like in video. That doesn't mean I prefer a soft image, as I do not.

What I would like to do now is to be able to output some video file that I can load on VLC and compare it to my original DV file. How can I do that?

2Bdecided
17th March 2009, 18:56
You were right. But I did have to include the "import" lines. ... The extension has to be avs or avsi? I am not quite sure about that. The scripts/functions are all on my plugin directory..avsi files in the plugin folder are autoloaded (no need for import) .avs are not autoloaded.

Will probably have to look further. What does TempGaussMC_Alpha3 do? Can I replace it for some other filter?It's an excellent deinterlacer. You could try mcbob, but it also requires many other filters.

You can try just bob() if you want, but it will look really bad.


Comparing the photos you uploaded, I certainly do not want the halos like on the subject's right arm or on the present. That you can see more clearly on dv_upscale_Blue_MiSfit_frame98_1440x1080. I am always looking for a film-like look, and the border sharpening is something I never like in video.That's what is in your original - BlueMiSfit didn't really make it any worse. It just looks worse when upscaled, because it covers 4 pixels rather than 1!.

What I would like to do now is to be able to output some video file that I can load on VLC and compare it to my original DV file. How can I do that?You can play the avs file directly in, say, mplayer, but I doubt it'll play in real time. So yes, you need to encode to something. There are a million ways - VirtualDub for the formats it supports (anything with a VFW (video for windows) codec), HCenc for MPEG2, MeGUI for MPEG4 (x264, XviD etc) - there are hundreds of options. Even some NLEs take avs files as an input, and encode them to all supported format.

You need to pick a format (that your machine can play!) and then encode to it.

What format do you intend editing with? I don't have a real HDV encoder on this machine, though I have several generic MPEG-2 encoders that will get close.

Cheers,
David.

carlmart
17th March 2009, 19:55
.avsi files in the plugin folder are autoloaded (no need for import) .avs are not autoloaded.

Then I can name them all avsi and that's it?


It's an excellent deinterlacer. You could try mcbob, but it also requires many other filters.

You can try just bob() if you want, but it will look really bad.

Bad I do not want. Better yes. The question now is not try them, but to find them.


That's what is in your original - BlueMiSfit didn't really make it any worse. It just looks worse when upscaled, because it covers 4 pixels rather than 1!.

There's a light border following the upper right arm that is not in the original.

You can play the avs file directly in, say, mplayer, but I doubt it'll play in real time. So yes, you need to encode to something.

Just tried in Mplayer, and no, I couldn't get any real time play.


There are a million ways - VirtualDub for the formats it supports (anything with a VFW (video for windows) codec), HCenc for MPEG2, MeGUI for MPEG4 (x264, XviD etc) - there are hundreds of options. Even some NLEs take avs files as an input, and encode them to all supported format.

Having the NLE process it would be cool. But I don't know if Avid accepts avs files.

For now it would only be a matter of dealing with this test and watch it with VLS, normal and upscaled.


You need to pick a format (that your machine can play!) and then encode to it.

What format do you intend editing with? I don't have a real HDV encoder on this machine, though I have several generic MPEG-2 encoders that will get close.


AFAIK you shouldn't edit in HDV, or at least not let the program process anything, or it will compress things back to HDV.

Blue_MiSfit
18th March 2009, 00:05
You won't get ANYTHING near realtime with tempgaussMC_alpha3 :)

It's one of the best bob-deinterlacers (aka taking 29.97i and converting to 59.94p as part of the upconversion process) available, but it's also quite slow!

I'd expect less than 1fps for rendering your DV footage into HD. Get ready to wait a _long_ time!!!

If TempGaussMC is too slow, you can use my old script, which used YADIFMod+NNEDI, which is pretty good itself.

As far as an output codec, I'd suggest MJPG (you can use FFDShow's VFW MJPG encoder to do this in VirtualDub). A better choice would be DNxHD, as it's a native Avid codec, and is "almost" lossless (very similar to CineForm and ProRes). ffmpeg's recent official .5 release supposedly supports encoding and decoding DNxHD, but I've never tried it :) This may help: http://itbroadcastanddigitalcinema.com/ffmpeg_howto.html#Encoding_VC-3

Also, for finding plugins etc, I usually start on warpenterprises (http://avisynth.org/warpenterprises/) Most stuff here is pretty up to date. TempGaussMC_alpha3 is an avsi script that Didee wrote and is sitting in a thread here somewhere... this project is actually the first time I've tried it, and I was completely blown away by its quality!

Sorry I haven't been in this thread more - work and the rest of my pesky real life has been a real drain lately! I want to help you as much as possible!!

~MiSfit

carlmart
18th March 2009, 01:06
You won't get ANYTHING near realtime with tempgaussMC_alpha3 :)

It's one of the best bob-deinterlacers (aka taking 29.97i and converting to 59.94p as part of the upconversion process) available, but it's also quite slow!

I'd expect less than 1fps for rendering your DV footage into HD. Get ready to wait a _long_ time!!!

That is a rate of 24/1 for each outputted minute! Wow!!!

If TempGaussMC is too slow, you can use my old script, which used YADIFMod+NNEDI, which is pretty good itself.


It should be nice comparing them. But for that I do have to watch them on a larger, higher resolution screen.

In any case I wouldn't have to upscale the whole stuff, as the HDV shots would lead the way in the final editing.

As far as an output codec, I'd suggest MJPG (you can use FFDShow's VFW MJPG encoder to do this in VirtualDub).

That sounds interesting. Will have to find out how to do that. There should be a VD plugin.

A better choice would be DNxHD, as it's a native Avid codec, and is "almost" lossless (very similar to CineForm and ProRes). ffmpeg's recent official .5 release supposedly supports encoding and decoding DNxHD, but I've never tried it :)

This may help: http://itbroadcastanddigitalcinema.com/ffmpeg_howto.html#Encoding_VC-3

Thanks.

Also, for finding plugins etc, I usually start on warpenterprises (http://avisynth.org/warpenterprises/) Most stuff here is pretty up to date. TempGaussMC_alpha3 is an avsi script that Didee wrote and is sitting in a thread here somewhere... this project is actually the first time I've tried it, and I was completely blown away by its quality!

That's why I would like to try it. I even sent a pm to Didee to see if he could help me. I found what I think is the script for that avsi file, but I am not sure if it's right or if there were further corrections for it later on. When I run it I get an error message saying "There's no function named MVAnalise"

Sorry I haven't been in this thread more - work and the rest of my pesky real life has been a real drain lately! I want to help you as much as possible!!

I thought my shallow avisynth knowledge had made you give up on me! :)

carlmart
18th March 2009, 01:12
Today I was trying to get some information to see to what HD format should I got to, and I saw this comment:

" The issues of upconversion relate to image quality. A standard definition image will turn into a standard definition image with more scan lines. Increasing the scan line count will reduce some of the problems associated with our current television system. The image, however, is still short on the high frequency detail that makes a higher resolution image. Also, a standard image with 350,000 pixels upconverted to a two million pixel image will challenge the DTV encoder unnecessarily and degrade the image further at the home DTV receiver. Since the DTV standards allow for broadcast of what is essentially our current television resolution, the image will look better if it is transmitted as SDTV and not upconverted to an artificially high pixel count."

Hopefully we get to do a bit more than artificially high pixel count!... :rolleyes:

Blue_MiSfit
18th March 2009, 02:16
That's why I would like to try it. I even sent a pm to Didee to see if he could help me. I found what I think is the script for that avsi file, but I am not sure if it's right or if there were further corrections for it later on. When I run it I get an error message saying "There's no function named MVAnalise"

Didee gets lots of PMs! He probably can't respond to all or any of them!

The MVAnalyse error is because TempGaussMC requires MVTools, which you can get from avisynth.org.ru. You want MVTools, not MVTools2 :)

The other dependencies (I think) are NNEDI, and MaskTools2, plus RemoveGrain and Repair.

Here's a nice AviSynth plugins package that should get you up and running! Tracking all these down is a total nightmare!
http://www.mediafire.com/?sharekey=47de74c3f78774007f7ec40ada4772a656ab3d7c1775e105c95965eaa7bc68bc

What are your system specs?

~MiSfit

2Bdecided
18th March 2009, 10:58
Today I was trying to get some information to see to what HD format should I got to, and I saw this comment:

" The issues of upconversion relate to image quality. A standard definition image will turn into a standard definition image with more scan lines. Increasing the scan line count will reduce some of the problems associated with our current television system. The image, however, is still short on the high frequency detail that makes a higher resolution image. Also, a standard image with 350,000 pixels upconverted to a two million pixel image will challenge the DTV encoder unnecessarily and degrade the image further at the home DTV receiver. Since the DTV standards allow for broadcast of what is essentially our current television resolution, the image will look better if it is transmitted as SDTV and not upconverted to an artificially high pixel count."

Hopefully we get to do a bit more than artificially high pixel count!... :rolleyes:But that's just saying that you should broadcast SD as SD. Fair enough for a full SD programme - but not practical for a programme that intercuts SD and HD.

Also common experience is that good SD>HD upconversion by the broadcasters (never mind these 1/25th real-time scripts!) is far far far better than anything a STB or TV can achieve - so what that quote says is simply wrong: properly upconverted SD>HD, broadcast in HD, will look far better than the same content broadcast in SD.


btw, TGMCa3 is here:
http://forum.doom9.org/showthread.php?p=1138514#post1138514

There's also beta1 and beta2. I don't think they're quite as good as alpha3 for my (soft HDV) footage, though they are sharper (if the original is sharp) and faster (with default settings), so may be more useful to you on your footage.

I can't find a post listing all the filters you need. It's a case of running it, reading the error message, and googling for what it says you're missing.

Cheers,
David.

P.S. I don't think Yadifmod with NNEDI is very good when things with fine details are moving...
http://www.hochladen.info/image/XZuDK47Z5dogwLs/tv-stars-promis-urlaub-party-sport-auto/

carlmart
18th March 2009, 21:26
Didee gets lots of PMs! He probably can't respond to all or any of them!

I guessed that.

The MVAnalyse error is because TempGaussMC requires MVTools, which you can get from avisynth.org.ru. You want MVTools, not MVTools2 :)

Corrected and working! :)

The other dependencies (I think) are NNEDI, and MaskTools2, plus RemoveGrain and Repair.

Your original script is working alright. Now I need a way to output it to some HD format so I can watch them and compare them.

Here's a nice AviSynth plugins package that should get you up and running! Tracking all these down is a total nightmare!
http://www.mediafire.com/?sharekey=47de74c3f78774007f7ec40ada4772a656ab3d7c1775e105c95965eaa7bc68bc


Wow, thanks. It's already downloaded.

What are your system specs?


Not that fast, but was fast enough for what I needed. Gigabyte EP31-DS3L, Core2 E6420 and 2GB Patriot. No OC.

carlmart
18th March 2009, 21:39
But that's just saying that you should broadcast SD as SD. Fair enough for a full SD programme - but not practical for a programme that intercuts SD and HD.

I think the comments might have been a bit old, when converters were not that good, or when NLEs did not intercut SD and HD stuff on the same timeline.

Also common experience is that good SD>HD upconversion by the broadcasters (never mind these 1/25th real-time scripts!) is far far far better than anything a STB or TV can achieve - so what that quote says is simply wrong: properly upconverted SD>HD, broadcast in HD, will look far better than the same content broadcast in SD.

My idea that things could be better for SD stuff came from seeing what a DVD upscaler could achieve. If in fact that is true, and not just pushing up contrast and color saturation, then there might be something there. My query here is to see how far we can get and get away with it.


btw, TGMCa3 is here:
http://forum.doom9.org/showthread.php?p=1138514#post1138514

Thanks. That had been the one I had downloaded as text and made a script with. There was not an actual zip file with it. But fortunately I am getting smarter. Well, as someone would say: you can not go anywhere but up from where I am. ;)

There's also beta1 and beta2. I don't think they're quite as good as alpha3 for my (soft HDV) footage, though they are sharper (if the original is sharp) and faster (with default settings), so may be more useful to you on your footage.

Let's got find them. Setup would be the same as Alpha's?

I can't find a post listing all the filters you need. It's a case of running it, reading the error message, and googling for what it says you're missing.

Yes, I'm getting the catch of it. Next will be how to handle the settings, which should be much more difficult.


P.S. I don't think Yadifmod with NNEDI is very good when things with fine details are moving...
http://www.hochladen.info/image/XZuDK47Z5dogwLs/tv-stars-promis-urlaub-party-sport-auto/

Which one is better in your opinion?

carlmart
18th March 2009, 21:47
As people dealing with 1/4" and 1/3" DV cameras, many of you are certainly aware of the main problem we face with: huge depth of field.

In our test shot, even if I was 6 feet or more from the bush behind the subject and I was relatively close to the man, the leaves are too much in focus.

Sometime I will have to see if there are ways to deal with that in post-production, as during shooting you can only put the camera further away or use a DOF adapter, which swallows 2 or 3 stops.

Has anyone tried an effective method to cheat on that?

Blue_MiSfit
18th March 2009, 23:08
I certainly haven't - and fully understand your problem :(

Maybe when you shoot, manually focus so your subject is at the extreme end of your focal plane? I dunno... :)

Did that plugin package get you up and running with TempGaussMC?

~MiSfit

carlmart
18th March 2009, 23:41
I certainly haven't - and fully understand your problem :(

Maybe when you shoot, manually focus so your subject is at the extreme end of your focal plane? I dunno... :)

Not really. The question is not manually focusing or not, but that because the CCDs are so small, the DOF is too large. When you come from film, as I do, this problem is quite blatant and difficult to live with. You are used to things going in & out of focus almost millimetrically, but with these pro and semi-pro cameras this is impossible. You have to go up 1/2" or 3/4" CCDs to get closer to that, or use a DOF adapter, using photo or film lenses.

You can move away from your subject, but sometimes this is physically impossible.

Did that plugin package get you up and running with TempGaussMC?

Yes, thank you.

Now I have to encode this video onto some HD package I can view with VLC.

Blue_MiSfit
19th March 2009, 01:51
Right. I'd suggest doing the following:

1) Install ffdshow-tryouts, and VirtualDub.
2) Drop the AVS into VirtualDub, and do the following:
3) Video -> Select "Fast Recompress"
4) Video -> Compression -> Select ffdshow Video Codec and click configure
5) Click on "encoder" tab, switch "encoder" type to MJPEG, and switch "mode" to one pass - quality. Set the "quality" slider to ~ 90-100%,.
6) File -> Save as AVI to wherever you want
7) Go get a cup of coffee, because rendering a 480i-1080i clip with TempGaussMC will be brutally slow, as we discussed :)
8) The resulting AVI file should play back in real-time on VLC or any other media player

You should also be able to drop this AVI into your Avid, but that may have mixed results. For example, we may need to store the MJPG video in a MOV container for Avid to stay happy! Thankfully, that's easy enough.

Let us know how it goes :)

~MiSfit

2Bdecided
19th March 2009, 11:10
There's a light border following the upper right arm that is not in the original.There's certainly haloing in the original.

This is the original with a simple (soft) bob and bicubic (i.e. soft) resizing. No edge enhancement, no added ringing, nothing - and the halo is still visible:

http://www.mediafire.com/file/tunmdc5lmj3/dv_upscale_bob_bicubicresize_frame98.jpg


If you don't trust the bob deinterlacer, take a look at the original full frame (some people call this "weaving"), simply upscaled using bicubicresize, without any enhancement:

http://www.mediafire.com/file/wzm10hjydtm/dv_upscale_weave_bicubicresize_frame49.jpg


The original certainly has halos!

Cheers,
David.

2Bdecided
19th March 2009, 11:16
because the CCDs are so small, the DOF is too large.Apart from the options you've already mentioned, you're stuck with it. You can mask the foreground/background and add a blur plug-in - there's even a variableblur script for AVIsynth - but creating the mask is painful. It's possible with still photos, but with video it's more time and trouble than it's worth.

The problem with upscaling and sharpening is that even if your background was a little out-of-focus, all the sharpening will bring it right back into focus. Look at the leaves behind the man (left of screen) - on my upscaled version (http://www.mediafire.com/file/wmmymkknv3t/dv_upscale_2Bdecided_frame98_1280x720_sharp.jpg), they look sharper than the man himself, whereas on the original they were slightly soft. So this processing is making the problem worse.

Some DSLRs shoot video - great for shallow DOF - plenty of other problems though!

As a "film guy" I'm surprised you're shooting 60i. I like it, but most people prefer 24p, and 24p would be slightly easier (and much faster) to upscale, since there would be no need to deinterlace.

Cheers,
David.

smok3
19th March 2009, 14:03
depth of field depends on the object distance, the focal length, the F-number, and on the perceptivity of the observer
http://toothwalker.org/optics/dof.html

about object distance: the closer you are to the subject, the lesser is DOF.

besides using some DSLR, there are adapters like http://www.letusdirect.com/ , but they bring in pack of problems as well (last time i edited material shot with one of those, they forget to turn on the rotating, so i got some necessary shots that looked like sort of a poster...)

carlmart
19th March 2009, 14:36
There's certainly haloing in the original.

That's quite likely. In general haloing, if we are speaking of the same thing, is related to optical resolution. Anti-reflective treatment in the lens elements tend to cure that. This camera lens is just average.

This is the original with a simple (soft) bob and bicubic (i.e. soft) resizing. No edge enhancement, no added ringing, nothing - and the halo is still visible:

http://www.mediafire.com/file/tunmdc5lmj3/dv_upscale_bob_bicubicresize_frame98.jpg


If you don't trust the bob deinterlacer, take a look at the original full frame (some people call this "weaving"), simply upscaled using bicubicresize, without any enhancement:

http://www.mediafire.com/file/wzm10hjydtm/dv_upscale_weave_bicubicresize_frame49.jpg


The original certainly has halos!


Interesting viewing. Thanks, David.

Many of these discussions will get a better result when I watch them as video.

carlmart
19th March 2009, 14:42
http://toothwalker.org/optics/dof.html

about object distance: the closer you are to the subject, the lesser is DOF.

As long as you are using a longer focal length. In my case I was handling both cameras on their tripods, and I couldn't be too far away from the subject. So I had to use wider settings, which increase DOF.


besides using some DSLR, there are adapters like http://www.letusdirect.com/ , but they bring in pack of problems as well (last time i edited material shot with one of those, they forget to turn on the rotating, so i got some necessary shots that looked like sort of a poster...)

Those are what I call DOF adapters. You certainly need to have a rotating mirror rolling all the time, which is what eats up F stops. They are alright for working outdoors or with lots of light.

carlmart
19th March 2009, 14:47
Right. I'd suggest doing the following:

1) Install ffdshow-tryouts, and VirtualDub.
2) Drop the AVS into VirtualDub, and do the following:
3) Video -> Select "Fast Recompress"
4) Video -> Compression -> Select ffdshow Video Codec and click configure
5) Click on "encoder" tab, switch "encoder" type to MJPEG, and switch "mode" to one pass - quality. Set the "quality" slider to ~ 90-100%,.
6) File -> Save as AVI to wherever you want
7) Go get a cup of coffee, because rendering a 480i-1080i clip with TempGaussMC will be brutally slow, as we discussed :)
8) The resulting AVI file should play back in real-time on VLC or any other media player

It's REALLY taking its time to process it. When it first started it said it was going to take 2 hours or so. Now, after 3.38 hours it says it will take more than 5 HOURS (!!!) to process it.

It certainly is not something practical to do. Better to try something else.

You should also be able to drop this AVI into your Avid, but that may have mixed results. For example, we may need to store the MJPG video in a MOV container for Avid to stay happy! Thankfully, that's easy enough.


That's something to worry later on.

carlmart
19th March 2009, 14:55
Still climbing in time left. Almost a 1/1 seconds rate or even more.

I think I will cut the processing.

carlmart
19th March 2009, 15:03
Yes, the estimated rate is climbing at TWICE the rate of the elapsed time. It will take forever to process it. I will cut it.

2Bdecided
19th March 2009, 15:49
You can't do the whole file at that rate! Start by doing 1-2 seconds to make sure it's really working.

You can do this easily - just add "trim(0,60)" to the end of the file and AVIsynth will only process the first 60 output frames.

Cheers,
David.

Blue_MiSfit
19th March 2009, 20:45
:D TempGaussMC is definitely slow.

I'd try YADIFMod + NNEDI, as I suggested in my original script. That should be significantly faster.

What are your PC's specs?

~MiSfit

2Bdecided
20th March 2009, 13:15
With tgmc_a3 in my script, I get 0.25fps on my (old!) PC. Your 624/2 frames took 40 minutes.

I re-sized to 1280x720 and encoded to MPEG-1 progressive 1:1 PAR (should play on anything - try VLC) and uploaded the 13MB result here:
http://www.mediafire.com/?lznmklzwn1l

I'm amazed how good it looks! It's not "HD sharp", but it doesn't scream "upscaled SD" either.


YADIFMod + NNEDI gives pretty good results too - it's not as temporally stable as tgmc_a3, or as sharp - but it's much quicker and still looks nice. I'll upload it later.

Cheers,
David.

smok3
20th March 2009, 13:19
As long as you are using a longer focal length. In my case I was handling both cameras on their tripods, and I couldn't be too far away from the subject. So I had to use wider settings, which increase DOF.
the point is, when using el-cheapo tech (like i do) you just can't do everything...


Those are what I call DOF adapters. You certainly need to have a rotating mirror rolling all the time, which is what eats up F stops. They are alright for working outdoors or with lots of light.
are you sure? :)

carlmart
20th March 2009, 14:40
You can't do the whole file at that rate! Start by doing 1-2 seconds to make sure it's really working.

You can do this easily - just add "trim(0,60)" to the end of the file and AVIsynth will only process the first 60 output frames.


I think not. Even if it would end up beautifully, it would be absolutely impractical for this job when I get to do edit it all.

carlmart
20th March 2009, 14:43
:D TempGaussMC is definitely slow.


Yes, it is. :(


I'd try YADIFMod + NNEDI, as I suggested in my original script. That should be significantly faster.

Which would be your original script? The first one you put here? There was a long one and a shorter one.


What are your PC's specs?

I mentioned them. Gigabyte P31 mobo + Core2 E6420 + 2Gb Patriot mem. No OC.

carlmart
20th March 2009, 14:47
the point is, when using el-cheapo tech (like i do) you just can't do everything...

Certainly not.



are you sure? :)

Sure about what? That they eat up 2 or more F stops? Yes, I am.

The Z1 camera, where I would use it, is not very good in low light and it suffers when you increase gain.

2Bdecided
20th March 2009, 15:46
I've re-done my script with NNEDI Yadif now. It was only twice as fast on my PC (0.5fps NNEDI Yadif vs 0.25fps tgmca3).

Here are some 1280x720p60 MPEG-1 videos:

NNEDI Yadif:
http://www.mediafire.com/?4oaxzybtvwz

tgmca3:
http://www.mediafire.com/?lznmklzwn1l

If only my own SD DV footage looked so good upscaled! I wouldn't mind the one hour of footage = 2 or 4 days processing. I'm not usually that quick at editing anyway(!), and it can run unattended for a week on a spare PC.

EDIT: the other thing to note is that these are progressive (but lower resolution). With 1920x1080i60, I think some problems would be increased, while the interlacing would hide some of the differences. I don't have a 1920x1080 display so can't look.

Cheers,
David.

carlmart
20th March 2009, 16:47
I've re-done my script with NNEDI Yadif now. It was only twice as fast on my PC (0.5fps NNEDI Yadif vs 0.25fps tgmca3).

What's your setup?


Here are some 1280x720p60 MPEG-1 videos:

NNEDI Yadif:
http://www.mediafire.com/?4oaxzybtvwz

tgmca3:
http://www.mediafire.com/?lznmklzwn1l

They look great!

If only my own SD DV footage looked so good upscaled! I wouldn't mind the one hour of footage = 2 or 4 days processing. I'm not usually that quick at editing anyway(!), and it can run unattended for a week on a spare PC.

I think you're right. But I don't know why on mine it seemed to start fine at first and climbed up so much later on.

EDIT: the other thing to note is that these are progressive (but lower resolution). With 1920x1080i60, I think some problems would be increased, while the interlacing would hide some of the differences. I don't have a 1920x1080 display so can't look.

Neither do I. But that would certainly be the proof by fire.


Carlos

2Bdecided
20th March 2009, 18:11
What's your setup?P4 2.8GHz.

Cheers,
David.

Blue_MiSfit
20th March 2009, 20:13
@carlmart:

Try this:


AVIsource("Clip.avi") #Let's assume NTSC true anamorphic 16x9 DV, decoded via Cedocida into YUY2 4:2:2

#First, we need to bob-deinterlace. My usual standard is YADIFmod, but there are lots of options
EDI=NNEDI(field=-2)
YADIFmod(mode=1, edeint=edi)

#Now, we're at 720x480p60, hopefully aliasing free!
NNEDI(field=0, dh=true).turnright.NNEDI(field=0, dh=true).turnleft

#Now we're at 1440x960p60, hopefully looking reasonably good!
Spline36resize(1920,1080)

#Now we're at 1920x1080p60. Now would be a good time to start cleaning things up

#Start with fft3dfilter or fft3dgpu in chroma-only mode. DV usually has a lot of chroma noise, so I'd start with moderate settings, and work up as necessary
fft3dfilter(plane=3, sigma=1, sigma2=2, sigma3=2, sigma4=1)

#Now a generic MDegrain2. There's lots of options here as well (MC_Spuds, and other MVDegrain wrappers)
super = MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)

#Now we should be pretty nice and clean! Let's do some sharpening. Here's a basic LSFMod
LSFMod(Smode=5)

#And finally, let's add some grain!
GrainFactory3(g1str=5, g2str=7, g3str=10)

#And to re-interlace everything:
Separatefields.SelectEvery(4,0,3).Weave


That should run considerably faster than TempGaussMC! If it's still impractically slow, you can comment out the NNEDI resizing step:

#Now, we're at 720x480p60, hopefully aliasing free!
#But oh no! I'm too slow!!!
#NNEDI(field=0, dh=true).turnright.NNEDI(field=0, dh=true).turnleft


This should speed things along considerably, and let spline36resize handle all the upscaling work.

Also, what kind of video card does your PC have? If it's something kinda beefy, you can swap out fft3dfilter for fft3dgpu, which will offload another big chunk of work.

~MiSfit

carlmart
20th March 2009, 23:20
Blue_MiSfit,


Right now I am processing an old film, which should take about two hours more.
i
When I get back I will try your remarkable script on my shot. Thanks a lot.

Now I will have to find a way to view it on a higher resolution screen, and my plasma can't get further 720p. It downscales if you feed it something higher. But it may give me an idea on how things will look.

The next step would be to actually intercut it with the HDV shot and see how it ends up.

carlmart
20th March 2009, 23:25
Distortions on the captured HDV shot.

Have you noticed the horizontal bands on the subject's hands when he moves them?

Where did that come from?

carlmart
22nd March 2009, 19:47
Even if my following question is not directly related to this particular job, in a way it has some points in common.

As I have been dealing with doing new copies of some of my DVDs, a few of them being old or not coming from too new film originals or not so good film transfer, perhaps sharpening or contrast enhancing might improve them.

What are the best sharpeners to try? On some tests I made the sharpening ended up looking phony, increasing borders or noise in an artificial way. That's why I mentioned contrast enhancing as a way to tame sharpened things to look more natural.

Am I right or completely off the mark?

BTW: these past days I've been booting from my other HDD on this computer, and as my avisynth installation is a bit different from my other HDD, I couldn't yet try the latest script. Should do it tomorrow.

2Bdecided
23rd March 2009, 11:12
Have you noticed the horizontal bands on the subject's hands when he moves them?That's interlacing!

You need to watch using a player that deinterlaces. VLC has various options - try bob or linear.

Cheers,
David.

2Bdecided
23rd March 2009, 11:14
@Blue_MiSfit,

Have you tried this on his footage? You're suggesting noise reduction for an almost noise-free source (which you add grain to anyway!), yet leaving the hideous halos in place.

Cheers,
David.

carlmart
23rd March 2009, 12:55
That's interlacing!

You need to watch using a player that deinterlaces. VLC has various options - try bob or linear.

It got better, but not perfect. There's still some flickering.

That's probably due to the Z1's long GOP.

carlmart
23rd March 2009, 12:58
P4 2.8GHz.

Would things improve for processing if I get to 2.8GHz or more with OC?

Mine is set standard to 2.133GHz. It's almost 1/3 less than yours.

2Bdecided
23rd March 2009, 13:12
Bob-deinterlacing does flicker on fine details, especially horizontal lines. It shouldn't be that bad on a 720 display.

A single core 2.8GHz wasn't meant as a recommendation. ;) There are ways of multi-threading AVIsynth scripts and/or running them on multiple cores - I just haven't looked at them myself, so can't advise.

Cheers,
David.

carlmart
23rd March 2009, 14:34
Bob-deinterlacing does flicker on fine details, especially horizontal lines. It shouldn't be that bad on a 720 display.

My concern is how will the HDV stuff look on the final HD output. My intention would be, if possible, to edit this job as an HD one and then downconvert to SD for some copies. That way the doc will be prepared for HD broadcasting.

A single core 2.8GHz wasn't meant as a recommendation. ;) There are ways of multi-threading AVIsynth scripts and/or running them on multiple cores - I just haven't looked at them myself, so can't advise.

Oh, I didn't take your comment as a recommendation. But it got me thinking that perhaps I should consider this might be the moment to go into OC if I am going to process stuff with avisynth.

How do you multi-thread scripts or run them on multiple cores? I know it's done because the first program I used to process avisynth scripts, AVStoDVD, does enable multithread encoding.

2Bdecided
23rd March 2009, 14:48
My concern is how will the HDV stuff look on the final HD output.That's a very good question, but it has little to do with interlacing. The interlacing isn't a "problem" - lots of HD content is interlaced.

Cheers,
David.