Log in

View Full Version : Improving resolution


Pages : 1 2 [3] 4 5

Blue_MiSfit
23rd March 2009, 22:52
How do you multi-thread scripts or run them on multiple cores?


It's a big can of worms...

MT AviSynth works, and is fantastic. But, you have to baby it around. Some filters work best with MT(), and some work best with SetMTMode(). It's definitely a hassle.

Download MT avisynth, and take a look at the docs..

Now another thought.. You might consider doing your whole project in 720p. This offers a couple of significant advantages:

1) 720p means you can do 59.94fps progressive. That means no deinterlacing for the end-user, which means you don't have to worry about their TV / media player doing a crappy job. Plus, you can use a good deinterlacer like YADIFMod ahead of time.
2) It's a bit smaller, and quicker to work with
3) It looks just as good as 1080i/1080p in many cases. I haven't actually tried bobbing your HDV sample and downsampling to 720p, but I doubt much would be lost.
4) You can use your TV to do 1:1 quality comparisons!

:)

~MiSfit

2Bdecided
24th March 2009, 12:07
I like 1280x720p for those reasons. It's obviously a get resolution for PC use and a great master for web use. I don't think I lose anything from my 1440x1080i in the conversion, but my camera is a toy compared to yours!

However, all HD broadcasts in the UK are 1080i.

Cheers,
David.

carlmart
24th March 2009, 12:55
The main question is not my present monitoring setup, limited to 720p, but what will broadcasters demand in the future when they look for HD stuff. Will it be 1080i?

2Bdecided
24th March 2009, 15:35
The BBC HD channel in the UK does not accept HDV originated content as HD. I think most American channels do though.

Widest appeal is 1920x1080p24. That's not nicely achievable from 1440x1080i60.

If I were you, I would edit at 1440x1080i60.

If you have broadcast in mind, you should approach a broadcaster before you start, to check what their specific requirements are.

I think you also need to consider your video levels carefully. Your HDV footage includes levels way over legal video white. If you use this as-is, and the broadcaster doesn't reject it outright (many will), they'll probably run it through a "legal video levels" filter, which will do this...

Full range (scaled for PC viewing)
http://www.mediafire.com/imageview.php?quickkey=cgewliqyzdi&thumb=4

Legal range (scaled the same as above for PC viewing)
http://www.mediafire.com/imageview.php?quickkey=y1mnonidmmy&thumb=4

Note how the legal range has ruined the flesh tones.

Obviously you can fix this in your NLE, if it decodes HDV with the super-white range intact.

Cheers,
David.

carlmart
24th March 2009, 16:17
Thanks, your considerations on broadcast problems are very good.

About broadcasters requirements, I will have to find out what people around here accept.

I did google a little on HDV specs, and found this about broadcasters specs:


Use of HDV in broadcast television

HDV is accepted with varying restrictions for broadcast TV use. It has been used for shows like "Deadliest Catch" and "Mythbusters", and was used in the TV series "JAG" for scenes where larger HD cameras would have been impractical. The BBC currently considers HDV a "non-broadcast domestic HD format," but accepts HDV footage for up to 25% of HD programming content with advance approval.

The preferred delivery formats for Discovery HD Theater are HD-D5 and HDCAM. HDV source content is accepted if it is limited to 15% of a whole program and is shot with a 1080-line camera. Producers wishing to use HDV are required to submit an approved postproduction path outlining their handling of the footage in the editing process. However, the main Discovery Channel's HD simulcast has fewer or no guidelines and accepts a mix of XDCAM HD, HDV and AVCHD for the length of a program.


So maybe I am not quite there yet or not sure on what you can really do to produce low budgets docs wholy shot with HDV. That is how to get up to HD legit values and get away with it.

2Bdecided
24th March 2009, 18:24
The BBC actually count HDV as SD for the purposes of BBC HD - you're allowed up to 25% SD in an HD programme, if there's a very good reason for it.

