View Full Version : Encoding & resolution changes explanation
gumballguy
4th October 2005, 07:38
Hi
I have begun encoding HDTV and I was hoping someone could help explain the resolution changes to me.
Is interlaced video always every second line? So the max height of a 1080i stream, when the interlacing is removed and the video converted to divx/xvid, is 540p? So would I be better off ripping a 576p stream and encoding that? The output of the 576p streams definately looks worse.
Also, it seems odd to me that you dont seem to be able to capture all the info in the file. The streams themselves are 16:9, but when processing using GK, you can get 100% height but not 100% width...
In case that wasnt clear;
If 1080i is 1920*1080 which is 16:9,
Why, in GK if i select 16:9 source can i not produce something of 100% width and height when moving the resolution slider? I have to select 1:1 input, and then the resulting movie looks strange.
Please keep the explanations simple.
CWR03
4th October 2005, 07:57
1080 is not divisible by 16. You can, if you so desire, set the height modulation to 8, then it should allow exact 100% in both cases. I wouldn't recommend this if you're not using XviD. For future reference it's still using all the info of the file, it's just not sizing to exactly 16:9.
gumballguy
4th October 2005, 08:19
I fiddled with the modulus and had no luck previously. I set the height modulus to 8 as you suggested and tried again, this does not appear to work.
This screenshow may offer some insight: http://www.arach.net.au/~watto/res.gif
Note the screenshot doesnt show H-mod at 8, but I did try that.
Why xvid as opposed to divx? I found divx clearer at extremely high bitrates (3000kbps), is it purely a speed issue?
CWR03
4th October 2005, 09:05
You're increasing your cropped source (1886 pixels wide) to 1920. Of course you're surpassing 100%. There's no need to exceed the cropped source, but it usually won't harm anything.
Using DivX while resizing other than multiples of 16 will create some ugly artifacts, usually horizontal lines that would look like creased Saran wrap stretched across the display. It doesn't seem to be an issue with XviD.
stephanV
4th October 2005, 09:09
Your PAR is 1:1, not 16:9 PAL or whatever... the aspect ratio of a pixel is not the same as the aspect ratio of the (displayed) frame.
gumballguy
5th October 2005, 09:13
In the 1080i broadcast example, 16:9 is the pixel aspect ratio (1920*1080)... but the displayed aspect ratio ("DAR") is something else, but also happens to be 16:9?
If i start off with PAR and DAR at 16:9 from a hdtv source, why does processing with GK output a file with a DAR of 16:9 but a PAR that is not 16:9? This is what does not make sense to me.
CWR03
5th October 2005, 09:50
Try the PAL non-anamorphic button, or manually enter an aspect ratio under Input Ratio/other to correct it. Gordian Knot counts on a tag to tell it what the intended output would normally be, and your capture may just be missing that tag.
manono
5th October 2005, 10:55
stephanV's right (as usual). It's 1:1. Tick that in the GKnot Resolution Tab, under Input Pixal Aspect Ratio. In this case, 16:9 isn't PAR or DAR. It's plain old 1.78:1. If you plan on resizing for 16:9 DVD, then that's something else, but for AVI, people usually encode 1:1. I don't capture, so I don't know what the frames look like, but if it's a movie, you'll probably want to IVTC, or at least decimate, in order to get rid of the duplicate frames.
CWR03
5th October 2005, 12:39
Some of gumballguy's problem is that he's cropping quite a bit, which ends up with a cropped source of about 1.82. In that case, you'll still need to adjust manually. I've had a problematic DVD where I had to select "other" under Input Resolution, and if I remember correctly I had to set the height to 540 (with a 720 x 480 source) to get a proper output.
If my math is correct, in order for 1:1 to work you'll need to set your input resolution "other" setting horizontal at 1120 for your cropped output to retain correct 16:9.
gumballguy
6th October 2005, 07:32
Thankyou for the help.
If i understand, then this is correct....
Capturing a 1080i source via a HDTV card
setting PAR 1:1
cropping to remove the black edges
Using 'cropped height' from GK, croppedheight/9*16 gives the inputresolution-other-width
And the output will be something that is native 16:9.
This should then look appropriate on a standalone mpeg4 dvd player, yes? The entire point of the exercise is to take movies from hdtv and turn them into my own dvds. I am yet to acquire an mpeg4 player (dont want to pay for it until i get this sorted out properly, or I might waste my money).
CWR03
6th October 2005, 07:50
You may want to hang onto the source file, or do several encodes in varying bitrate - some players have a limit on what they can play. You'd be kicking yourself if you convert to 1920 x 1088 and can't play it on a standalone.
gumballguy
6th October 2005, 13:57
I saw that the max divx (average) bitrate is 4000kbps (for divx dvd player compatibility).
I had considered altering the filesize to keep this true when encoding... but while its plenty for a 576/720p stream, If I actually want to encode a 1080i stream at 100% size, It seems thats not a high enough bitrate (I am particularly ending up with poorly defined black areas... instead of being a clean jet black colour, theyre blocky).
Perhaps there is a better way of controlling that than simply increasing the bitrate blindly?
To give an indication, I was encoding a 90min vid from a 1080i stream, final resolution 90% of original size, to a 2240mb (1/2 a dvdr) size. Bitrate ~3000kbps. This produced blocks, so I'm trying to encode to 4480mb to fill a dvdr. Seems like overkill, but not sure yet, as I'm 30% through the first pass. Ive forgotten what the compressibility test said, but i think it told me the quality would be 79% at only 2240mb, so I wasnt expecting the artifacts.
I'm trying to encode these as I am desperately running out of space :D Keeping the files forever isnt an option, lol.
stephanV
6th October 2005, 14:38
Maybe a bit late but...
If i start off with PAR and DAR at 16:9 from a hdtv source
The thing is that you don't. HDTV 1920x1080 and 1280x720 are always PAR 1:1 and DAR 16:9. (1920:1080 = 16:9).
Another thing you have to realize is that with cropping you never change the PAR, but you always change the DAR. So if you crop 1920x1080 to 1886x1038 (as in your posted pic) the PAR is still 1:1, but the DAR changes to ~1.82:1.
IOW - if you want to crop you have to realize that you are changing the DAR, so don't blindly resize to something that is 16:9, because the chance is very high you are making ovals out of circles. :)
CWR03
7th October 2005, 00:39
stephanV, that's a good point - I was presuming that since he was capturing a 16:9 image that the cropped areas were just black areas that I get with my own captures. If it's not, you're right.
gumballguy
8th October 2005, 03:58
Using DivX while resizing other than multiples of 16 will create some ugly artifacts, usually horizontal lines that would look like creased Saran wrap stretched across the display. It doesn't seem to be an issue with XviD
I have been reencoding this movie continually to try and work out what is the best way of doing it. The biggest issue I am having is a similar effect to this.. except it is vertical banding and happens with divx/xvid and regardless of the h-mod.
I had suspected it is the resolution change or the bitrate that is causing the problems... However the foreground and objects/faces in it are particularly clear, whilst black areas and backgrounds suffer banding and blocking.
Can you offer any insight into this phenomenon? I keep reencoding and trying different resolutions, bitrates, etc, but it is taking me at least 1 day per attempt to encode ;)
CWR03
8th October 2005, 08:13
Rather than encode the entire video to try different settings, you can select a range with DGIndex (Drag the position slider forward and click the [ button, then press F5 or F6 to play for ten or so seconds to make sure you have something like a camera pan within your selection, then click the ] button). I'd start with Kernel deinterlace if you haven't already tried it.
gumballguy
8th October 2005, 10:35
I had considered that, but in trying to find a good res/filesize fora 90min tvrip, I need to keep good control on what I'm doing.. If i blow things out of proportion by accident (which im fairly likely to do) well.. then I didnt learn anything!
Unlike dvds, where i'd aim for about 1200kbps, I'm not sure what to target for.
Best so far was a 4480mb xvid... that got rid of the banding, but the backgrounds are still blurry. Considering it came from a 9.9gb 1080i stream, and I created a 1824*1024p video, perhaps thats not too bad. Still, I need to clear those backgrounds up, they are quite distracting.
Ive found the option for having an interlacing source in the xvid codec (whilst researching about chroma/blocking etc) and that makes it much faster now. Around 10 hours. BTW ive been using kernel deint
Thanks for you help thus far, I'm impressed you keep coming back to this thread :)
I just need to sort out the disparity between these really clear foregrounds and fairly icky backgrounds/black areas.
CWR03
8th October 2005, 11:30
When testing settings with a sample, you could for example use a one-minute selection, then divide your original desired output by 90 and use that. It would give you the same resulting bitrate as if you'd encoded the entire file, and in six minutes instead of ten hours.
gumballguy
8th October 2005, 16:01
I have just noticed the most bizarre thing ever..
Suddenly, most of the artifacts disappeared. Well, theyre present in particular places, but its not bad over the majority of the movie.
You can imagine my surprise at that. Well, a bit more investigation, and I realised it was my hdtv software that was running consecutively.. apparently it was messing with the overlay and fixing the issue. Hdtv software was playing live tv whilst I was viewing my encoding in media player classis.
I close the hdtv player software and all of a sudden my encode looks ugly again.
Ive tried using xvid1, libavcodec and divx to decode them, they all have issues unless the hdtv software is running. divx was tried with post processing on/off.
I may have to try visit a friends and see what things look like on his hardware player. Very strange.
gumballguy
8th October 2005, 16:15
I have uploaded a 3mb avi sample to http://www.arach.net.au/~watto/example.avi
If you view that, and the problems are not very obvious and very ugly, then perhaps there is some sort of problem with my pc. I work on a basis of not installing codecs at random (and especially not crazy codec packs like nemo etc!), I have installed the GK codec pack, vp62 and indeo, and the ogg/mkv containers... so having conflicts would be surprising. Perhaps there is something I am not thinking of.
CWR03
8th October 2005, 20:31
By any chance are you using an nVidia video card with version 7.7.7.7 drivers?
SeeMoreDigital
8th October 2005, 20:52
It might also be worth pointing out that, most if not all, 1080 MPEG-2 content actually contains 1088 pixels.... it's only "headered" as containing 1080 pixels!
Cheers
SeeMoreDigital
8th October 2005, 21:00
I have uploaded a 3mb avi sample to http://www.arach.net.au/~watto/example.avi May I ask where you obtained your "source"? So those interested can generate their own comparison encodes....
Cheers
gumballguy
9th October 2005, 03:05
Almost.. I am using an Nvidia 6600gt with 7.7.7.2 drivers.
The source is australian channel 9 1080i hdtv.
How does it look to you both? ok/ugly? And for what reasons (what do you see?)
CWR03
9th October 2005, 05:59
I have a problem with overlays - after rebooting my computer, a video will play really bleached out until I open the Color Correction, at which time it corrects itself. If I remember correctly it started with 7.7.7.2, but I only had to correct it once - now it's after each reboot. Your video looks quite good on my PC, even at 200% zoom.
gumballguy
9th October 2005, 08:46
You are exactly correct! I went to the color correction in the nvidia settings, flicked it to advanced (but didnt change any settings) then hit apply. Immediately, everything starts to look as it should!
Thankyou so much. Who knows how many more reencodes I would have done and still not been able to 'fix' my movie.
It is very lucky that I noticed my hdtv software fixing the prob, and very lucky that I spoke to someone who had problems with this.
I wish you the best in future endeavours! :D
SeeMoreDigital
9th October 2005, 11:09
Hi gumballguy,
I'm able to play your 1056x576 encode in hardware and it looks fine to me :)
When I ran you sample thru' MPEG4 Modifier it reports it as being interlaced.... is this what you wanted?
http://img55.imageshack.us/img55/2912/sampleavi7xk.png
Also.... how did you decide upon an 1056x576 pixel frame size. These dimensions represent a frame ratio of 1.8333:1 and not 1.7777:1 aka: true 16:9!
You might want to give 960x544 pixels a try?
Cheers
gumballguy
9th October 2005, 12:13
Ah, its slightly off 16:9 I know. Thats because of the cropping. Cropping the black edges off will always ruin the aspect ratio slightly, will it not? Or am I doing this the wrong way.
The overall height/width was just me using the slider in GK. I figured I'd set the vert to 576p, and that was the height that resulted.
As to being interlaced, that surprises me. The source material is interlaced, but I used kernel deint in GK (which I thought would produce a progressive encode). However, I also set the xvid codec interlaced setting to on. As far as Im aware, the xvid setting doesnt actually perform interlacing, but does improve encoding speed if the source is interlaced.
If what I have said there isnt of any use, you may need to suggest something, as I'm not sure what it could be.
CWR03
9th October 2005, 18:50
Ah, its slightly off 16:9 I know. Thats because of the cropping. Cropping the black edges off will always ruin the aspect ratio slightly, will it not? Or am I doing this the wrong way.
I mentioned earlier that the video minus the black borders, since it's a 16:9 broadcast, should still be 16:9. The only way to be sure would be to find something in the video that should be round, encode and check it.
I'm off to find the 7.7.7.2 drivers - I'm tired of having to reset the color correction every friggin' time I reboot (In other words, avoid anything newer 'til they fix this problem). I'm glad you tried changing to Advanced - I'd forgotten that's all it took to fix it for good with that version.
SeeMoreDigital
9th October 2005, 19:02
I'm off to find the 7.7.7.2 drivers - I'm tired of having to reset the color correction every friggin' time I reboot (In other words, avoid anything newer 'til they fix this problem)....If you're talking about the nVIDIA drivers, I tried 77.77 but found they still suffered the "colour correction" issue.... So I went back to the 77.76 Beta driver (dated 20 July 2005)!
Cheers
stephanV
9th October 2005, 19:25
Ah, its slightly off 16:9 I know. Thats because of the cropping. Cropping the black edges off will always ruin the aspect ratio slightly, will it not? Or am I doing this the wrong way.
You are correct.
SeeMoreDigital
9th October 2005, 19:37
Ah, its slightly off 16:9 I know. Thats because of the cropping. Cropping the black edges off will always ruin the aspect ratio slightly, will it not? Or am I doing this the wrong way.Personally... I would have to see a still image from your original source before commenting further
CWR03
9th October 2005, 20:52
If you're talking about the nVIDIA drivers, I tried 77.77 but found they still suffered the "colour correction" issue.... So I went back to the 77.76 Beta driver (dated 20 July 2005)!
I was talking about the 77.72 drivers - with the 77.77, each time I'd reboot I'd have to open the Color correction panel, at which time the video overlay would correct itself. With 77.72 I only have to go in once, select Overlay, select Advanced and Apply, and it's permanently corrected.
gumballguy
10th October 2005, 03:48
As to being interlaced, that surprises me. The source material is interlaced, but I used kernel deint in GK (which I thought would produce a progressive encode). However, I also set the xvid codec interlaced setting to on. As far as Im aware, the xvid setting doesnt actually perform interlacing, but does improve encoding speed if the source is interlaced.
SeeMoreDigital, could you comment on this please?
Screenshot of the source up at http://www.arach.net.au/~watto/source.jpg
Screenshot of a circle from the source at http://www.arach.net.au/~watto/circle.jpg
You might want to give 960x544 pixels a try?
That isnt a slider option in GK. 992x544 or 960x528.
CWR03:I simply look at the image and crop the black off myself. This is in the broadcast, so it seems that I will never quite get 16:9 then.
To both of you, this 16:9 doesnt bother me too much, I can get it close enough for me to never see much difference :)
gumballguy
10th October 2005, 06:39
I have installed the 78.01 drivers, rebooted, and had no overlay problems. Without having checked the extra documentation that you can download, it would seem it is fixed.
CWR03
10th October 2005, 07:16
Now you tell me, I just went back to 77.72. :) Just kidding, I'll give it a go...it's not like it's difficult.
SeeMoreDigital
10th October 2005, 09:56
Hi gumballguy,
It would seem there's quite a bit of hard black and transition fur that can be trimmed from your 1920x1088 source image!
I managed to get it down to 1887x1034. Which provides an pixel AR of 1.8249:1: -
http://img301.imageshack.us/img301/2872/cropped1887x10346oc.th.jpg (http://img301.imageshack.us/my.php?image=cropped1887x10346oc.jpg)
....I suspect the broadcaster is bordering the image with as much matte as possible in an attempt to reduce the level of image that may be lost due to over-scan.
By-the-way.... when you play your encodes, what type of screen are you watching them on. And how is your screen connected?
Cheers
gumballguy
10th October 2005, 14:04
I'm watching it on a dvi monitor/tv. The pysical ratio is 16:9, but it takes a 4:3 signal through the dvi/vga ports.
I still bend my head around that some times ;) Luckily, mpc has a 'scale to 16:9' option which stretches things vertically, making it look correct (<3 mpc)
Basically, I just want to encode it "right" for that divx dvd player, which will connect through component video, and the tv allows 16:9 inputs that way. I use my pc for a lot of things that run it at full load, so it will be nice to be able to watch movies etc whilst the pc is busy, or just when the pc is not turned on at all. I realize component < vga < dvi.
As an aside, I wish someone would make home theatre processors/receivers with multiple dvi/vga inputs.
SeeMoreDigital
10th October 2005, 14:20
I'm watching it on a dvi monitor/tv. The pysical ratio is 16:9, but it takes a 4:3 signal through the dvi/vga ports. In that case I presume you would prefer to crop away as much of the matte you can..... given a DVI/VGA connected screen does not display over-scan.
When it comes to playing your encodes via your stand-alone player the component connection displays over-scan... That said, it is now possible to buy stand-alone players fitted with DVI and/or HDMI outputs. It even possible to buy "high-def" capable standalones.... which you'll need if you want to play back encodes with more than 720x576 (414,720 total) pixels... like your test sample!
Personally speaking I don't use GK or auto GK so I'm not familiar with it's encoding options but I seem to remember hearing there was an ITU "off" option somewhere!
Cheers
gumballguy
11th October 2005, 04:48
The interlacing was due to that setting in the xvid codec. Sorted.
Resolution & cropping no probs, as you know. Thanks.
Is there a good website to search/sort dvd players by features? Ive been looking, but havent found any. Well, the divx website lists them, but it seems the list is out of date. (http://www.divx.com/hardware/browse.php?c=7)
SeeMoreDigital
11th October 2005, 09:28
The interlacing was due to that setting in the xvid codec. Sorted.
Resolution & cropping no probs, as you know. Thanks.
Is there a good website to search/sort dvd players by features? Ive been looking, but havent found any. Well, the divx website lists them, but it seems the list is out of date. (http://www.divx.com/hardware/browse.php?c=7)All those high-def capable players on DivX's web site are fitted with the same Sigma EM8620L chip-set. You can read more about the chip-set (and the players) here: -
http://forum.doom9.org/showthread.php?s=&threadid=84003
Cheers
gumballguy
16th October 2005, 11:02
SeeMoreDigital, I would like to clarify something I have noticed, and check your feedback to see If I am correct.
Taking a widescreen presentation, the PAR is 1:1 just as we have discussed so far.
A non widescreen (ie: with side-letterboxing) presentation broadcast on the same tv station as the widescreen recording looks incorrect with PAR 1:1. If i set it to 16:9 here, it scales as I expect.
So.. The PAR can change in hdtv streams? Is this a side effect of a tv station taking a program originally made in 4:3 and then altering it so they can send it out as 16:9 (perhaps so that people can simply leave their HD set top boxes set to 16:9, rather than adjusting them? Even if new boxes can auto-select, I suspect they may do this for compatibility with older hardware)
I wish I could get a non widescreen picture of a circle to be extra sure... its harder than youd think! :)
Edit: here is an example of a non-widescreen capture (the source, not the re-encode, is here http://www.arach.net.au/~watto/jewel10sec.m2v ). The only way to make it look exactly like the source after encoding has been to set the PAR to 16:9 and cropping to 0.
SeeMoreDigital
16th October 2005, 11:25
High-def "wide-screen" TV is typically broadcast using 1280x720 pixels and 1920x1080 (1088) pixels
If you divide 1280 by 720, or 1920 by 1080 you get 1.7777 which is a true 16:9 image frame shape. The pixels are however "square", there is no requirement to include PAR or DAR signalling to effect their shape... the pixels are at 1:1
However, as you've seen from your sample clip, not all the pixels are filled with image, some are black. This is often because the film source was not shot at 1.7777:1 or even telecined to 1.7777:1..... In fact most stuff that looks 1.777:1 on your TV screen was, more often than not, filmed at around 1.85:1.... like your sample.
Cheers
gumballguy
16th October 2005, 11:48
OK, so would the best way to retain the source information be to simply alter the PAR to 16:9, or to crop everything then telecine it myself? Im still researching telecining as we speak, so please excuse me if my understanding is limited.
The sample posted is 576i SD. Its 25fps PAL interlaced according to DGIndex.
Many stations here broadcast 576p HD as NTSC progressive 50fps 0% film according to DGIndex.
(And yes, they call 576p HD by Australian law ;))
SeeMoreDigital
16th October 2005, 12:11
If you are intending to convert 1280x720 or 1920x1080/88 sources to say, MPEG-4 (XviD).... I personally, would not crop away any of the mattes and would select XviD's 16:9 DAR option..... I would follow this method if I was converting an HD source to MPEG-2/DVD too!
Now when it comes to your Aussie 576p "HD" sources, do you know whether they are broadcast at 1024x576/25p, 1024x576/50p, 720x576/25p or 720x576/50p?
Cheers
gumballguy
16th October 2005, 12:40
720x576/50p
NTSC Progressive
SeeMoreDigital
16th October 2005, 12:51
720x576/50p NTSC ProgressiveHow can this be NTSC progressive?
At those settings it has to be PAL progressive.... And it's not what I consider as being... high-def.
Cheers
gumballguy
16th October 2005, 13:15
I am simply reporting DGIndex values. Yes, the fps... I should think PAL too
BTW: Congrats on >6000 posts. Whoa.
PS: Those 78.01 drivers havent quite fixed overlay issues. It works most of the time, just not if you have two movie players open at the same time. FYI.
SeeMoreDigital
16th October 2005, 14:25
I am simply reporting DGIndex values. Yes, the fps... I should think PAL too.Have you uploaded a sample to Donald's ftp server? He likes to see these types of anomalies!
BTW: Congrats on >6000 posts. Whoa.Thanks... I had not noticed..... If only they were all of consistent quality (or any quality at all) :eek:
PS: Those 78.01 drivers havent quite fixed overlay issues. It works most of the time, just not if you have two movie players open at the same time. FYI.I think I'll stay with the 77.76 beta's for a while longer then!
Cheers
SeeMoreDigital
16th October 2005, 15:32
Edit: here is an example of a non-widescreen capture (the source, not the re-encode, is here http://www.arach.net.au/~watto/jewel10sec.m2v ). The only way to make it look exactly like the source after encoding has been to set the PAR to 16:9 and cropping to 0.The MPEG-2 source you posted does indeed include a 4:3 image, however, it's laid over a 16:9 background.... You can tell this from the "logo" that spans across the right hand matte (and very slightly into the image): -
http://img364.imageshack.us/img364/4564/jewel10sec9dl.jpg
It is however possible to crop away these mattes and generate an 720x576 MPEG-4 encode, with 4:3 DAR signalling... Such as this "quickly encoded" sample: -
MPEG-4 4:3 sample, with 4:3 DAR signalling (http://82.2.167.237/Uploaded_Files/Doom9_Forum_files/jewel10sec_MPEG-4_Sample.zip)
http://img389.imageshack.us/img389/8215/jewel10secmpeg43op.jpg
Cheers
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.