Interlaced HD to DVD AGAIN - some test renders

Comments

craftech wrote on 7/5/2011, 6:22 AM
It does seem a good idea not to render 704x480 without pillarboxing, as that is what was causing Laurence trouble in WMP. If you have time and clear head the Prem Pro lot discussed this.
==========================
I read that. The recent post by Marcus sums it up, but you are right. It would be risky not to allow the extra margin by sticking with 720 instead of 704. DVD players have different output settings. I can easily see a customer complaining about the image not fitting properly due to a DVD output setting they keep for movie viewing wreaking havoc with a 704 DVD.
============================
Regarding Henry's script:
So the solution is to restore that 2nd "AssumeTFF()" before "SeparateFields()", and then all is OK.

Thus Henry's script should be as follows:


#Frameserve in RGB24 format (or RGB32 if AviSynth will not accept RGB24)

AviSource("d:\fs.avi")
AssumeTFF()
ConvertToYUY2(interlaced=true, matrix="PC.601")
bob(0.3782,0.3109)
spline36resize(720,480)
#If one wants to add sharpening then un-comment the following.
#blur(0.0,1.0)
#sharpen(0.0,0.75) #Adjust 2nd value between 0.5 and 1.0 to taste
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()


If one wants a multi-threaded version it would be as follows:


#Frameserve in RGB24 format (or RGB32 if AviSynth will not accept RGB24)
SetMTMode(5, 4) #change 4 to number of cores or use 0
AviSource("d:\fs.avi")
AssumeTFF()
SetMTMode(2)
ConvertToYUY2(interlaced=true, matrix="PC.601")
bob(0.3782,0.3109)
spline36resize(720,480)
#If one wants to add sharpening then un-comment the following.
#blur(0.0,1.0)
#sharpen(0.0,0.75) #Adjust 2nd value between 0.5 and 1.0 to taste
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()
Distributor() #If you want to distribute the core utilization evenly among the multiple cores


I'll have to mess with this and upload a new DVD.

John
NickHope wrote on 7/5/2011, 8:10 AM
Yes that looks correct, except I'm wondering about your comment "If one wants to add sharpening...". As I understand it, the blur and sharpen act as a pair to do the low pass filtering necessary to deal with line twitter etc., without necessarily increasing sharpness overall. But of course they can increase sharpness overall depending on the sharpness value used. I think the safe course of action for general use is to use them.

Today I did some tests to compare these 4 types of bob:

Bob()
Bob(0.3782,0.3109)
TDeint(mode=1)
QTGMC("very fast",sharpness=0)

Honestly, once the output has been through the rest of the script, I was finding it really hard to see a significant difference between any of them. The large downscaling factor just evens them all out. The conclusion for me personally, as speed is absolutely not a concern for me for this script, is to stick with TDeint(mode=1).

Also Henry's comment about resizing all in one line instead of doing width-resize => bob => height-resize interested me, as I had previously understood from this post) that it wouldn't make any difference. I tested it and did comparisons on the timeline and it did seem to make a difference, but very slight. I noticed the difference more in final interlaced footage than in putting the 720x480 bobbed footage on a 59.94p timeline. Anyway I think I'll stick with doing before/after as we have been doing. Sorry to chuck in yet another variable!
craftech wrote on 7/5/2011, 10:43 AM
It will be interesting to see what Henry's response is.

You revived a thread from May.

John
FrigidNDEditing wrote on 7/5/2011, 11:36 AM
post 100.... sorry, I just saw 99 and wanted to be # 100.

Carry on :)

Dave
FrigidNDEditing wrote on 7/5/2011, 11:36 AM
post 100.... sorry, I just saw 99 and wanted to be # 100.

Carry on :)

Dave
PeterDuke wrote on 7/5/2011, 6:02 PM
Sorry, but you are reply 100 and 101, so counting the original post you are post 101 and 102.
craftech wrote on 7/6/2011, 6:24 PM
I have uploaded a new DVD to download.

You can download it here.

First Test is Nick's again:


#Frameserved in RGB24 format