It's difficult to "get away with it" - HDV simply doesn't have the resolution of HDCAM-SR (the emerging format over here) and, being quite compressed to start with, doesn't re-compress for broadcast as well as the less compressed professional formats.

Interestingly, it's used a lot for SD over here, as a nicer (and more flexible) source for SD documentaries than most SD cameras.

Cheers,
David.

WorBry
24th March 2009, 20:49
I must say, following this thread has (sort of) rekindled my interest in SD > HD upscaling. Playing around with 2BDecided and Blue_Misfits scripts, I'm actually getting quite good results with my PAL DV (anamorphic) home videos, at least with the better quality material.

Two queries arise:

David, I see that in your script you down-size (length-wise) the NNEDI-upscaled (1440 x 960) frame to 1280 x 960, before upsizing again to 1440 x 1080.



AVISource("testDV1_a.avi",pixel_type="yuy2")

converttoyv12(interlaced=true)

#a=last

TempGaussMC_Alpha3()

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

BlindDeHalo3(rx=3.2,ry=4.5)
limitedsharpenfaster()

spline36resize(1280,960)

sharpen(0.5)

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

spline36resize(1440,1080)

limitedsharpenfaster()

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

return last

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



I'm sure there is a good reason for doing so, but could you explain?

Secondly, of the various upscaling scripts I've come across, some folks denoise before upsizing, whilst others do so after. What are the relative merits, aside from processing speed?

Cheers.

carlmart
24th March 2009, 21:25
The BBC actually count HDV as SD for the purposes of BBC HD - you're allowed up to 25% SD in an HD programme, if there's a very good reason for it.

In any case that's BBC's requirements, which I will never need to fulfill.

We will have to see what others, particularly US related distribution circles, demand for HD.

It's difficult to "get away with it" - HDV simply doesn't have the resolution of HDCAM-SR (the emerging format over here) and, being quite compressed to start with, doesn't re-compress for broadcast as well as the less compressed professional formats.

What I'm considering is never to recompress to HDV again, but to go up a higher grade HD, using software or hardware upscaling. You can use DNxHD to export from Avid, and the original long-GOP files should be filled in somehow. That's what I mean by get away with it.

But that's something some steps away from what we are doing now, which is upscaling DV. Though of course we need to know to what we will be upscaling.

Interestingly, it's used a lot for SD over here, as a nicer (and more flexible) source for SD documentaries than most SD cameras.

Yes, it's very cool. Pity something which was interesting in the Z1, the PAL/NTSC capability, was taken away in further models. I don't quite know how it's that in the new "Cinealta" small cameras, like EX1 and EX3.

smok3
24th March 2009, 21:40
EX are just slightly better than HDV, BBC would probably still count those as SD.

carlmart
24th March 2009, 22:22
EX are just slightly better than HDV, BBC would probably still count those as SD.

Fortunately the world is not rotating around BBC!

2Bdecided
25th March 2009, 12:51
I'm sure there is a good reason for doing so, but could you explain?It's probably not a good reason, and they're probably not the best numbers - but what I've found is that you can only try faking resolution using clever trick so far, before the tricks themselves become visible, and simple (good old fashioned slightly blurred) resizing would be preferable.

So I prefer to use NNEDI up to a resolution where it doesn't fall apart (which usually means downscaling slightly after NNEDI to hide the faults), and then simply upscale with spline36resize from there.

The same goes for adding grain. If you have an SD source, and you add HD grain, I think it just looks like HD grain on an SD source(!) - i.e. it doesn't help much at all. Whereas if you have an SD source, and there's a resolution somewhere between SD and HD where it still looks kind of believable, then add the grain at that intermediate resolution, and then blow it up to HD. To my eyes, this makes the grain more convincing, so it actually does the trick of increasing the perceived resolution.

