upscaling to 4k....

Kommentare

NickHope schrieb am 15.11.2012 um 05:46 Uhr
paul_w wrote: The only thing is, as predicted, the files are huge. Something like 6 gigs for 10 seconds. Its all uncompressed AVIs. im looking into compression now.

My favourite lossless codec is UT Video Codec. It decodes faster than Lagarith, so you can get smoother playback. When you render, there is a setting to optimise for decoding speed over file size. I'm using 11.1 still, but would try the latest if I was starting from scratch.

Here is a useful page for visualising different resizing kernels. Hover over the links on the left to highlight the corresponding graphs. They give you an idea of how much blurring/sharpness/ringing each kernel gives. Read and absorb the text at the top well! Personally I'm tending to do everything with Spline36 in AviSynth, both upscale and downscale, then sharpening upscales afterwards if they need them. Spline36 is very similar to Lanczos3. If the source already has heavy sharpening then a kernel such as Lanczos4 that induces more ringing can start to make it look ugly. Probably better in such a case to choose a milder kernel and do sharpening afterwards, preferably with something like LSFmod which strives to limit ringing.

Bear in mind that prolonged exposure to this stuff can bring on Pixel Peep Syndrome (PPS), a severe form of migrane that renders the sufferer incapable of distinguishing good from bad.

If you are starting out with AviSynth then there is some value in wading through this, but get a good double espresso down your neck first.
ushere schrieb am 15.11.2012 um 08:11 Uhr
Bear in mind that prolonged exposure to this stuff can bring on Pixel Peep Syndrome (PPS), a severe form of migrane that renders the sufferer incapable of distinguishing good from bad.

never were truer words spoken ;-)

