How to upscale from SD to HD? - Page 2 at DVinfo.net
DV Info Net

Go Back   DV Info Net > Windows / PC Post Production Solutions > Non-Linear Editing on the PC
Register FAQ Today's Posts Buyer's Guides

Non-Linear Editing on the PC
Discussing the editing of all formats with Matrox, Pinnacle and more.

Reply
 
Thread Tools Search this Thread
Old January 10th, 2009, 01:54 AM   #16
Regular Crew
 
Join Date: Nov 2005
Posts: 51
Robert, the link for TempGaussMC links to a forum discussion where potential memory leak problems are discussed. Did I misunderstand you somehow or has the page you refer to been changed somehow? In that case, can I get my hands on TempGaussMC elsewhere? Regards,
Nikolaj
Nikolaj Marquez von Hage is offline   Reply With Quote
Old January 10th, 2009, 02:08 AM   #17
Major Player
 
Join Date: Jun 2003
Location: Miller Place, NY
Posts: 820
Sorry, Nikolaj, I forgot that page links to one particular post in that discussion that itself has a link to the file:

http://home.arcor.de/dhanselmann/_st...ssMC_beta1.rar

I thought I proofread my post, guess I let one mistake slip by. I'll go fix that right away!
Robert Martens is offline   Reply With Quote
Old January 10th, 2009, 05:49 PM   #18
Major Player
 
Join Date: Jun 2003
Location: Miller Place, NY
Posts: 820
On the subject of deinterlacing footage without rescaling, one can simply remove the line with the Lanczos4Resize (or comment it out by adding a # to the beginning of the line).

You'll still need the SelectEven() to get the same framerate as the original source, otherwise you'll get a fields-to-frames conversion. A very good one, but it may not be what you want.

Why bother bob deinterlacing to 50p first? Why not go directly to 25p from the source footage? Because Didée's TempGaussMC only allows for bobbing, and I've yet to find another deinterlacer that works nearly as well, or with as little parameter adjustment. It produces stable images, preserves much of the original detail, and denoises the source in the process.

Other software exists that works faster, and avoids the step of generating one frame for every field only to throw half of them away later, but I've never seen anything that looks this good.
Robert Martens is offline   Reply With Quote
Old March 1st, 2010, 11:49 AM   #19
Major Player
 
Join Date: Jun 2003
Location: Miller Place, NY
Posts: 820
Resurrecting a thread more than year dead would normally be poor etiquette, I know, but I have something to add here.

First things first, this ignorance deserves to be corrected:

Quote:
Originally Posted by Robert Martens View Post
Other software exists that works faster, and avoids the step of generating one frame for every field only to throw half of them away later, but I've never seen anything that looks this good.
Some time after I posted that I actually got around to reading the Avisynth manual in depth, and it turns out that since scripts are interpreted output-to-input (back to front, bottom to top, however you want to describe it), any frames a calling application never requests are never generated. So with the procedure I detailed on the last page, you're not generating 60p and throwing away half the frames, you're only generating every other frame in the first place. No wasted CPU cycles.

But I wouldn't bother replying to such an old thread just for that. The real news is that I've designed a custom Avisynth script that will take care of most of the questions surrounding how to crop and scale DV footage to produce certain kinds of SD and HD output. It uses updated, much more stable versions of the software listed in my giganto-post from the previous page, and addresses a concern Nikolaj brought to my attention shortly after this thread first popped up: motion blur. To quote from my own description of this new script:

"TGMC is a bob (fields-to-frames) deinterlacer. Normally one wouldn't use such a tool to create same rate output, but since TGMC handles diagonals so well--and denoises so well, and does everything else so well--I've elected to employ it for that task. The problem comes in the motion blur. Producing a bobbed stream and simply following it up with a SelectEven() or SelectOdd() will give you, using NTSC as an example, 30 images per second, each of which has a shutter speed of 1/60th of a second. This is undesirable to most people, as I've been told, where the preferred result is 30 images per second that each have a 1/30th shutter speed.

I've built a compromise into this script that will bob deinterlace the input video in all cases, but when shtrfix is true pairs of frames will subsequently be merged to create a same-rate output that simulates (it's not perfect, of course) the look of footage shot with the proper exposure time. I nonetheless recommend those questing for the film look Holy Grail try setting both this and drate to false. The staccato motion rendering thus provided will give something approaching the visual impact provided by 24 frame per second material shot with a 1/48th shutter."