FWIW I find it's much easier to make 1280x720 look convincing than 1920x1080. That said, deinterlaced 1440x1080i50 HDV doesn't always look entirely convincing at 1920x1080p50 either (not that it matters - I can't watch that anyway!).

Secondly, of the various upscaling scripts I've come across, some folks denoise before upsizing, whilst others do so after. What are the relative merits, aside from processing speed?In other contexts, I've found mvdegrain and similar can sometimes average out some temporal instability and weirdness from NNEDI. So there's an argument for doing it after upsizing. The (weak) argument against is that most scripts / functions "expect" a certain kind/scale of noise, and they don't see it in upscaled video. The strong argument against is the time it takes!


I'm finding some of my old DV footage shot in bright daylight upscales OK, but the indoor stuff is just horrible. It looks horrible in SD, so there's not much hope :(.

Cheers,
David.

carlmart
25th March 2009, 14:31
I'm finding some of my old DV footage shot in bright daylight upscales OK, but the indoor stuff is just horrible. It looks horrible in SD, so there's not much hope :(.


When I started working in video, in U-Matic times and then Betacam, I found it very much related to 16mm film. The grain was a problem and telltaled it was 16 when you blew it to 35mm film.

Things got better when you used 16mm fine grain film, which was very slow and needed lots of light.

I think DV, and HDV much more, can do great if properly lit. That is you need to avoid low exposure situations.

Things work better for DV if using better cameras, like Sony's PD170, which is great in low light. But you still have to be careful with exposure range, like using graduated ND filters to avoid highlights.

If you work between those limits results can be impressive.

carlmart
26th March 2009, 18:07
Today I switched back from my other HDD, where I don't quite know why I can process avisynth better.

Then I used the latest script Blue_MiSfit had suggested, with NNEDI instead of TempGaussMC_Alpha3(), to process my DV sample.

What did I get this time:

1) Time was much more reasonable: about two hours for 10 seconds.

2) The resulting file plays in VLC, but with that very same interlacing horizontal distortion I had on my HDV sample. Only this time I can't setup VLC to cure that. If I choose bob or linear I get no image. So there seems to be some other thing I need to solve.

carlmart
26th March 2009, 21:55
OK. Following the advice of a friend of mine, who works on a rather large production company, the target should be 1440x1080i.

Apparently from there you can get 1920 from Avid to an SDI output.

That I wouldn't be able to do on my facilities, of course, but I could take it elsewhere and do the export to HDCam, which is what's being used for now.

My intention is to assemble my timeline so I can export to SD now and to HD later on, editing all as HDV.

Blue_MiSfit
27th March 2009, 19:26
carlmart:

Can you post a small sample of this MJPG encode you created? VLC's bob deinterlace filter should output 60p correctly and have no residual combing.

I want to take a look :)

~MiSfit

2Bdecided
27th March 2009, 21:13
He didn't say he had combing - he said he had no image!

That's quite common when changing deinterlacing settings in VLC (though I see it more with MPEG-4 variants) - it can also cause it to pop out of full screen mode, leaving the video overlay buried under the desktop.

While the deinterlace settings always cause it to deinterlace, I've seen it get the field order wrong sometimes.

Also, at least by default, if VLC can't keep up, it often chokes. Enabling bob deinterlacing effectively doubles the frame rate, so can cause it to choke. Not on a less-than-ten-year-old machine with HD MPEG-2 though, and you'd think MJPEG was even easier to decode.

Cheers,
David.

Blue_MiSfit
27th March 2009, 22:13
Oh! :)

At any rate, if watching on VLC isn't working out, perhaps you can watch on Media Player Classic, with ffdshow forcing hardware bob-deinterlacing via the renderer?

~MiSfit

carlmart
27th March 2009, 22:52
carlmart:

Can you post a small sample of this MJPG encode you created? VLC's bob deinterlace filter should output 60p correctly and have no residual combing.


Of course. Here it is:

http://www.mediafire.com/?sharekey=baad3af1c8fb5a28d6baebe61b361f7ce04e75f6e8ebb871

It's a 1440x1080 sample.

carlmart
27th March 2009, 22:55
At any rate, if watching on VLC isn't working out, perhaps you can watch on Media Player Classic, with ffdshow forcing hardware bob-deinterlacing via the renderer?