as an aside, i have to say that when / if 4k eventually arrives in our living rooms we'll still be forced to watch the same repeats only with worse resolution than now. broadcasters certainly WONT be broadcasting 4k anytime soon. and finally, judging from the beautifully shot crap that pervades tv at the moment, i doubt content will improve in relationship to picture quality....
musicvid10 schrieb am 15.11.2012 um 15:12 Uhr
The true danger is that PPS will progress to PPPS (Pixel Peep Pygmalion Syndrome), a more serious form of the condition marked by a compelling need to impose one's views on others, which are based entirely on one's expectations and self-delusion, and supported only by subjective interpretation of ambiguous data. Rarely fatal, but always incurable. Related: see hydrogenaudio authoritarian complex.
wwjd schrieb am 15.11.2012 um 16:23 Uhr
so, staying inside Vegas (just because I'm lazy) are there some settings to do the best possible 4k upscaling? use unsharp mask rather than sharpen, or gaussian blur or other? That kind of thing?

paul_w schrieb am 15.11.2012 um 16:28 Uhr
Thanks again Nick, excellent info, a great help. Bookmarked a few links to keep me occupied.
I do have another question though, with reference to the UT video codec. Are you using this as a render out codec from AviSynth / VirtualDubMod ? Presumably to reduce the file size of the final file. If so, wouldnt that limit the target devices to display the file? Like say a PC media player. I'm just curious about that.
I am now looking at using this workflow to upscale some older SD to HD footage. So its not just 4k.
Who cares about pixel peeping? Not me. A senseless past time. Use your eyes!

Paul.
RalphM schrieb am 15.11.2012 um 16:38 Uhr
Musicvid,

And all this time I thought PPPS stood for Pompous Politician's Personality Syndrome.... It fits perfectly.
paul_w schrieb am 15.11.2012 um 16:50 Uhr
yes, or Pompous Poster Personality Syndrome.. There are certainly one or two of them on here. Sadly.

Paul.
musicvid10 schrieb am 15.11.2012 um 17:16 Uhr
"yes, or Pompous Poster Personality Syndrome.. There are certainly one or two of them on here. Sadly."

+1
Describes me perfectly!
paul_w schrieb am 15.11.2012 um 23:15 Uhr
ok, as a follow up from my earlier post, i thought it worth posting some findings:
I have now compared rendering out from Vegas to 4k vs rendering out with AVISynth with Lanczos3. Yes i'm guilty of a little pixel peeping here but was necessary to get right in there to compare. The result (for me at least) Lanczos3 is better at upscaling, however the results are close. If you step back and look at the image, i dont think there is much to get excited about in terms of one over the other. Pretty close really. But yes - Lanczos3 is doing a better job.
My actual conclusion to this is that it depends more on the resolution of your glass rather than the sensor. I set up some testcard shots at 1080p and it was difficult to actually get to pixel resolution. I tried Nikon and Canon glass. Now that's a real world factor in this. Its never going to be that sharp upscaling unless your optics are of the highest quality - i could only get close.
Another point, while experimenting with the UT Video Codec for rendering out from AVISynth - I got excellent results. No loss of quality what so ever (thats why its called loss-less compression!). File sizes were reduced from 6 gigs (10 seconds) to 1.8G. Thats a huge reduction. So UT Video Codec is a win for me too.
Right, i believe i have spent enough time on this now and have established a good starting point. Thanks to all, especially Nick for the info.

Paul.
wwjd schrieb am 16.11.2012 um 05:15 Uhr
great info and tests paul. sounds like I'll probably just stay inside vegas if the visual improvement wasn't HUGE. but knowing you can squeak even a little more out using better tools is great.

NIKON and CANON? do you mean their camcorders or DSLR?
I have a Canon T3i and am fairly convinced the sensor is not REALLY recording 1920x1080 even if the final pixel size IS that. The way they use "shifted pixels", or whatever, makes the image softer, and, when compared directly to the same camera taking still photos at 1920x1080, the video version looks like less resolution. I'm not sure what they are doing, but I can't call it REAL HD if the actual recordable pixel count is less. I read the Panasonic actually has more detail (more pixels working together?) in its image than Canon.

did I read you reduced file file size from 6gigs to 1.8 but retained full loss-less image? That is great and will be very helpful going forward with this stuff. Small files always seem more usable in editors and for file management/storage.

BTW what are you using to playback 4k files?
NickHope schrieb am 16.11.2012 um 07:04 Uhr
paul_w wrote: I do have another question though, with reference to the UT video codec. Are you using this as a render out codec from AviSynth / VirtualDubMod ? Presumably to reduce the file size of the final file. If so, wouldnt that limit the target devices to display the file? Like say a PC media player. I'm just curious about that.

I never use UT video codec for final delivery. It's only as an intermediate. So I only care that it can be read by Vegas. I usually render to it with VirtualDub, and occasionally with Vegas itself.

Here's my workflow for upscaling SD 4:3 DV to "fake" 720pHD.

1. SD 4:3 DV clips on the Vegas Pro timeline.
2. Color correct, mostly using curves.
3. Debugmode Frameserve out (RGB24) each clip, or continuous sequence of clips that doesn't include a transition.
4. Clip passes through AviSynth (SEt's MT build)
5. AviSynth script looks something like this, at its very simplest. I could post my full bloated script with all the commented-out options (denoising, slomo etc.) if you want.
AviSource("d:\fs.avi")
AssumeBFF()
Crop(0,2,0,-2)
ConvertToYV12(interlaced=true)
QTGMC( FPSDivisor=2, Preset="Slower" )
Spline36Resize(988,720)
AssumeFPS(25)

6. Open the script in VirtualDub and render to UT Video Codec (ULRG), (tick "optimize for decoding speed")
7. Put the UT files back on the Vegas timeline and match project properties to them.
8. Add a Sony Sharpen, amount 0, to most clips
9. Add transitions, titles etc. at the new 988x720 resolution
10. Frameserve finished file out again
11. Render to x264 mp4 in MeGUI

Despite not being 16:9, YouTube will still give it the "HD" label, and render a 720p version. Example result on YouTube is at ...examples of exactly the same but without the sharpen are in this playlist: http://www.youtube.com/playlist?list=PL36311FFB37BD03EC

If I was in pixel peeping mode I would do a more thorough comparison of the Sony sharpen versus LSFmod and other AviSynth methods, but the Sony sharpen with amount 0 looked pretty good to me on most of the clips so I just went with it.

A similar method could also be applied to 1080>4k upscale. The above method is worth the effort to me because of the quality of the deinterlacing done by QTGMC. If you're just going 1080p>4k (no deinterlacing) it might well be that Vegas' native bicubic resizing plus a 'sharpen 0' (or perhaps unsharp mask) is pretty much as good, and it's far easier.

EDIT: On the subject of lossless codecs, check out musicvid's excellent comparison. I'd love to see a decoding speed test added by simply see how many fps playback you get in Vegas. In my brief, undocumented test, UT was faster than Lagarith and Huffyuv, hence smoother playback.
paul_w schrieb am 16.11.2012 um 12:55 Uhr
@wwjd thanks. I did spend a few hours doing this and hoping its of mutual benefit.
When i say Nikon and Canon, i am only talking about lenses not cameras. Currently, i shoot with an FS100 and it takes all lenses with adapters. And its 1080p.
Your T3i should be recording true 1920 x 1080, at least it is advertised as such. If you're seeing softening in the results, check out the sharpening settings in your camera menu. I also have a 7D and i do see a lack of sharpness from that even at its sharpest setting. But some post sharpening could probably bring the image back. Some cameras benefit from it, others not. You may have to dig deeper and check out how other users are using that camera.
Yes, i got great results from the UT codec. 6->1.8 gigs. And no loss at all that i can see, even when pixel peeping. My playback devices are limited! And currently i'm using AVS player spanned across 3 monitors! lol. Its not great, but at least i can get the image to fit for checking purposes. Playback frame rates vary but having a hard time getting to full frame rates, i need to experiment more with this. One things for sure, 4k means 'need fast computer'.

Paul.
paul_w schrieb am 16.11.2012 um 13:10 Uhr
@Nick, my mistake, i understood UT was used for final renders. So you use it an an intermediate, got it.
I am certainly going to try your script. I have a bunch of old 4:3 camera DV tapes that need loading in and i have been waiting for a workflow to convert them to wide screen. Mainly me in my music band days so a little self indulgent and some shows i did in London. So getting the cropping right and de-interlacing to progressive would be great.
One thing i had really missed while testing this was the whole de-interlace test. My tests were 1080p only so far. So i'm sure your workflow is really helping with that compared to Vegas alone doing it. And of course this would matter a lot as my DV tapes are all interlaced.
Thanks for posting the script. Lets see how the basic version goes first, as i do not know what is in your full blown version, i will leave that up to you if you want to post it or not. Cheers.

Paul.
NickHope schrieb am 16.11.2012 um 20:57 Uhr
Well here you go. Every line starting with # is commented out (disabled). I uncomment and adjust bits as I need them. Much of it would require further explanation but I'll present it pretty much as I use it. Maybe bits of it can help you or someone else in the future.

SetMemoryMax(1024)
SetMTMode(3, 6)

#Frameserve PAL source in RGB24 format
AviSource("d:\fs.avi")
AssumeBFF()

SetMTMode(2)
Crop(0,2,0,-2) #Crop Sony VX2000 footage
#Crop(9,6,-15,-6) #Crop Panasonic footage, frameserved RGB
#Crop(10,6,-16,-6) #Crop Panasonic footage, direct on YUV DV file, needs MOD16
#Crop(72,58,-72,-58) #Zoom

ConvertToYV12(interlaced=true) #For frameserved RGB to lossless RGB in VirtualDub
#ConvertToYV12(interlaced=true, matrix="PC.709") #For frameserved RGB to x264 in MeGUI
#SmoothLevels(preset="pc2tv") #For direct on DV or HDV file

#TDeint(mode=1) # Smart bob 50p output for clips that QTGMC weirdly warps

QTGMC( FPSDivisor=2, Preset="Slower", EdiThreads=2 ) #25p output
#QTGMC( FPSDivisor=2, Preset="Slower", Sourcematch=3, Lossless=2, EdiThreads=2 ) #25p output, theoretically closer to original
#QTGMC( Preset="Slower", Sourcematch=3, Lossless=2, EdiThreads=2 ) #50p output
#QTGMC( FPSDivisor=2, Preset="Slower", EZDenoise=5.0, NoisePreset="Slow", EdiThreads=2 ) #Denoise

#Motion blur. ShutterAngleSrc=9000/shutter or 10800/shutter.
#QTGMC( FPSDivisor=2, Preset="Slower", ShutterBlur=3, ShutterAngleSrc=0, ShutterAngleOut=180, EdiThreads=2 )

#Enable 3 of these lines for slomo and disable all QTGMC lines above
#QTGMC( Preset="Slower", Sourcematch=3, Lossless=2, SubPel=2, EdiThreads=2 ) #50p output
#QTGMC( Preset="Slower", SubPel=2, EdiThreads=2 ) #50p output
#super = MSuper(levels=1, pel=2)
#MFlowFps(super, QTGMC_bVec1, QTGMC_fVec1, num=30526, den=1000, ml=100, blend=false) #num=25000/playback rate
#MFlowFps(super, QTGMC_bVec1, QTGMC_fVec1, num=34500, den=1000, blend=false, thSCD1=352, thSCD2=110) #Lower frame detection thresholds to fix scrambled frame(s) at scene boundaries

#Various resizing algorithms
Spline36Resize(988,720)
#BlackmanResize(988, 720)
#Lanczos4Resize(988,720)
#NNEDI3_rpow2(rfactor=2, cshift="bicubicresize", fwidth=984, fheight=720) #Double size with NNEDI3 then downscale
#EEDI3_rpow2(rfactor=2, cshift="spline36resize", fwidth=984, fheight=720) #Double size with EEDI3 then downscale
#ResampleHQ(988,720) # Gamma-aware resize

#NNEDI3_rpow2(rfactor=2, cshift="spline36resize") # Double size with NNEDI3
#Crop(0,36,0,-36) #Crop to 1080

#LSFmod(strength=300, edgemode=1) #Sharpen with less ringing
#sharpen(0.5,0.5) #Standard sharpen

AssumeFPS(25)
paul_w schrieb am 17.11.2012 um 00:56 Uhr
Nick, brilliant. i will be testing this over the weekend.

Paul.
wwjd schrieb am 20.11.2012 um 15:43 Uhr
Sony will deliver 4KTVs with built in storage for content delivery...

http://www.redsharknews.com/distribution/item/233-did-sony-just-reveal-the-next-blu-ray
paul_w schrieb am 25.11.2012 um 15:34 Uhr
Just an update, now using Nick's method and script to work through some older 4:3 footage from dv cams into cleaner wider format. Got the whole thing working fine here. Using a combo of AviSynth MT (multi threaded) and VirtualDub. The required plugins for the script took a little finding but wasn't too bad.
What i would say is that, this is probably more useful for cleaning up 4:3 interlaced footage than for scaling from 1080p to 4k although its good at that too. So the direction of upscaling to 4k has changed into this for me!.
Either way, its a useful tool. Most impressed with its De-interlacing quality and noise reduction. My 4:3 dv footage never looked so good.

Paul.
wwjd schrieb am 24.12.2012 um 18:06 Uhr
k, I finally did a little test of rendering to 4k, and this is the result of my unscientific test. There are simply more pixels and more gradient colors between when upscaling to 4k. This interested me because that means color grading can go a little smoother AND if left to 4k, it won't be a complete train wreck like hugh blocky pixels simply rendered with a bunch of smaller pixels of the exact same color. Because the colors DO vary. At least in the 32bit render.

This was a light dot, piece of white beard or something, blown up to it's max.


I should state this is 1920x1080 footage from a Canon T3i, with the project settings of 32bit color, sized HD = 1920x1080, 2k and 4k.
Chienworks schrieb am 24.12.2012 um 21:04 Uhr
We can't really tell how that image looks out of context like that. For all we know, all you've accomplished is to blur the image badly.
wwjd schrieb am 24.12.2012 um 22:39 Uhr
zoomed out, viewing at 1080 on my monitor, all 3 looked exactly the same. probably because there is only so many pixels to display the different colors in the space.
What I am showing is that 4K can give your deeper range of pixels to deal with while color correcting etc.
Obviously, a 4k blow up of a 1080 picture will look fuzzier, but I think for editing this squeeks more range out of possible colors in the HD file. And you can success at upscaling to 4k in Vegas without simply doubling the square pixel sizes - its blends out instead of just doubling what is there.
farss schrieb am 24.12.2012 um 23:04 Uhr
As much as I don't want to be a Gringe on Christmas Day you are fooling yourself.
Upscaling to 4K with Vegas simply blurs thanks to the bicubic interpolation Vegas uses, you gain nothing and may even lose something. The seeming improvement in colour only happens for the same reason. If you want more chroma data record with less chroma subsampling.

There are tricks that can, maybe, sometimes on the right day of the week extract a better image when upscaling. They rely on fractals. The theory behind this, as best I can understand it, is that most things in nature have shapes that follow certain mathematical rules. Using that it is possible to in effect predict what was in front of the camera and rebuild it at higher resolution within a lower resolution image.

The process seems far from goof proof. Other approaches rely on extracting data from adjacent frames and this does seem to work quite well. Again though not goof proof and may need tweaking from shot to shot.

Bob.
wwjd schrieb am 25.12.2012 um 04:08 Uhr
yes, I understand and agree Vegas is not the best place to REALLY do upscaling. But I was curious what I could end up with. It doesn't LOOK any worse at 1080, but I was interested in the extra levels of colors that could be tweaked. guessing that is the Chroma you spaketh of? Heck, my PC can't even play 4k files, but it was fun to experiment and see what Vegas can do. :)
musicvid10 schrieb am 25.12.2012 um 04:30 Uhr
"is that most things in nature have shapes that follow certain mathematical rules."

Close, but the real beauty is that the output of one iteration becomes the input for the next one. So the rules are kind of an aftereffect rather than precondition.

Highly recommended: "The Colours of Infinity' by Arthur C. Clarke. Also broadcast years ago on PBS.
farss schrieb am 25.12.2012 um 10:54 Uhr
wwjd said:

"It doesn't LOOK any worse at 1080, but I was interested in the extra levels of colors that could be tweaked. guessing that is the Chroma you spaketh of?"

Yes. You can achieve the same though without scaling using the Chroma Blur FX.

Musicvid said:
"Close, but the real beauty is that the output of one iteration becomes the input for the next one."

You'll have to excuse my mathematical ignorance here.
Isn't that basically what a fractal is?

Bob.