Hi there!
It's probably a lame question but since I just haven't done this before I though to ask beforehand. I need to edit, crop, upscale and upload a video to youtube. I'll edit in Vegas, frameserve to MeGui, add avisynth and out to mp4. So I need to resize/crop snd upscale the file to 1920x1080 (I noticed that anything less for low quality videos and youtube will greatly reduce the quality after their conversion). So my questions are:
Should I do the resizing/cropping in Vegas and then upscale in Avisynth or just better frameserve it as it is and do the resizing/cropping/upscaling with avisynth?
And could you suggest a good script for that? I can see that people are suggesting nnedi3 and lanczos/spline for upscaling and resizing. Can you suggest any good settings?
I will upload a clip if someone would like to check it out. That would be really helpful.
2008.08.25 test.mpg
+ Reply to Thread
Results 1 to 22 of 22
-
-
Most NLE's (not certain about Vegas) only do simple bicubic resizing. Check if there is a selection for different kinds. Avisynth of course gives you a whole potpourri from bicubic, spline, and lanczos, see the wiki article for more detail: http://avisynth.nl/index.php/Resize. That way you can test to see which one(s) work best on your footage.
-
It's a lot to take on for a start, that's why I asked the question the way I asked it. Anyway, I went as far as I could with my knowledge and here is where I'm stuck right now. I do editing in Vegas and frameserve the file to MeGui. The confusion is how to do the cropping in avisynth? Never done this before and not so much time right at this moment to experiment also. But I want to achieve this since if I send the file into MeGui and do the upscaling there, it's much faster rendering. The original resolution is 720x576. I can crop in Vegas for 1920x1080 upscaling but if I just send the cropped image to MeGui, that is a letterboxed image, then the final image will be streched into HD along with the letterbox. I don't know how to crop in avisynth. Here is my script:
AVISource("C:\Users\Ashram\Desktop\temp\test.avi",
audio=false).AssumeFPS(25,1)
#deinterlace
#crop
#resize
ConvertToYV12(matrix="PC.709", interlaced=false)
QTGMC(preset="fast", sharpness=0.6, EdiThreads=1)
nnedi3_rpow2(2, cshift="LanczosResize", fwidth=1920, fheight=1080)
Btw. If I render test clips then at the end there is a clicking sound and the rendered clip start to play from the start, just before ending? Why is that? I have zero latency checked. And the upper and lower horizontal lines or the rendered clip are jagging a little. Why is that? I will add the best render I manage to do at this point (that is upscaled in Vegas, no nnedi3, only qtgmc)Last edited by Srivas; 5th Dec 2015 at 13:49.
-
Maybe something like:
Code:Mpeg2Source("2008.08.25 test.d2v", CPU2="ooooxx", Info=3) dehalo_alpha(rx=2.5, ry=2.5) TemporalDegrain(SAD1=75, SAD2=50, sigma=3) MergeChroma(last, aWarpSharp(depth=5)) ChromaShift(c=2) nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=960, fheight=720) Sharpen(0.2) nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1440, fheight=1080) Sharpen(0.2)
-
Hey Jagabo, thanks! It looks good!
But what about cropping? I would do Full HD just for the youtube not to degrade the quality and also widescreen looks good. How to achieve that?
I will definitely have to plunge into studying avisynth. These filters are amazing! And it's free! -
You want to crop the top and bottom to make a 16:9 video? Enlarging the cropped frame even more and keeping sharp edges will require more sharpening. But that means noise in the image will be enhanced, so you want stronger noise reduction. Try something like:
Code:Mpeg2Source("2008.08.25 test.d2v", CPU2="ooooxx", Info=3) Crop(0,72,-0,-72) # adjust top and bottom crops to taste dehalo_alpha(rx=2.5, ry=2.5) TemporalDegrain(SAD1=200, SAD2=150, sigma=8) MergeChroma(last, aWarpSharp(depth=5)) ChromaShift(c=2) Sharpen(0.2) nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720) Sharpen(0.2) nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1920, fheight=1080) Sharpen(0.2)
Last edited by jagabo; 5th Dec 2015 at 12:40.
-
Yes, that's what I want but something is wrong here. This is what I'm feeding into Megui:
And this what comes out according to the script:
I just want to remove the letterbox.
EDIT: The script is proper, I missed the cropping in the script. Now it's ok.
btw. didn't tweak the sharpening yet.Last edited by Srivas; 5th Dec 2015 at 13:52.
-
Bingo! Thank you both, you saved my day! That's it!
I have to say jagabo that the results are much better than I expected as compared with what Vegas can do natively plus noise reduction. How did you learn all this, man??
Btw. do you mind to explain what's the math behind the resize values in the script? And where does the 720x404 composition come from? I can understand that 172 pixels are cut away but how do you know the size of the letterbox in the first place? -
And jagabo, I just noticed that you already added cropping in the modified script,
Crop(0,72,-0,-72) # adjust top and bottom crops to taste -
And just for reference, if that thread might be useful for someone, this is the actual script to get it working as per frameserving from vegas (that means an avi source and required YV12 colorspace).
AVISource("C:\Users\Ashram\Desktop\temp\untitled.a vi", audio=false).AssumeFPS(25,1)
ConvertToYV12(matrix="PC.709", interlaced=false)
dehalo_alpha(rx=2.5, ry=2.5)
TemporalDegrain(SAD1=200, SAD2=150, sigma=8)
MergeChroma(last, aWarpSharp(depth=5))
ChromaShift(c=2)
Sharpen(0.2)
nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720)
Sharpen(0.2)
nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1920, fheight=1080)
Sharpen(0.2) -
Not sure if that is correct approach, Jagabo fixes everything in Avisynth, to get
1440x1080 or 1920x1080 (with Crop(0,72,-0,-72) ) , so he should frame serve original clip, 720x576, he might need to interpret his footage to 4:3 PAL video, right click his clip/properties/Media Tab and set Pixel Aspect Ratio to PAL DV,
but in his sample, video is flagged as progressive and it seems to be progressive, but he frame serves interlaced video, judging by his script. Jagabo does not deinterlace in his script. So this might need to be straighten up in his Vegas project as well. Vegas should have project properties of the clip, they have to be the same, clip properties (PAL DV but progressive) and projects properties (PAL DV but progressive), if frame serving, this is important.
Maybe if he fixes his project settings, his clip in Vegas preview window would look correct without interpreting his footage.
EDIT: sorrry I did not talk to you (Srivas) directly, I thought smrpix input was last in this threadLast edited by _Al_; 5th Dec 2015 at 13:46.
-
Al, thanks for noticing. I already fixed that in the process. I will edit the above post to make it less confusive. The file is progressive and this is how it's set in the final script.
And the other point is valid also. Right now cropping is done twice, right? I should have had to post the original clip but I thought it might be easier for me to do the initial cropping in Vegas and just remove the letterboxing in avisynth. But then again, if that would affect the final material, then I will adjust to the learning curve...Last edited by Srivas; 5th Dec 2015 at 13:54.
-
Do not crop in Vegas, because you are frame serving project properties, you'd need to fix even project properties to those values as smrpix suggested, but that would mean Vegas got his hands on video (DV is not square pixel) , and then Avisynth would do it again anyway, I'd just set project as clip (PAL DV but field order changed to progressive) and then use these lines in Avisynth:
Code:Crop(0,72,-0,-72) . . nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720) nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1920, fheight=1080)
-
Technically, you're not really cropping in Vegas right now, you're just adding black bars to the image which need to be cropped out afterwards. That's why I suggested you create your timeline as a 16:9 composition and frameserve an actual (cropped)16:9 signal.
-
do not crop in Vegas but in Avisynth instead of :
Crop(0,72,-0,-72)
use something like this:
Crop(0,36,-0,-108)
If you'd need to crop differently in every clip in Vegas, THEN you'd need to use Vegas for it, like you just did, keep the same project properties, that is what smprix perhaps think, that would introduce those black borders in Vegas. You'd use the same script in Avisynth (cutting those black borders) But you'd introduce one more resize (bicubic or whatever Vegas uses) in your whole process. And there is one more thing, your video is not square pixel, so you'd cut certain number of pixels that keep real aspect ratio at the end, that is why it is better to leave it all to avisynth. Well in PAL land aspect ratio screw up is not that visible as in NTSC land, so ....Last edited by _Al_; 5th Dec 2015 at 14:14.
-
Thanks! Just did a comparison and the quality is slightly better also. That just confirms your point.
Actually I could just render the whole video directly with avisynth now. That's cool!Last edited by Srivas; 5th Dec 2015 at 14:19.
-
Late in the game, but here's my 2cents:
Vegas is great for editing, but just like like most NLEs, it is only average as a video processor. That is where AVISynth shines. Let AVISYnth do ALL the cropping, resize, noise reduction & deinterlace. The only downside to using AVISynth is the lack of an interactive GUI to make the adjustments (though AVSPMod can help with that).
IIWY, I would:
Edit all natively in Vegas, keeping the project properties the same as the source clips (e.g.: DV-PAL in->DV-PAL out).
Either export uncompressed/LL or frameserve, to AVISynth.
In AVISynth, do the Deinterlace, Crop*, Resize*, and NR (I'd do it in that order, even if it isn't as efficient memory-wise), sharpening last.
That will frameserve/source the MEGUI encode. With it, I'd save to HQ (if CQ/CRF) or high bitrate (if VBR/CBR) AVC (standard YV12 colorspace, standard levels & profiles). Upload that.
Make it a 1080p60 for uploading. Might even do that trick with resizing (in AVISynth) to UHD (2160p60) to let YT drop it down, as that has been reported to make the resulting HD encodes better.
Scott
*Use crop & resize figures that will compensate for the change from non-square pixel to square pixel, as well as accommodate the possible change of Aspect Ratio. -
Not bad 2 cents, Cornucopia!
I was just wondering why is it that there is no avisynth based NLE out there? I can see some discussion on forums from 2007 but that is like 8 years ago. Is it so difficult to recognize the power of avisynth? Or it's the usual money-makes-the-world-go-round program? Although it would be a money-maker for sure. But then is that against the freeware policies or something? Anyway...
You made good points, I will go that direction. -
Editors (Linear AND Nonlinear) in their infancy were EDL/script-based. And they were a frickin' pain to work with that way (yes, I've been around long enough to work on CMX A/Broll editors), once you get beyond a dozen clips to manage. Graphical, object-oriented approaches make much better sense work-flow-wise.
AVISynth is great for processing, but it would be a reversion/devolution to try and shoehorn modern NLEs into AVISynth's structure.
Someone could make an NLE plugin that does AVISynth processing on selected clips/sequences, but even that isn't easy or without pitfalls (because of the unpredictable open-ended nature of scripting). And of course, it DOES revolve around making money - a venture like integration of AVISynth into NLEs is far from trivial so it would need to be funded, and that changes peoples' motivations.
Practically speaking, those who use the big NLEs usually fall into the category where the kind of processing work that needs to be done on their clips isn't as drastic as consumer/hobbyists', making AVISynth less necessary (IOW, the clips & the NLE are "good enough"). And then there are those few people & times where LOTS of work needs done to process, and AVISynth is the best at that, but those at least lend themselves to a batch/script-based workflow, so the NLE is less necessary. Only rarely are both essential to a project.
Scott
Similar Threads
-
best practices when using MSU logo remover with virtual dub
By snafubaby in forum Newbie / General discussionsReplies: 3Last Post: 31st Jan 2016, 01:22 -
Tips for Best Practices: Capture Gameplay / Upload on Youtube
By RSene in forum Newbie / General discussionsReplies: 4Last Post: 22nd Aug 2015, 16:39 -
Best practices to try to avoid vcr tape damage?
By dianedebuda in forum Newbie / General discussionsReplies: 1Last Post: 24th Jan 2014, 12:23 -
recording 1080i from dvb-t usb tuner - best practices
By codemaster in forum DVB / IPTVReplies: 1Last Post: 15th Mar 2012, 02:10 -
DV to computer (best practices)
By spcchap in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 3Last Post: 9th Jan 2012, 12:58