Got no image in MPC either, not even interlaced.

carlmart
28th March 2009, 03:44
Today I had to switch back to my other HDD, booting from it, and now I can watch my sample in VLC alright, correcting the deinterlace.

It looks quite good to me, even if there seems to be a glitch of some kind in the middle of the sample which I don't know what caused it.

A friend of mine processed it in several ways, one of them to full HD, but the file size grew 10 times. He also got it to HDV and uploaded the file to megaupload. I think he used After Effects. Let him tell me what he used and how long it took to process it.

It's a production company, and they use AE to upscale stock shots from their tapes, in order to mix them with other HD stuff.

Blue_MiSfit
28th March 2009, 21:06
Agreed, I think your encoded sample looks great.

Much better than a simple bob and resize.

scharfis_brain
28th March 2009, 21:10
hmm, I cannot Download the File.
MediaFire keeps saying it is invalid...

carlmart
28th March 2009, 22:19
hmm, I cannot Download the File.
MediaFire keeps saying it is invalid...


Can you try it again?

I just did try the download process up to actually saving it, and it went fine. When do you get that message?

carlmart
28th March 2009, 22:22
Agreed, I think your encoded sample looks great.

Much better than a simple bob and resize.

Well, it's all thanks to all of you. :)

About that mid-take glitch I mentioned: did you see it? Where did it come from? The original is fine, as you know.

What do you think might improve by using TempGaussMC_Alpha3() ?

Blue_MiSfit
30th March 2009, 02:03
I'm glad you like it too!

I didn't notice any issues in the encoded 1440x1080 MJPG you posted.

TempGaussMC will just improve the deinterlacing a bit. In my tests, it made the image a bit sharper/cleaner, but it does another round of MDegrain, among other things, so IMO it may not be really necessary. The massive speed hit makes it impractical anyway :)

SmoothLevels(preset="PC2TV") will do a nice job scaling the levels of your HDV clip from full range to TV range. I can't seem to download your HDV sample anymore - could you post another one, so we can come up with a good script for cleaning that up and conforming it to MJPG?

~MiSfit

carlmart
30th March 2009, 11:35
I didn't notice any issues in the encoded 1440x1080 MJPG you posted.

It's strange. Every time I play it there's glitch in the image. Now I've tried it again, looking to see if it's on a specific place, but it's not. But there comes a glitch alright. I wonder what might be it. Can't play it with MPV. What other playing program should I try?

TempGaussMC will just improve the deinterlacing a bit. In my tests, it made the image a bit sharper/cleaner, but it does another round of MDegrain, among other things, so IMO it may not be really necessary. The massive speed hit makes it impractical anyway :)

Yes, it's not practical. It might be interesting trying MT Avisynth, to see if it works and if things get better.

will do a nice job scaling the levels of your HDV clip from full range to TV range.


The script would just be that?

SmoothLevels(preset="PC2TV")


I can't seem to download your HDV sample anymore - could you post another one, so we can come up with a good script for cleaning that up and conforming it to MJPG?

The HDV sample is not there anymore. Mediafire allows just 100MB for a free account, so I had to erase that sample to upload the 1440x1080 one. There's a friend who's still going to download the latter. After he does we can go back to my HDV sample.

Yesterday I was shooting an outdoor presentation from that musician, in a tree sheltered place, and there were a lot of extreme situations, going from sun-lit white shirts to black people in the shadow. So I wonder what could have been done there to cure it, except from using an HMI unit!

In any case, this time I used the zebra in the LCD screen a bit more, manually correcting the exposure until the stripes went away. We'll see how that will look on the screen later on.

The plug in I used in Avid allowed some correction for all that, but I am not sure if they will work with HDV.

This week I plan on shooting most of what's left to shoot, so I can start placing things on the timeline.

2Bdecided
30th March 2009, 12:02
Of course. Here it is:

http://www.mediafire.com/?sharekey=baad3af1c8fb5a28d6baebe61b361f7ce04e75f6e8ebb871

