Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
576i upscaled to 720p - How to sharpen for YouTube?
I am upscaling PAL DV (720x576-50i) to 982x720-25p for YouTube (and maybe for Blu-ray).
Here is a second of (graded) PAL DV source. I'm framserving in RGB24 from Sony Vegas, then using this basic script: Code:
AviSource("d:\fs.avi") AssumeBFF() ConvertToYV12(interlaced=true, matrix="PC.709") QTGMC( FPSDivisor=2, EdiThreads=2 ) NNEDI3_rpow2(rfactor=2, cshift="spline36resize", fwidth=982, fheight=720) And here is a screenshot: ![]() It needs some sharpening, but I have little experience in this area. I know that too much sharpening can cause problems with compressing, in particular as my main target is YouTube. I tried adding the following line to my script: Code:
LSFmod(defaults="slow",strength=500) - Is LSFmod a sensible way to sharpen upscaled footage such as this? - In your opinions is it too much or too little sharpening? - Any suggestions for other ways to sharpen this? - Am I gaining much by using LSFmod over, say sharpen(0.75,0.75) Thanks! |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,769
|
Youtube always reencodes, and the upscaling will be even more visible. And anyway, who wants quality does not use youtube, instead file-exchange servers, like (no advertisment here
![]()
__________________
Born in the USB (not USA) |
![]() |
![]() |
![]() |
#4 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,390
|
First of all, the footage is too bright. Blackpoint seems to be at 30~32 RGB, which is too high. Depending on the RGB<>YUV conversion standard, this is either 16 points too high ("Studio RGB"), or 32 points too high (sRGB).
With levels corrected, you'll find the footage has more overall contrast, and less need for sharpening. (Perhaps it could be sharpened a 'lil bit, but then, it would be beneficial if the already-present "edge-enhancement" (dark halos beneath bright features) would be removed prior to that.)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
![]() |
![]() |
![]() |
#5 | Link | ||
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
Thank you Didée.
Quote:
For the streetseller, the footage is more or less what came out of my Sony VX2000 on auto-exposure. After clipping to 16-235 with a curve, my histogram in Sony Vegas Pro looks like this: ![]() I suppose the part below 32 may be mostly noise, but to me the levels look pretty good once the Adobe Flash Player has mapped them out to 0-255 on the YouTube page. There are no true blacks here anyway. Quote:
To me, the video with the LSFmod sharpening looks vastly superior to that without, before sending to YouTube. |
||
![]() |
![]() |
![]() |
#6 | Link |
Registered User
Join Date: Apr 2006
Posts: 299
|
I had a look at the screenshot through 2.4 pure gamma calibrated 3DLUT and I agree a 32 black point looks more like intended. Keep in mind due to the sharpening inherent to the source, levels will exist outside of 32-235. Doing processing before mapping to 0-255 will make for a higher quality end result though, especially with some mt_convolution magic.
EDIT: So you plan to recieve payment for this footage? A free download link to those that helped would be in order :P I'll have to remind myself about the board rules... Last edited by markanini; 19th December 2011 at 14:02. |
![]() |
![]() |
![]() |
#7 | Link | |||
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
Thank you markanini.
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#8 | Link | |||
Registered User
Join Date: Apr 2006
Posts: 299
|
Quote:
If it was my project besides sticking with 32 black point I'd reduce contrast and saturation with Smootlevels, just before mapping to 0-255. Hang on I'll post an example just for fun. Quote:
Quote:
Last edited by markanini; 19th December 2011 at 15:56. |
|||
![]() |
![]() |
![]() |
#9 | Link | ||
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
Quote:
Quote:
![]() The majority of my footage is underwater, so haloing is generally not as severe as it is on that streetseller. |
||
![]() |
![]() |
![]() |
#10 | Link |
Registered User
Join Date: Apr 2006
Posts: 299
|
My bad, I already played a bit with your screenshot:
![]() SmoothLevels(input_low=32,output_low=235,chroma=150,TVrange=false,Lmode=1,darkSTR=50,brightSTR=50) My point was that you could abuse the Chroma and Lmode settings to reduce the somewhat excessive contrast and saturation in a quick and dirty way. Obviously underwater footage has different concerns. I remember some VirtualDub plugin examples that looked fantastic. I'll try to remember what that was and come back to you. |
![]() |
![]() |
![]() |
#11 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,390
|
Perhaps yes, perhaps no ... main interest = halo removal, sharpening not seriously considered:
![]() Code:
# removegrain.dll # medianblur.dll # mt_masktools.dll avisource("982x720-QTGMC-NNEDI-Spline36.avi") pointresize(984,720,0,0,984,720) # need mod4 ... converttoyv12( matrix="PC.601" ) # ... for YV12 o=last small = o.bicubicresize(984-96,432,-.4,.2) o.mt_makediff(mt_makediff(small,small.removegrain(20).removegrain(11)).bicubicresize(984,720),U=2,V=2) o.repair(last,13) o.repair(last,13) xx=removegrain(11) last.merge(last.sbr(),0.751).mt_adddiff(mt_makediff(xx,xx.minblur(3)),U=2,V=2) last.mt_lutxy(o,"x y < x 1 + x y > x 1 - x ? ?",U=2,V=2) smoothlevels(30,1.0,240,16,235) interleave(o,last) return(last) #=====# Helper Functions #=====# function sbr(clip o) { rg11=o.removegrain(11) rg11D=mt_makediff(o,rg11) rg11DD=mt_makediff(rg11D,rg11D.removegrain(11)).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?") o.mt_makediff(rg11DD,U=2,V=2) } function MinBlur(clip clp, int r, int "uv") { uv = default(uv,3) uv2 = (uv==2) ? 1 : uv rg4 = (uv==3) ? 4 : -1 rg11 = (uv==3) ? 11 : -1 rg20 = (uv==3) ? 20 : -1 medf = (uv==3) ? 1 : -200 RG11D = (r==0) ? mt_makediff(clp,clp.sbr(),U=uv2,V=uv2) \ : (r==1) ? mt_makediff(clp,clp.removegrain(11,rg11),U=uv2,V=uv2) \ : (r==2) ? mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20),U=uv2,V=uv2) \ : mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20).removegrain(20,rg20),U=uv2,V=uv2) RG4D = (r<=1) ? mt_makediff(clp,clp.removegrain(4,rg4),U=uv2,V=uv2) \ : (r==2) ? mt_makediff(clp,clp.medianblur(2,2*medf,2*medf),U=uv2,V=uv2) \ : mt_makediff(clp,clp.medianblur(3,3*medf,3*medf),U=uv2,V=uv2) DD = mt_lutxy(RG11D,RG4D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2) clp.mt_makediff(DD,U=uv,V=uv) return(last) }
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
![]() |
![]() |
![]() |
#12 | Link |
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
That's looking pretty good Didée. It seems to remove halos just a little bit more than DeHalo_alpha(). What do you reckon to LSFmod(defaults="slow",strength=500) after this? Too strong? Admittedly this girl is starting to send me blind.
|
![]() |
![]() |
![]() |
#13 | Link |
Moderator
![]() Join Date: Oct 2001
Location: Hawaii
Posts: 7,407
|
My own opinion is that the more you sharpen the poorer the quality and the more artifact-ridden it'll be after YouTube gets done with it. They don't do any quality-based encodes, but just bitrate encodes based entirely on the final height (360p, 480p, 720p, etc.) and use bitrates most of us here consider way too low. An LSFmod strength of 500 is pretty high. Maybe make two encodes and 2 uploads, one with a 500 strength and one without any sharpening, or maybe with a strength of 100. Then compare the results. You may (or may not) decide the softer one looks better overall.
|
![]() |
![]() |
![]() |
#14 | Link |
Registered User
Join Date: Dec 2002
Location: UK
Posts: 1,673
|
...and even more controversially, you might find the version with halos looks far better on the 240p/360p/480p downscales that your new version without.
Are the stats for how many people use each resolution (when a choice is available) published anywhere? Cheers, David. |
![]() |
![]() |
![]() |
#15 | Link |
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
I haven't seen such stats David, but I suspect far more people would watch the lower resolution versions, for now. As far as I know, you still even have to manually change your YouTube settings if you want videos to default to HD at full screen. Just tried it on my girlfriend's account and it was staying at 480p despite choosing full screen.
As most of my footage doesn't exhibit as much haloing as the streetseller clip, I've tried dropping the dehaloing routine completely, switching from spline36 to bicubic (in an attempt not to make the haloing worse), and used a moderate LSFmod strength of 200. Code:
AviSource("d:\fs.avi") AssumeBFF() ConvertToYV12(interlaced=true, matrix="PC.709") QTGMC( FPSDivisor=2 ) NNEDI3_rpow2(rfactor=2, cshift="bicubicresize", fwidth=984, fheight=720) LSFmod(strength=200) I'm not too sure about Adobe Flash Player's upscaling. My offline media players seem to be better at it. |
![]() |
![]() |
![]() |
#16 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,285
|
Quote:
http://www.youtube.com/v/nhWBCoMzva8&hd=1 Some old YT tips & tricks guides (some might be outdated) http://www.techairlines.com/2010/08/...be-url-tricks/ |
|
![]() |
![]() |
![]() |
#17 | Link | |
Registered User
Join Date: Nov 2009
Posts: 2,335
|
Quote:
I wouldn't do a nnedi3 upsize after QTGMC deinterlace. It adds a too "antialiased" look (nnedi3 twice). You can either use a different resizer or try the lossless/sourcematch feature of QTGMC although by doing the latter your script would get really slow. Since footage is mostly underwater I think it would benefit from the dither tools in order to help soothe quantization banding, and upload an already h.264 encoded file rather than lossless file, although I doubt you did this. By some reason at low quality encodes it seems to retain more quality a h.264HQ->h.264LQ than lossless->h.264LQ. I would do most of the sharpening inside QTGMC too |
|
![]() |
![]() |
![]() |
#18 | Link | ||
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
Thanks for the replies.
I think you may have misread my message, or I wasn't clear enough. I meant the default resolution when someone clicks the full screen symbol at the bottom right of a video. It appears to be controlled by this YouTube setting, which is off by default: ![]() Of course if you have great bandwidth and are in a more developed part of the world, you may well get HD anyway at full screen. Here in Thailand we were getting 480p at full screen until checking that box. By the way the link you gave me was for a YouTube video to fill the browser, not the screen. Quote:
Quote:
|
||
![]() |
![]() |
![]() |
Tags |
lsfmod, qtgmc, sharpen, sharpening, upscale |
Thread Tools | Search this Thread |
Display Modes | |
|
|