AviSource("d:\fs.avi")
AssumeTFF()
ConvertToYUY2(interlaced=true, matrix="PC.601")
Spline36Resize(720,height)
TDeint(mode=1)
Spline36Resize(width,480)
blur(0.0,1.0)
sharpen(0.0,0.75) #Adjust 2nd value between 0.5 and 1.0 to taste
separatefields()
SelectEvery(4,0,3)
Weave()


The second and third are the corrected script by Henry, but modified to 720 x 480 instead of 704 x 480.

The second has no additional sharpening added during the m2p render. The third has a light sharpening filter added to the m2p output in Procoder.


#Frameserve in RGB24 format (or RGB32 if AviSynth will not accept RGB24)

AviSource("d:\fs.avi")
AssumeTFF()
ConvertToYUY2(interlaced=true, matrix="PC.601")
bob(0.3782,0.3109)
spline36resize(720,480)
blur(0.0,1.0)
sharpen(0.0,0.75) #Adjust 2nd value between 0.5 and 1.0 to taste
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()


The fourth is the Lanczos 4 Gradual Resize script. Unlike the other three, it requires a YUY2 source. Unlike the other three, it is multi-threaded. To make it single threaded, remove lines 1 and 5 and the last.


#Frameserve in YUY2 format

SetMTMode(5, 4)
AviSource("e:\fs.avi")
ColorYUV(levels="TV->PC")
AssumeTFF
SetMTMode(2)
TDeint(mode=1)
Lanczos4Resize(1440,960)
Lanczos4Resize(720,960,-.8,.6)
Lanczos4Resize(720,480,-.8,.6)
blur(0.0,1.0)
sharpen(0.0,0.75)
assumetff()
separatefields()
SelectEvery(4,0,3)
Weave()
Distributor()


Please download, burn to DVD, and play them on LCD and CRT and post back your impressions.

John

NOTE: The clips are short. If you are unable to compare because of the clip length, I'll do them over with longer clips.
NickHope wrote on 7/7/2011, 1:14 AM
Thanks for uploading that John. I'm struggling to see any difference between them. They are all pretty good.

Bob uses bicubic resizing. If you look at the picture in this post, you can see that the Robidioux numbers give a very similar result to the Mitchell-Netravali numbers, which are the default. Way out of my depth here, but I think it's safe to say that those Robidoux numbers are bringing nothing hugely different in the result.

Personally, I'm sticking with TDeint(mode=1) and with doing the horizontal resize before and vertical resize after. I'm leaving the original blur-sharpen-blur-sharpen routine in my script, but commented out for general use, and held in reserve for use on "problem footage". Also doing all my sharpening in my script, which I prefer from a "less is more" viewpoint, and since CCE can't add any anyway.
craftech wrote on 7/7/2011, 3:04 AM
I'm struggling to see any difference between them. They are all pretty good.
=================
I may re-do them with longer clips. I don't see much difference either. I also frameserved an mxf intermediate for those clips. Maybe that wasn't the best idea either.
====================
I'm leaving the original blur-sharpen-blur-sharpen routine in my script, but commented out for general use, and held in reserve for use on "problem footage".
===================
blur-sharpen-blur-sharpen? I only see one instance of it in your most recent script. Unless you are referring to "Method 3" in the original tests.
===================
I found this page via that thread you provided.

It says that Ringing is proportional to negative weight. Lanczos4 will cause a lot of ringing.

In my fourth clip I don't notice "ringing". I did two dance recitals with that script and didn't notice it either. I wasn't sure what "ringing" was, but I found this example. I guess they are talking about halos around people or objects. I was having that problem with footage from my EX1 that I thought came from doing something wrong in post. It turned out to be a registration problem in the camera. Sony in Teaneck, NJ fixed it.

Do I have the wrong understanding of "ringing"? Did you notice any in Clip 4?

John
farss wrote on 7/7/2011, 4:19 AM
"It turned out to be a registration problem in the camera."

Ouch. Glad you got that sorted out. I could never really figure out why your footage didn't look as good as mine but without a known reference scene it's impossible to nail these things down.