It's a 1440x1080 sample.It plays fine in VLC here, but VirtualDub gives a helpful error message about not being able to decode 4:2:2 M-JPEG with non-mod16 image dimensions. Of course 1080 isn't mod16.

Whether it plays elsewhere depends on whether they have an M-JPEG codec at all, and whether it has this restriction.


You decided to leave the halos in there then? :(

I wouldn't bother with tgmc if you want reasonable speed, but I'd certainly remove the halos (unless you think it does more harm than good).

Cheers,
David.

carlmart
30th March 2009, 13:31
It plays fine in VLC here, but VirtualDub gives a helpful error message about not being able to decode 4:2:2 M-JPEG with non-mod16 image dimensions. Of course 1080 isn't mod16.

Whether it plays elsewhere depends on whether they have an M-JPEG codec at all, and whether it has this restriction.

I usually make such a mess with codecs, that sometimes I don't know what to install. Even if looked for it, I never found a place that would tell you what really to install and what might be conflictive and get you in trouble. I just did install the M-Jpeg codec, but the glitch continues.

You decided to leave the halos in there then? :(

I didn't remember I had! After a few comings and goings I lost track of it.

The reason was that I am getting an error when I include BlindDeHalo3. The message says: "There's no function named "Expand". But the conflict line seems to be here:

limitedsharpenfaster()

Which is after Blinddhalo.

I wouldn't bother with tgmc if you want reasonable speed, but I'd certainly remove the halos (unless you think it does more harm than good).

A very important thing which I will have to learn in avisynth is to identify and name the problems exactly. So let's begin: what is it you call halo that you find to be bad?

2Bdecided
30th March 2009, 13:41
A halo is an over-sharpened edge. The white/black border above the guy's arm is a halo.

lsfmod is a different version of limitedsharpenfaster. You can try without either.

Cheers,
David.

carlmart
30th March 2009, 18:14
A halo is an over-sharpened edge. The white/black border above the guy's arm is a halo.

What I see there, and maybe a larger screen would help me judge that better, is a sort of "enhanced border" that makes it look like "video".

Like you say it's in the transition from dark to light, even if I can see some of that in the left back-hand, over the orange shirt.

How do you say I can improve on that?

lsfmod is a different version of limitedsharpenfaster. You can try without either.

Just take those lines away? But will cure the halo or not enhance it.

Blue_MiSfit
30th March 2009, 19:12
limitedsharpenfaster and lsfmod can sometimes introduce or worsen halos - much like any other sharpening filter.

These filters are pretty advanced, and tend to avoid really ugly halos like a simple unsharp mask, but they can still cause problems. I'm not sure how to fix the halos I saw in your video, particularly with the edge of the musician's shirt.

You can upload to mediafire without an account, and upload all you want :)

I'll play with your script and see if I can multithread any of it.

~MiSfit

2Bdecided
31st March 2009, 11:44
"BlindDeHalo3" removes the halos. It's not achingly slow - the problem is it's not perfect, but it's still worth doing IMO. YMMV!

I didn't suggest removing limitedsharpenfaster to reduce halos - the whole point of using lsf rather than a basic sharpen is to avoid adding halos. I said you could try without, simply to get the script to run. If lsfmod works, use that.

Let's re-cap.

Blue_MiSfit suggested 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

I suggested this:
AVISource("testDV1_a.avi",pixel_type="yuy2")

converttoyv12(interlaced=true)

#a=last

TempGaussMC_Alpha3()

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

BlindDeHalo3(rx=3.2,ry=4.5)
limitedsharpenfaster()

spline36resize(1280,960)

sharpen(0.5)

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

spline36resize(1440,1080)

limitedsharpenfaster()

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

return last

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

You found my script too slow. No surprise - tgmc is a glacially slow deinterlacer.

If I were you, I'd try to go back to basics and understand how AVIsynth works. It's trivial to chop and change things in this script to keep only the bits you want, e.g. I think "fast-but-good" is something like this...

AVISource("testDV1_a.avi",pixel_type="yuy2")

#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)

converttoyv12(interlaced=false)

# Remove halo issues:
BlindDeHalo3(rx=2.5,ry=3.0,strength=175)

# Re-sharpen the result (hopefully less halos):
LSFMod()

spline36resize(1280,960)

sharpen(0.5)

# Add some grain:
grainfactory3(g1str=5, g2str=5, g3str=5)
addgrainc(0,2)

# Re-size to final output
spline36resize(1440,1080)

# Sharpen a bit more
LSFMod()

#Re-interlace:
separatefields.selectevery(4,0,3).weave

The best way to understand what each line is doing is to comment them all out, and then un-comment then (re-enable them) one-by-one, looking at the output in VirtualDub.

Cheers,
David.

carlmart
31st March 2009, 12:47
Very good sum up on where we are now.

The script that I used for the sample I uploaded was the last one, because on the others there were things I couldn't make it work.

But I will get back to them little by little, just removing the lines that make things too slow, like TempGaussMC. Even that I will try to speed up with MT Avisynth, to see how it's different from the others.

What you say I should do, both to learn and to try things, chopping and adding lines, is what I'm already doing. It's the way I think I should use to learn avisynth: trial and error.

Blue_MiSfit
1st April 2009, 05:23
Indeed :) A good plan!