As I say there, the result isn't mathematically identical to footage that's actually shot 30p at 1/30th, but it looks rather convincing, and should help alleviate the stuttery nature of my prior approach, if you so desire. If you like the sound of that, take a look at the SimpleSlug page, or follow along with the associated tutorial if you're not comfortable with Avisynth usage just yet.
Robert Martens is offline   Reply With Quote
Old July 24th, 2010, 12:00 AM   #20
Regular Crew
 
Join Date: Apr 2004
Location: Sun Valley, Idaho
Posts: 81
You sir, are my hero.

Could the process be done on a win7 64bit machine?
Charlie Webster is offline   Reply With Quote
Old July 24th, 2010, 08:07 AM   #21
Major Player
 
Join Date: Jun 2003
Location: Miller Place, NY
Posts: 820
I have no 64 bit OS with which to test any of this, but I've had reports from users that it works. I think--but don't quote me on this--you'd use the Program Files (x86) directory for installing AviSynth and the various 32 bit versions of the plugins. If you're following the tutorial on my site, the step where you replace avisynth.dll, in your WINDOWS\system32 folder, might instead require you to go to Windows\SysWOW64. I really don't know that for sure, though, so please be careful.

That's all there is to it, as far as I know, unless you're the type comfortable experimenting, in which case you might want to take a look at a 64 bit version of AviSynth 2.5.8 MT. No warranties from me, of course, I've got no way to toy with that. I'd stick with the 32 bit for the time being, at least to get up and running.

On another note, I didn't want to bother people with more updates to this thread, but since I'm responding I'll note that SimpleSlugUpscale has been significantly improved over the past four months, and can now turn any size and shape input into any size and shape output. It's still "simple", if you're just interested in the basic functionality, and it's still a "slug", if you use my default deinterlacing plugin, but strictly speaking it's no longer just for upscaling. Nor does it require you to know all the details of the output you desire.

The basics are introduced in the documentation (included in the script itself), but to demonstrate, I've uploaded a few sample images. For starters, let's say you wanted output that was 640 pixels wide, and had a display aspect ratio of 2.35, but you're not sure what vertical dimension is required for that. You'd just use

Quote:
SimpleSlugUpscale(outwidth=640,DARout=2.35)
and your output would be the final attachment, "outwidth640DARout235.jpg". The overlaid text is just for the purpose of demonstration, and isn't applied by my script.

Update: I only just noticed a tiny mistake in my script that renders the following italicized passage incorrect! 272 is a multiple of 16, and will now be the resultant dimension for the arguments given; at a couple of points in the script I used a Ceil(), which always rounds up, instead of a Round(). It helped certain cases, but it's not ideal for most, so it's gone. The script has silently been replaced with a corrected version, but I thought I should leave this here for reference. You'll note the vertical is 288, instead of the expected 272, and that's because by default, all output dimensions are mod 16, for most efficient compression (most video codecs, as I understand it, still use 16 pixel macroblocks). I thought that would be more important to people than perfect aspect ratio, but if you want more accuracy, you can change the 'modw' and 'modh' parameters as you see fit. Keep in mind that the minimums for progressive YV12 color are 4 and 2, respectively. If you want single pixel accuracy, you'll need to set both modw and modh to 1, then feed SimpleSlug RGB input.

The rest of the attachments demonstrate the various effects one can achieve by way of my automatic letter/pillarboxing, and are subtitled with both a description of the input and the arguments passed into the function to get each result.
Attached Thumbnails
How to upscale from SD to HD?-720pboxbg.jpg   How to upscale from SD to HD?-480sqbox.jpg  

How to upscale from SD to HD?-dvfullppalbox.jpg   How to upscale from SD to HD?-dvwidepntscbox.jpg  

How to upscale from SD to HD?-360sqboxbg.jpg   How to upscale from SD to HD?-357x623box.jpg  

How to upscale from SD to HD?-outwidth640darout235.jpg  