On a related note I may have had a major win today. I've been searching for a decent resolution chart that wasn't going to cost me the better part of $1K. Just by chance I asked the Sony tech who works in our building and blow me down. He's got a set of the best money can buy. These are made on large photographic glass plates and mount into a light box.
I've only had a quick look at them, a bit nervous holding such large glass plates. The edges of the lines are razor sharp, way better than anything I've seen printed onto paper. There's also a set of color bars, interesting as I would have thought these would have a use by date but none that I can see.

Anyway next week or so I'll take my camera upstairs and finally shoot some charts. Anything you guys think would be helpful for your tests let me know and see what I can do. I can record from the HD-SDI output of the EX1 to either 8 bit 4:2:2 MXF with a NanoFlash or 4:4:4 ProRes with a KiPro.

Bob.





NickHope wrote on 7/7/2011, 5:23 AM
@craftech - Yes, my general purpose script just has one instance of blur-sharpen. I just meant that I'd keep Didee's original blur-sharpen-blur-sharpen sequence in reserve, as shown in my latest single-threaded commented script:

# Frameserve in RGB24 format (or RGB32 if AviSynth will not accept RGB24)

AviSource("d:\fs.avi")
AssumeTFF()
ConvertToYUY2(interlaced=true, matrix="PC.601")

Spline36Resize(720,height) # No pillarboxing but subjects look slightly wider than original
#Spline36Resize(704,height).addborders(8,0,8,0) # Correct aspect ratio for NTSC DVD but gives pillarboxing

TDeint(mode=1) # Smart bob
#QTGMC("very fast",sharpness=0) # Slower alternative to TDeint (not necessarily better)
#Bob(0.3782,0.3109) # Faster alternative to TDeint. See http://forum.doom9.org/showthread.php?p=1500415#post1500415

Spline36Resize(width,480)

blur(0.0,1.0) # Low-pass filtering to deal with line twitter, moire etc.
sharpen(0.0,0.75) # Adjust 2nd value between 0.5 and 1.0 to taste

# Following 4 lines are alternative to previous 2 lines. They do more low-pass filtering for problem footage
#blur(0.0,1.0)
#sharpen(0,.51)
#blur(0.0,1.0)
#sharpen(0.0,0.85)

AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()

# In CCE check "Output top field first stream" and set "Offset line" to 0.


John, I didn't notice any excessive ringing, but I expect gradual multi-stage Lanczos4 behaves differently in that respect from single-stage Lanczos4. After reading about resizers a few months ago, in my mind I have Lanczos4 stored up for upscaling (potentially) and nothing else. To be honest without further research I'm right on the edge of my knowledge with this stuff. That link you sent really helps. Interesting how close the graphs for Lanczos3, Spline36 and Blackman4 are. Now I'm wondering if they're all too sharp for what we're doing and perhaps a less sharp bicubic resize would be preferable in the vertical plane. Errrr...

Bob, some test footage of that res chart would be welcome, in either of those formats. Interlaced interests me more but progressive as well, since 1080p=>DVD is likely to rear its head at some point. Can't promise I'll personally do anything with it for a while though, as I need to drop this tekky stuff soon for a while for travels and the sake of my sanity :)
craftech wrote on 7/7/2011, 5:56 AM
"It turned out to be a registration problem in the camera."
=================================
Ouch. Glad you got that sorted out. I could never really figure out why your footage didn't look as good as mine but without a known reference scene it's impossible to nail these things down.
=================================
I had planned to e-mail you to tell you that. I am eternally indebted to you for trying to help me figure out what to do about it in post. I really didn't think it was a problem with the camera, but sure enough Sony, Teaneck spotted it right away.
Thanks again for all the help Bob.
=================================

In terms of the res chart from the EX1, I would think that outputting 8 bit 4:2:2 MXF might be the most helpful.

Thanks again Bob,

John
craftech wrote on 7/7/2011, 6:01 AM
John, I didn't notice any excessive ringing, but I expect gradual multi-stage Lanczos4 behaves differently in that respect from single-stage Lanczos4. ..............................Now I'm wondering if they're all too sharp for what we're doing and perhaps a less sharp bicubic resize would be preferable in the vertical plane.
==============================
I don't think they are too sharp, but that HTML 5 comparison that I linked is pretty cool.

