Log in

View Full Version : DV script help


sKRUVEN
11th May 2010, 09:46
Hi guys im recutting some old movies I made when i was a kid and I have some questions. The Source is 720x576 4:3 Pal 50i DV and im going to edit it in Adobe Premiere and I would like the final movie to be in x264 25p 16:9 720p upscaled.
So this is what im thinking, since adobes slowmo sucks i would like to use 50p/assumefps25 to get some nice slowmo and magic bullet looks effekt dosnt like my noisy clips so I was thinking that I encoded them with lagarith using this script first.
AviSource("movie.avi")
ConvertToYV12()
TempGaussMC_beta1mod(EDIMode="NNEDI2")
Crop(0,86,-0,-86)
NNEDI2_rpow2(rfactor=2, cshift="spline36resize",fwidth=1280,fheight=720)
fft3dgpu(mode=1,precision=2,plane=3, sigma=2, sharpen=1)
#AssumeFPS(25, 1, true)
#SSRC(44100)
Because then i can edit the movie denoised and progressive. Anyway does this script looks ok? ive read that you should crop 72 when going from 4:3 to 16:9 but i tried that and did some screen comparisons and I got much closer to the original using 86? does this have something to do with that I encode with square pixels as aspect with lagarith?

2Bdecided
11th May 2010, 14:30
72 is "correct" for the vertical crop - if it looks wrong, it might be the horizontal pixel count (704 vs 720) which is confusing something.

I would use Cedocida as the DV codec (just download it) and use...
AVISource("seesaw.AVI",pixel_type="yv12")...no need to converttoyv12 afterwards.
- or if you stick with a DV codec that doesn't output YV12, at the very least use converttoyv12(interlaced=true)!

If you're doing lots of editing (i.e. cutting out lots of footage!), then (apart from the parts you slo-mo) you should edit with the original DV-AVI files, render the final edit (to 4x3), and then run that through your script. It'll save lots of time, and will make your NLE run more smoothly. This assumes you just "centre-cut" 4x3 > 16x9. If you're being more creative in your NLE with the framing during 4x3 > 16x9 conversion, you'll need AVIsynth first to give you the extra resolution to play with.

Whether your footage benefits from that specific denoising is something you'll have to judge yourself. There are plenty of other options.

Check the levels are correct.

Put a simple selectevery(2,0) in your script to drop 50fps to 25fps.

Finally, you're blowing your footage up by 3x. IMO you can't do better than using TGMC and NNEDI2, but still - don't expect it to look pretty when viewed full size. The better the original, the better the result. Some people use tricks like adding grain to make the upscaled version look less plastic / artificial (though grain won't survive YouTube or Vimeo encoding).

Hope this helps.

Cheers,
David.

sKRUVEN
11th May 2010, 19:58
Yeah im going to encode it for vimeo, so i thought that scaling it my self would look better then vimeos upscaler.
And im already using codocida (thanks for the pixel_type="yv12" didnt know about that). But should i export it from premiere with codec: DV PAL or lagarith?

Yeah ive been thinking about edit original DV files, but how would the script look like if i wanna slow parts down later? can you trim out a part and run a different script on that? I always export the video and audio seperatly in premiere so I guess i could like leave extra space in the soundtrack for the slowmo. For exempel, edit the whole movie with premiere slowmo, export the soundtrack, remove slowmo, export video, then slow the same parts down using avisynth later, would this work?

Yes and i tried some grain settings but i didnt realy like the results.

And about the crop, I took a screen of the source, then a screen of a video after running the script, and i could cut a part of the image and fit it perfectly in the other why is this? So how should I crop and resize if i dont upscale it ? Crop(0,72,-0,-72) Spline36resize(704,400)

2Bdecided
12th May 2010, 09:20
Vimeo won't stream it in HD unless you upload HD. So if you want to take advantage of the higher bitrate they give to HD, you have no choice. It'll still look about as soft as SD, but hopefully with fewer artefacts.

I don't think you want to do slo-mo after the edit by chopping up the render. I think you want to slo-mo using AVIsynth before the edit (or during, or whenever you realise you need the sections in slo-mo), and drop those sections from AVIsynth>lagarith (or DV-AVI if easier) into the NLE. Then render the finished project (might as well use Lagarith), and process the whole lot using your script. The slo-mo sections shouldn't get harmed much by going through TGMC a second time.