Last edited by Robert Martens; July 24th, 2010 at 07:32 PM.
Robert Martens is offline   Reply With Quote
Old July 24th, 2010, 01:55 PM   #22
Regular Crew
 
Join Date: Apr 2004
Location: Sun Valley, Idaho
Posts: 81
Ty for another awesome reply, sir

I'd better copy this thread in case it ever disappears!
Charlie Webster is offline   Reply With Quote
Old July 24th, 2010, 04:57 PM   #23
Inner Circle
 
Join Date: Aug 2005
Location: Atlanta/USA
Posts: 2,515
Robert, tell me something please

Why in the world is it not possible for some bright mind to combine all this stuff into one stand-alone program? I've been reading about the wonders of Avi Synth for ages, but the complexity of it frightens me; besides, I hate to install 25 pieces of individual software and make a big mess out of my computer...

Is it really not possible?

Thanks,
__________________
Ervin Farkas
www.AtlantaLegalVideo.com
Ervin Farkas is offline   Reply With Quote
Old July 24th, 2010, 06:28 PM   #24
Major Player
 
Join Date: Jun 2003
Location: Miller Place, NY
Posts: 820
It's called StaxRip, actually. There are many, many others, but StaxRip comes bundled with an enormous variety of utility applications, including AviSynth and a number of plugins (and, though slightly off topic, x264, the hands-down, no-contest best H.264 encoder you'll find anywhere). All packed into a directory structure, no registry changes, just extract the whole .7z archive into a folder and run Staxrip.exe.

Regarding the overall fear of AviSynth, I don't mean to sound condescending, but "suck it up and get over it" is the advice I would give myself from five years ago. I'd also give myself a new pair of glasses and a haircut, but that's beside the point.

Believe me, I had the same reaction as you to AviSynth for the longest time, but it's really nothing to be worried about. All the pieces of this puzzle take a lot more effort to describe than they do to use, and although AviSynth is powerful enough to let people write scripts as complex as SimpleSlug (many even more so), you can get results with an .avs file as barebones as:

Quote:
AVISource("C:\Video\amusingfilename.avi")
AssumeBFF()
SeparateFields()
BilinearResize(1440,540)
Weave()
Just a bunch of human readable words in a text file. Here, we load a clip, assume bottom field first field order, separate the fields, resize them, then weave them back together. It's a contrived, trivial example (and will look awful from DV source, for example, since it uses only the most rudimentary scaling technique), but I think it demonstrates the point. You can make things as complex as you need to, or you can stick to the basics; the abundance of user-made scripts and plugins makes it that much easier.

As far as making a mess of a system, AviSynth plugins are just DLLs you drop into a folder. AviSynth itself does add some registry entries upon installation, like any other software, but it uninstalls itself cleanly, and should cause no problems. Take your time, read all the instructions carefully, and you'll be fine. Try it on a home computer first if you're worried there's some risk to a production machine.

In general, I can only beg people to please make their best effort to conquer their trepidation surrounding open source software like this. I skipped over all this stuff for years thanks to the same concerns ("oh, those adorable kids and their computers; they're not real experts, like us video guys" -- I was an arrogant pain in the backside), and when I finally got around to giving it an honest shot I was red faced. We're doing ourselves and our projects a tremendous disservice by ignoring AviSynth and its contemporaries; NLEs are great at editing, compositing packages are great at pulling keys, painting mattes, wire removal and object tracking, but for preprocessing (deinterlacing, scaling, denoising, etc.) there are what should not be surprisingly powerful solutions available as plugins and scripts for AviSynth, many of which do as good or better a job than the most expensive plugins you could find for Premiere, After Effects, or any other big name suite.

I'll go put my soapbox away now, but do yourself a favor and block out an hour or two next weekend, download AviSynth and start reading the manual. You'll be over the anxiety in no time.
Robert Martens is offline   Reply
Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

B&H Photo Video
(866) 521-7381
New York, NY USA

Scan Computers Int. Ltd.
+44 0871-472-4747
Bolton, Lancashire UK


DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > Windows / PC Post Production Solutions > Non-Linear Editing on the PC


 



All times are GMT -6. The time now is 10:42 AM.


DV Info Net -- Real Names, Real People, Real Info!
1998-2024 The Digital Video Information Network