I still think I will do that last test over again with longer and perhaps different footage. There have to be differences in the outcome of those four different scripts than what are showing up in the clips I processed. I'll post back when I do it with a link to a 3rd DVD download.

John
craftech wrote on 7/7/2011, 9:46 AM
I re-did the DVD with a few changes. You can download and burn it here for testing:

Craftech Test Set 3. 76.17MB

Instead of rendering an mxf intermediate file first, this time I frameserved from the timeline (color and levels correction - no sharpen) directly to the encoder (Procoder 3). 8302 CBR. Seemed more like what most people are doing anyway.

Instead of Interpolate, I set the project properties to Blend this time. It seems to me that more people choose that option because it is the default.

The clips are 19.08 seconds long this time. Hopefully that will allow more time to look at each clip.
The render times for clips 1 - 4 are on the DVD menu. They are (consecutively):

Nick's Simplified Script: 3 min 12 sec.
Henry's Modified Script (without post sharpening): 3 min 6 sec.
Henry's Modified Script (with post sharpening): 3 min 10 sec.
Lanczos 4 Gradual Resize Script (multi-threaded): 4 minutes 31 sec.

Hopefully, this time someone can see a significant difference between them.

John



bsuratt wrote on 7/7/2011, 7:33 PM
Gentlemen... Thank You!

After spending the last two years experimenting and trying to find a solution to downscaling HDV to SD for DVD you have found the best method yet. I had settled on frameserving to VirtualDub and ended up with an OK quality as progressive. But I just tried Nick's last script and the output was extremely good. I tried frameserving directly from the Vegas10e timeline thru CCE 2.7 to a mpv as well as to an avi then back thru Vegas to a mpg. Both thru DVDa and I really could not see any significant difference. But the overall output either way looked like a commercially produced SD DVD.

Thank You so much.
musicvid10 wrote on 7/7/2011, 8:46 PM
Being a total latecomer to this discussion, and too lazy to read the whole thread, why is the output being rendered as interlaced?

With the wonderful deinterlace / resize methods at your disposal, it seems a pity to re-interlace it after the fact. Wouldn't progressive DVD be better from your deinterlaced source, or is this just so it will play on every possible player?

[EDIT] Maybe I just answered my own question. You are smart-bobbing to 60p, then using those frames after downsizing to recreate new fields for 60i (29.97) output, is that right? At least that makes sense.
craftech wrote on 7/8/2011, 4:57 AM
Wouldn't progressive DVD be better from your deinterlaced source, or is this just so it will play on every possible player?
====================================
musicvid,

We are working with source material shot as interlaced. There are lots of reasons to do this rather than shooting progressive. In my case I shoot in dark areas (stage productions) and interlaced has much better light gathering ability than progressive, but I don't think that is your question.

Many of the problems we are trying to address here have to do with downconverted HD source material and how it displays on a CRT TV. Our customers have both HDTV and analog CRT TV these days and many still have only CRT. Some also have older DVD players. We feel that the safest route is that if you have interlaced source material, keep it this way and vice versa.

Some of these scripts produce video that looks good on progressive displays (HDTVs and computer screens), but awful on CRT televisions.

A progressive DVD player (and most newer ones are), the player will deinterlace the video before sending it to the TV and the TV will display it as progressive, but only if you use an HDMI or Component interface.

A non- progressive DVD player will require that the TV deinterlace the video. The same is true if the DVD player and the TV have a composite or S-Video interface. The TV has to deinterlace the video.

Most CRTs won't do that. HDTVs will.

In terms of the scripts themselves, deinterlacing done at full resolution before downsizing seems to achieve the best results. In Nick's simplified script he is using Tdeint as a deinterlacer which seems to be working well because it is motion adaptive and bi-directional helping reduce "jaggies" in moving areas where interpolation must be used.

We were asking people to download and burn the test DVDs and test them on both HDTVs and CRT TVs and post back their impressions.

Would you mind doing that and posting back your impressions if you have a chance?

John
craftech wrote on 7/8/2011, 5:02 AM
But I just tried Nick's last script and the output was extremely good.
=====================
bsuratt,

How does it look on CRT and did you burn the latest DVD to compare?