Just do whatever makes the least work/hassle.


As for upscaling, whatever you do, I think you need to send progressive square pixel video to Vimeo (maybe it supports PARs allowing non-square pixel properly now, but that used to confuse things horribly, so I always use square pixel for Vimeo and YouTube) - so you've got to upscale in at least one dimension because SD DV video is never square pixel. With anamorphic PAL, I'd upload 1024x576. As your source was 4x3 to start with, the least upscaled possibility (horizontal stretch only) is 768x432, though I'm not sure what Vimeo would make of that.

Why does the wrong value appear to work? Probably because your player is using the "wrong" PAR to play back the original DV, or your camera is. To be sure, film something round (like a football), making it nearly fill the image, in focus, and check that it's still perfectly circular after processing (count pixels, in case your display is wrong). You'll either need to crop to 720x432 or 704x432 before upscaling to 1280x720. If you're getting more than that 2% error than I have no idea what's happening.

Hope this helps.

Cheers,
David.

sKRUVEN
1st June 2010, 11:14
Have been busy so havnt had any time working with this, anway everything worked out.
Using this for slowmo exporting it with lagarith for slowmo part before editing.
AviSource("clip.avi",pixel_type="yv12")
TempGaussMC_beta2(EDIMode="NNEDI3")
AssumeFPS(25, 1, true)
SSRC(44100)
Then i export the whole thing as interlaced with lagarith then run this script through meGUI x264 AVC Lvl 3.1 @ 2000kbps:
AviSource("movie.avi")
ConvertToYV12(interlaced=true)
TempGaussMC_beta2(EDIMode="NNEDI3")
Spline36Resize(720, ?)
FFT3DGPU(bt=4, plane=3, sigma=3, mode=1, precision=2, sharpen=0.7)
LSFmod(smode=5, strength=80)
Grainfactory3(2,4,5)
selectevery(2,0)

One last question, what resolution should I go with when I go to square pixels?

2Bdecided
2nd June 2010, 16:16
720x540 (or any other 4x3 ratio you want). MeGUI will probably moan because 540 isn't mod16 or even mod8 - it should be fine anyway (it's still mod4), but check the output is OK with whatever you want to use before doing the whole thing.

Cheers,
David.

sKRUVEN
3rd June 2010, 14:50
According to this site http://www.sciencemedianetwork.org/wiki/Tutorials/Video/Pixel_Aspect_Ratio and http://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7f3aa.html full size square equivalent is 788x576. So can I export the project in premiere with res 788x576 square pixel, Then crop 10,0,-10,-0 to get 4:3 then resize to 704x528 (0% aspect error and mod16). Or should i export with 720x576 aspect DV PAL (0,0940) and do something different?

sKRUVEN
11th June 2010, 00:14
Thanks 2Bdecided for your help, done now. Exported with lagarith 788x576 25i square pixel from premiere, then used
AviSource("movie.avi")
converttoyv12(interlaced=true)
TempGaussMC_beta2(EDIMode="NNEDI3")
Crop(10,0,-10,-0)
Spline36Resize(704,528)
fft3dGPU(plane=4, mode=1, precision=2, sigma=3, bt=4, bw=32, bh=32, ow=16, oh=16, sharpen=0.7)
LSFmod(defaults="slow", strength=80)
Removegrain(mode=1)
selectevery(2,0)
with meGUI x264 Lvl 3.1 @ 2000kbps. Turned out great, thanks again.

2Bdecided
11th June 2010, 14:54
Glad it worked - though 768x576 (which is what you cropped to) would also have been fine, mod16, and also avoided any scaling.

Cheers,
David.

Terka
28th June 2010, 13:42
put selectevery(2,0) few lines up. you`ll get better speed.
also nnedi2 is much faster than nnedi3 and for my DV sources also visually better.

sKRUVEN
6th July 2010, 11:54
Yeah nnedi3 was super slow (and I got jagged edges from it aswell) so ended up using nnedi2. Already encoded it but will put selectevery after TempGaussMC? from now on, thx.

2Bdecided
9th July 2010, 10:59
It'll be slightly quicker, but it won't give identical output, since fft3d will only see half the frames. This might impact the denoising. Visibly? Depends on the source - you'd have to check.

Cheers,
David.