Do use AvsP if you're not already. It's an AMAZING tool. I don't know how I dealt with the tediousness of VirtualDub before!

~MiSfit

carlmart
1st April 2009, 13:42
Do use AvsP if you're not already. It's an AMAZING tool. I don't know how I dealt with the tediousness of VirtualDub before!


Didn't know it. Now it's downloaded and installed.

Just tried to run one script (you use "Tools > Encode the video", right?).

But it didn't run, claiming there were errors in the script. There seems to be a "Test" function in "Macros", but I don't understand what might wrong on that line. The error seems to be here:

YADIFmod(mode=1, edeint=edi)

The error notice says: "local variable 'x' referenced before assignment (test.py, line 6)".

Can someone translate it for me, please? Why did it run before, on my other HDD, and now it doesn't?

It's strange that I can't seem to run my scripts in this current HDD installation. It is not the one I used for converting the upscaled sample you saw. But I still wonder what might be wrong in this setup that scripts don't run as they should.

I have already re-installed Avisynth from zero, deleting all things that might be conflictive. Then copied the scripts sub-directory from the "working HDD" to this one. What might be wrong?

2Bdecided
1st April 2009, 14:30
obvious: plug-ins.
non-obvious: some related dll being corrupt, wrong version, or missing.

Cheers,
David.

Blue_MiSfit
1st April 2009, 18:24
Just push F5 to preview the script :)

I think you're trying to run one of the built-in Python macros.

~MiSfit

carlmart
1st April 2009, 18:52
Just push F5 to preview the script :)

I am seeing the script alright.

I think you're trying to run one of the built-in Python macros.

I don't have the least idea what a Python macro can be! :)

This the script I am trying to run:


LoadPlugin("C:\video\AviSynth 2.58\plugins\fft3dfilter.dll")
import("c:\video\AviSynth 2.58\plugins\LSFmod.v1.7.avs")
AVISource("C:\pedro\testDV1_a.avi")

EDI=NNEDI(field=-2)
YADIFmod(mode=1, edeint=edi)

NNEDI(field=0, dh=true).turnright.NNEDI(field=0, dh=true).turnleft

Spline36resize(1440,1080)

fft3dfilter(plane=3, sigma=1, sigma2=2, sigma3=2, sigma4=1)

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)

LSFMod(Smode=5)

GrainFactory3(g1str=5, g2str=7, g3str=10)

Separatefields.SelectEvery(4,0,3).Weave

Blue_MiSfit
1st April 2009, 20:26
That should be fine.

AvsP is useful for previewing a script and making adjustments. However, if you want to actually ENCODE the script, you've gotta dust off VirtualDub or some other tool still :)

If your script renders okay in AvsP the script itself should be totally fine.