John
Kimberly wrote on 7/8/2011, 9:28 AM
We were asking people to download and burn the test DVDs and test them on both HDTVs and CRT TVs and post back their impressions.

99% of this discussion is beyond my comprehension, but it is a great education.

I downloaded the Craftech Test Set 3 files and burned them to a DVD-RW. I have a new Sony BD player hooked up to an 11 year old 30 inch Panasonic CRT. Viewing distance from the tele was about 6 feet.

To my untrained eye, each of the files looked great. I wish I could say I could see the differences, but it's not easy. The "Henry HO with Post Sharpen" was my least favorite -- perhaps because it looked a little too sparkly?

On a humorous note, my husband said that No. 3 was the best, but turns out he meant the 3rd ballerina!
craftech wrote on 7/8/2011, 12:34 PM
Thanks for the feedback Kim. Very much appreciated.

If you have the BD player connected via HDMI or Component it is probably being upconverted.

If in the end there is very little noticeable difference regardless of interface, player, or display then the simplest and fastest rendering script of the four would probably be the most sensible to use.

Thanks again,

John
Kimberly wrote on 7/8/2011, 12:53 PM
The BD player is connected to the TV by RCA (no HDMI because it is so old). I'm planning to get an HDTV when the Panasonic dies. I got the BD player with WiFi so I could watch Internet TV and cancel cable.

If you reach concensus on the best practices approach, can someone summarize it? Users at my level need a "Monkey See, Monkey Do" approach. I know nothing about scripts but I've been meaning to learn.
craftech wrote on 7/8/2011, 1:11 PM
The BD player is connected to the TV by RCA (no HDMI because it is so old). I'm planning to get an HDTV when the Panasonic dies. I got the BD player with WiFi so I could watch Internet TV and cancel cable.
============
Sorry, I should have realized that. Component - maybe, but HDMI - never.

If you aren't noticing differences on a CRT with composite and you say that they look good, that's a good sign regarding these scripts.

=======================
If you reach concensus on the best practices approach, can someone summarize it? Users at my level need a "Monkey See, Monkey Do" approach. I know nothing about scripts but I've been meaning to learn.

Do you use the frameserver in Vegas?

John

Kimberly wrote on 7/8/2011, 1:53 PM
I don't know what the frameserver is.

I have Vegas 10d. Virtually all of my footage is HDV. I'm currently delivering that on DVD so I render for authoring in DVD-A.

Now that I have BD player, I've started practicing with BD format material on DVD-RW disks. The disks play fine on my new BD player; not sure about other players.
craftech wrote on 7/8/2011, 5:01 PM
You can probably use Nick's simplified script by installing the single threaded version of AViSynth.

Copy the script to a text editor such as notebook and remove the # from the lines you want to include. Leave them in for the lines you want ignored. Change the location (drive letter) of the fs.avi line to the place where you want the script to find it on your computer. You will render a small avi file (fs.avi) from the Debugmode frameserver in Vegas to that location.

Save the script as fs.avs in the same directory where the fs.avi file will be.

From the edited timeline in Vegas:

1. Render As
2. File Name: fs.avi Save In: (Choose the same directory (drive) as where the fs.avs file (script) is. If the script says AviSource("e:\fs.avi") then both the fs.avs and fs.avi files should be in drive "e". You should have decided this when you first saved the fs.avs file.
3. Save As Type: DebugMode FrameServer (*.avi)
4. Template (default).
5. When you click Save the FrameServer (setup) window will pop up. There you will choose the Video Output Format. Choose whatever the script calls for. Nick's calls for RGB 24. Make sure the Write audio as PCM samples in signpost AVI is checked. Then click Next.
6. When the signpost file (fs.avi) is written click the minimize button (-) and the entire Vegas window will minimize.
7. Open your encoder program and choose fs.avs as the source. If it recognizes something wrong like Upper Field first vs Lower Field first or 4:3 instead of 16:9 change it.
8. Choose your Mpeg 2 target and modify it as you want to encode it (bitrate, etc).
9. Then encode it to m2p or whatever you chose. The frameserver will feed the video from the Vegas timeline to the Mpeg to encoder via the AviSynth Script.

If you have any questions feel free to ask.

John