Log in

View Full Version : HDTV 1080i downres


nikolai
11th September 2008, 01:52
Using firewire I captured an HDTV 1080i transport stream and want to convert it to an NTSC anamorphic DVD. After many false starts and a lot of reading, I stumbled on this thread (http://forum.doom9.org/showthread.php?p=701006) from 3 years where scharfis_brain (:thanks:) suggested this script:
mpeg2source("hd.d2v")
crop(0,0,0,-8)
TFM("hd.d2v")
TDecimate()
converttoyuy2()
lanczosresize(704,480)
to convert to 23.976 fps progressive. In an amazing coincidence, the show in question in that thread is the same one I am trying to convert. Too weird. Anyway, I tweaked scharfis_brain's script to this:
LoadPlugin("E:\Video\DGIndex\DGDecode.dll")
MPEG2Source("G:\sclip\v01.d2v")
AssumeTFF()
Crop(0,0,0,-8)
TFM(d2v="G:\sclip\v01.d2v")
TDecimate()
LanczosResize(704,480)
I encode with this script and HCEnc, run DGPulldown on the result and let DVDLabPro re-mux the video with the AC3 audio. The end-result DVD looks really good. As with the previous seasons of this show I'll eventually buy the DVD box set of season 4 whenever it's finally released, so I'm not necessarily looking for perfection, just a way to tide me over until then.

I have a couple of questions about the scripts. Am I correct that the ConvertToYUY2() is no longer necessary? During my experiments I didn't use this before LanczosResize() and not using it in my script here doesn't seem to cause any problems. If I read correctly, the reason would be that LanczosResize() was updated since 2005 to support non-YUY2 colorspaces.

My other questions is about LanczosResize(704,480). Originally I was using those values based on something I had read a long time ago. But in the last 2 weeks I only saw samples that used 720x480. When I found scharfis_brain's script I got confused again. I'm pretty sure it has to do with overscan but I'm not certain. 720 would preserve more detail coming down from 1080, but if it's lost in the overscan there's probably not a lot of benefit to it. Which should I use, or why might I choose one over the other?

Many thanks for any advice and a big Thank You to scharfis_brain. I was stuck on older filters for the IVTC steps.

Nightshiver
11th September 2008, 03:13
704x480 >>> encode anamorphic for 16x9 (widescreen)

Sagekilla
11th September 2008, 04:22
720x480 is slightly sharper (if only slightly more) than 704x480, and is what I would use if I encoded as anamorphic x264 (with 32:27 flags) for use on my desktop. Unfortunately SD standards are screwy and it's recommended you use 704x480 with 8/8 padding on left/right when you're authoring to DVD for a DVD player. Why? I personally don't know, but it seems to be the overwhelming recommendation for resizing to DVD in hardware players.

Good luck.

scharfis_brain
11th September 2008, 07:43
@Sagekilla: 720 ist NOT sharper than 704.
But it is wider than 704. Thus resizing 1920x1080 to 720x480 yields into a slightly off Aspect Ratio, while 704x480 preserves it nearly perfectly.

@nikolai:
remove crop(0,0,0,-8) cause it is not needed anymore (DGDecode does this internally right now).
If you are not sure whether to remove it or not, try to replace crop(...) with this line:
(height==1088) ? crop(0,0,0,-8) : last

nikolai
11th September 2008, 08:55
In my original post up top I said "720 would preserve more detail coming down from 1080" when I meant to say "720 would preserve more detail coming down from 1920". Now I understand it is for maintaining the aspect ratio, but I wanted to correct that typo. I've been using 704x480 and now I know why, which is always a good thing.

I will remove the crop() statement from my script.

Thank you scharfis_brain, your posts and knowledge are excellent. I can't thank you enough.

pandy
11th September 2008, 10:17
@Sagekilla: 720 ist NOT sharper than 704.
But it is wider than 704. Thus resizing 1920x1080 to 720x480 yields into a slightly off Aspect Ratio, while 704x480 preserves it nearly perfectly.

In fact it is sharpen due of lack of rescaling - most modern hardware fullfill 601/656 recomendations and create "digital line" (they produce 720 pix long visible line). If we put 704 pix in line some video hardware rescale 704 to the 720 not display "analog line"

2Bdecided
11th September 2008, 11:11
In fact it is sharpen due of lack of rescaling - most modern hardware fullfill 601/656 recomendations and create "digital line" (they produce 720 pix long visible line). If we put 704 pix in line some video hardware rescale 704 to the 720 not display "analog line"What hardware? The video output chips I have treat 704 as the middle of 720. It wouldn't dream of resampling.

Unfortunately SD standards are screwy and it's recommended you use 704x480 with 8/8 padding on left/right when you're authoring to DVD for a DVD player.No need to pad. 704 is fine.

Many broadcasters and camcorders resample straight to 720, making the aspect ratio slightly incorrect. The sky doesn't seem to have fallen in because of this.

Cheers,
David.

pandy
12th September 2008, 08:59
What hardware? The video output chips I have treat 704 as the middle of 720. It wouldn't dream of resampling.

Not hardware itself, rather hardware programmer - i know some people which prefer program digital encoder always in 720 pix (digital) and reprogram scaler instead switching encoder between analog (ie 702 - 710) and digital (720) mode.

Sagekilla
13th September 2008, 21:35
(Disclaimer: I'm speaking of purely digital playback on a laptop, desktop, etc. on the following discourse Not on a dvd player)

@scharfis: I don't understand how 704x480 is a more accurate representation of 16:9 vs 720x480. 720x480 is 3:2, and 704:480 is 22:15 for the frame AR (not the actual source AR.) 720x480 can be perfectly resized to 16:9 by applying 32:27 signaling, I'm not completely sure what signaling you'd have to do to get 704x480 to 16:9 but the concept is the same -- Both can be made to 16:9, and both work just fine. On that note, how is 704 less sharp than 720? If you're doing straight up resizing 1920 -> 720 is sharper than 1920 -> 704 -> 720 if only EXTREMELY slightly in the horizontal dimension.

Please explain to me how 704x480 would be sharper than 720x480 on a DVD player, I never understood why there was such a mind boggling system used.

Apologies if I'm going off topic here.

Comatose
13th September 2008, 21:55
I think the sharper thing was exactly what you said - downsize to a slightly higher horizontal resolution from HDTV

scharfis_brain
13th September 2008, 22:52
I never said that one of both is sharper than the other.
But following ITU standards, the active image area for NTSC is 711x486 pixels respective 702x480 pixels to ompletely fill a 4x3 or anamorphic 16x9 screen.
but if you fill the whole 720x480 pixels space with an image, you'll get a horizontally widened image on your TV set.
the stretching factor will be 720/704 = 2.27%