Another note, I may have asked before, but what kind of video card does your PC have? You might get a nice speed boost from switching to fft3dgpu!

Also, if you have MT Avisynth installed, this should speed things along quite nicely! If you want to get speed up even more, you should look into getting a quad core CPU

LoadPlugin("C:\video\AviSynth 2.58\plugins\fft3dfilter.dll")
import("c:\video\AviSynth 2.58\plugins\LSFmod.v1.7.avs")
AVISource("C:\pedro\testDV1_a.avi")

EDI=NNEDI(field=-2)
YADIFmod(mode=1, edeint=edi)

NNEDI(field=0, dh=true).turnright.NNEDI(field=0, dh=true).turnleft

Spline36resize(1440,1080)

fft3dfilter(plane=3, sigma=1, sigma2=2, sigma3=2, sigma4=1)

MT("""
super = MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=4)
backward_vec1 = super.MAnalyse(isb = true, delta = 1, overlap=4)
forward_vec1 = super.MAnalyse(isb = false, delta = 1, overlap=4)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
""",2) # two threads


LSFMod(Smode=5)

GrainFactory3(g1str=5, g2str=7, g3str=10)

Separatefields.SelectEvery(4,0,3).Weave


The MT snippet comes straight from the MVTools2 manual! I use this frequently and it's quite good!

~MiSfit

carlmart
1st April 2009, 20:42
That should be fine.

AvsP is useful for previewing a script and making adjustments. However, if you want to actually ENCODE the script, you've gotta dust off VirtualDub or some other tool still :)

Then I'm fine as it is. That is I did use VD for encoding the sample.

If your script renders okay in AvsP the script itself should be totally fine.

How do I know if it "renders OK"?

Another note, I may have asked before, but what kind of video card does your PC have? You might get a nice speed boost from switching to fft3dgpu!

My video card is a Nvidia GeForce 7100GS. How do I do that switching to fft3dgpu?

Also, if you have MT Avisynth installed, this should speed things along quite nicely! If you want to get speed up even more, you should look into getting a quad core CPU



I haven't installed MT Avisynth yet. Should I?

From what I've read you have to change several things when writing the script, and I'm learning howto for the non-MT! :D

Gavino
1st April 2009, 22:16
How do I know if it "renders OK"? [in AvsP]
Hit F5 (or Video/Refresh preview) and the first frame of your video should appear. You can then step through it using the arrow keys, or call up an external player to play it. I'm sure once you've tried it, you will never want to do it any other way.

Blue_MiSfit
1st April 2009, 22:53
Indeed. If the display in AvSP looks correct, you're good to go!

You can install MT AviSynth without breaking any non-MT stuff. You just add multithreading when you need it!

Your 7100gs might be weak for fft3dgpu, but I'd try it anyway. Google fft3dgpu and run the installer. Then, replace fft3dfilter... with fft3dgpu... in the script.

I'd try it on some footage with just that - no fancy other stuff and do a bit of a speed comparison, and see which is actually faster.

~miSfit

Gavino
1st April 2009, 23:17
You can install MT AviSynth without breaking any non-MT stuff.
However, note that the 'official' MT Avisynth is based on Avisynth 2.5.7, so is missing features added in 2.5.8 (eg Spline64Resize). There is an experimental MT 2.5.8 available (search the forums), but AFAIK it is still just that (experimental).

carlmart
6th April 2009, 18:49
I have just opened another thread with a different kind of problem: how to improve a 16mm film to video transfer.

http://forum.doom9.org/showthread.php?p=1270484#post1270484

If you can please do have a look and tell me what might be done to improve on that.

carlmart
24th January 2010, 05:10
It's now been almost a year since my last word in this thread, and I am at least arriving to the time to process my DV images.

The problem is I almost forgot how to actually process the script I would be using in order to get my upscale to 1440 x 1080, so I can import that file and put it on my HD timeline.

As I understand it I will load the script in Virtualdub, but I am not too clear on what output format to pick. None seem to be 1440 x 1080.

Blue_MiSfit
24th January 2010, 10:43
Hi Carlos! Long time no chat. Hit me up on IM sometime. I'm not on too often, but I'm around.

Now, regarding your processing!

You've got plenty of options. The question is - what format are you editing in? You want to output your upscale into some format that edits nicely (keyframe only perhaps), and that plays nice with your NLE. I'd suggest MJPG or maybe h.264 with only I frames. Which editor are you using, again?

~MiSfit

carlmart
24th January 2010, 14:46
Hi Carlos! Long time no chat. Hit me up on IM sometime. I'm not on too often, but I'm around.

Hi! Pity I couldn't get in contact with you last October, as I was in SF visiting.


You've got plenty of options. The question is - what format are you editing in? You want to output your upscale into some format that edits nicely (keyframe only perhaps), and that plays nice with your NLE. I'd suggest MJPG or maybe h.264 with only I frames. Which editor are you using, again?


My editor is Avid Media Composer 3.0. Avid recovers any long gop HD images you feed into it and gives you every frame, which of course is essential for editing.

From what I have seen it directly accepts DNxHD 145 MXF and 220 MXF, and also DVCProHD MXF. In the VirtualDub options for compress I have Canopus DVCProHD, but I wonder if that's the same. More tests are due indeed, particularly on the filters I will be using or any artifacts I may have.

One problem I foresee on any format I pick is that it has to get me a 1440x1080 ratio, which for instance is not what is listed here for DNxHD:

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

They are 1920x1080 or 1280x720

carlmart
25th January 2010, 18:46
I made a new XP install just to have a clean slate for Avid.

One thing that caused some conflicts and/or problems several times in the past were the codecs to load.

What codecs should I get for using avisynth and similar converters (VD, etc.)?

Blue_MiSfit
25th January 2010, 22:34
I'd suggest first installing Avid, so you get all its codecs.

Then, you should install the latest ffdshow_tryouts, haali splitter, and whatever AviSynth plugins you need (I'd definitely suggest finding the latest ffms2)!

I'd toss on Media Player Classic - Home Cinema to get yourself a nice little player while you're at it.

Regarding your output format - I think DNxHD might be the best way to do this, since it's relatively light on the CPU, keyframe only, and works directly in Avid.

Note, DVCProHD is not DNxHD - it's a format more similar to DV which is not very good IMO. It's ~ 100mbps and stores at 1280x1080 or 960x720.

I'd suggest using ffmpeg to encode your AVS scripts to DNxHD in an MXF container. Just encode them at 1080p24 or 1080i60. I forget what your sources are :) Avid should intercut this with your HDV footage without any issues, since 1440x1080 in this case displays at 1920x1080.

~MiSfit

carlmart
26th January 2010, 00:18
I'd suggest first installing Avid, so you get all its codecs.

Done.


Then, you should install the latest ffdshow_tryouts, haali splitter, and whatever AviSynth plugins you need (I'd definitely suggest finding the latest ffms2)!

My ffms2 is from july 2009. Is there a newer one?


I'd toss on Media Player Classic - Home Cinema to get yourself a nice little player while you're at it.

Done.


Regarding your output format - I think DNxHD might be the best way to do this, since it's relatively light on the CPU, keyframe only, and works directly in Avid.

OK. Where is that format in ffdshow to pick it from? It seems to be hidden somewhere.


Note, DVCProHD is not DNxHD - it's a format more similar to DV which is not very good IMO. It's ~ 100mbps and stores at 1280x1080 or 960x720.

I don't know that much yet to agree or disagree.


I'd suggest using ffmpeg to encode your AVS scripts to DNxHD in an MXF container. Just encode them at 1080p24 or 1080i60. I forget what your sources are :) Avid should intercut this with your HDV footage without any issues, since 1440x1080 in this case displays at 1920x1080.


I guess that should be available within VD. Right now and on this setup I can't load AvsP and on VD I can't load the script. Get errors on both, so I don't know what's missing. But let me work a bit more until I get things running.