Log in

View Full Version : Need To Get Rid Of Black Lines


jeffro73
25th December 2006, 06:18
Hi,

Was wondering when i convert back ups of my movies to Divx how i go about removing the black lines that appear at the top and bottom of the screen. Im currently using Doctor Divx2 to do my encoding. Is it in the type of resolution you give it. To me i hate seeing those lines when i watch movies as i use a wide screen HD TV. Any help or suggestions would be greatly appreciated

Cheers.

manono
25th December 2006, 13:38
Hello and welcome to the forum,

If you're talking about the black bars above and below the video of widescreen movies, then you crop that away before resizing and encoding. If you don't know how to do it yourself (I don't use Dr. DivX, and can't suggest how to do it within that program), then you might give AutoGK a try. It'll crop away all the black automatically.

However, there's a chance that the black is being added back by your player. To confirm or disprove, open the AVI in VDub(Mod). If you see black, it wasn't cropped away before encoding. If you don't see any, then it's being added by the player at playback time and there's nothing to worry about.

jeffro73
26th December 2006, 09:39
Hi again,

Tried using auto gk, but still cant work out why i still have black lines that appear at the top and bottom of my screen. The AVI copy looks the same as the original in regards to the black lines at top and bottom on my DVD player. I did read that Auto gk automatically crops the black lines so i am assuming that i dont have to change any of the defult settings?? Does changing the width resolution have anything to do with it in the advance settings?? Any other suggestions would be appreciated as iam very new to this thing and especially Auto gk.

manono
26th December 2006, 10:12
Hi-

The AVI copy looks the same as the original in regards to the black lines at top and bottom on my DVD player.

That's good, right? Both the original DVD and the AVI backup copy show black bars above and below the video.

Now I'm going back to guessing. You have a widescreen TV set, and figured that you'd no longer have to put up with black bars, like you did when watching DVDs or AVIs on your old 4:3 TV set. Is that close to the truth?

I was right in my earlier guess that the player is adding the black to maintain the correct aspect ratio. In addition, your widescreen TV set is 16:9 or 1.78:1. Any movie you watch that's wider than 1.78:1 (for example, the very common 2.35:1 movies) will have to have the black added in above and below, in order to maintain the proper AR. If it doesn't, and if your AVI fills the screen, it will only do so by stretching everything, so people will appear unnnaturally tall and thin. Something round, like the sun, will be oval shaped. You don't want that, do you? The other alternative is to zoom the picture, using the remote control of either the TV set or the player. This will maintain the correct AR, this will fill the screen, getting rid of the black bars, but at the expense of a cropped picture. You'll lose picture information from the right and left sides.

Movies have been created at every aspect ratio from 1.20:1 (Charlie Chaplin silent films) up to 2.76:1 (the 1959 Ben Hur). Unless the movie is 1.78:1 or 1.85:1 (the little bit of black bars of 1.85:1 movies is usually hidden by the overscan), you'll have a greater or lesser amount of black bars, on the sides or above and below.

No, just be happy that your TV set shows the picture with the proper Aspect Ratio (not all do), and learn to love (or ignore) the black bars.

jeffro73
26th December 2006, 10:32
Thank you very much for your advice. Yes i do have a large LCD HDTV wide screen and wanted to do away with the black lines. Its good to know that i was not doing anything wrong and will take your advice and learn to love the black lines......

torok55
1st January 2007, 03:27
I have an additional question about this. I recently decided to backup a new DVD of a recent movie that is 16:9 letterboxed due to the AR (on my 16:9 TV it shows up with black bars at the top and bottom). I used MeGUI to do the backup. If I Crop the black bars (as suggested in the help) and tell MeGUI not to resize, I get a warning that the AR is not divisible by 16. If I don't crop the black bars then I'm fine.

Should I leave them in for my encoding, and not crop them as suggested in the help files?

Also, when I go to playback the resulting MP4 in ZoomPlayer (the one where I encoded the entire thing, with the black bars), it shows up as a rectangle in the center of my screen, surrounded by black, if I use the "derived" AR - it only shows up correctly if I tell the player to force 16:9.

What am I doing wrong when I encode it? Shouldn't the file's "derived" AR be 16:9?

Thanks!

manono
1st January 2007, 13:53
Hi-

I can only answer the part about the warning. I don't let the player resize. I resize my AVIs so that they're 1:1 (i. e., square pixels).

MPEG-4 compression is based on blocks of 16x16 pixels. For compression efficiency it's best that you finish with a resolution where both the height and width are divisible by 16. Therefore, it follows that you can't just crop by whatever it takes in order to get rid of the black bars. It means that you might also have to crop into the video. Personally, every AVI I've ever made (some 2000 or thereabouts) has been 1:1 and resized Mod16 (both height and width divisible by 16). Width has usually been Mod32. Those are the default settings in Gordian Knot. Nor have I ever intentionally left any black at all in my AVIs.

You'll have to decide whether or not to abide by that rule. About all I can say is if you find you can't or won't finish with a resolution of Mod16, that you try at least to make it Mod8. And again, speaking personally, when I see an AVI resized by Mod 2, or even Mod4, to me it's a sign that the encoder didn't know what he/she was doing.

theronmoore
1st January 2007, 19:05
I came here today to start a discussion thread on a related topic that actually includes this little issue but it sounds like we're really trying to accomplish the same goal. I'll talk about what I've done so far and the problems I've had and perhaps we can both learn from the experts here.

The Problem : I bought a nice LCD HDTV and all my DVD's play with black bars and I'm disappointed by the general lack of HD quality material available.

What didn't work : a) Downloading. CinemaNow.com has a meager HD selection of TV shows for purchase and download, but no one has legit HD movies for purchasable download. That leaves pirated downloads, but full length 720p movies take waaay to long to download. Not that I'm advocating that or anything. (Side note, BitTorrent seems to be overrated).
b) Upscaling. I tried playing the DVD from my PC over a DVI cable using PowerDVD, which has a PAN SCAN viewing option. As the previous poster mentioned, most DVD sources are anamorphic and this will indeed zoom it in and trim the sides off the picture, similar to a 4:3 transfer. To me a little trimming is definitely preferable to black bars or skewing. However the stretched pixels just came out way too grainy to make me happy. Yes, call me a perfectionist.

Solutions I've found: a) Apparently there are higher end DVD players that feature 420p to 720p upscaling.
b) There is now a HD-DVD USB external add-on for the Xbox 360 that runs for $250 (waaaay cheaper than a deck) that plug and plays perfectly with a Windows PC.

However I'm broke, so financial solutions are not readily available. So I figure if hardware can do it (420p to 720p upscaling) then software can do it.

I used a guide I found on VideoHelp.com for converting DVD's to HQ Xvid. Here is the link (http://www.geocities.com/goodsharer/), but as it's on Geocities it's down all the time. Basically I used DVD Decrypter to rip, DGIndex to demux, VFAPI to create a dummy AVI, and VirtualDubMod to encode. Oh, and in simple answer to your question, apply the null transform filter in VirtualDubMod before encoding and it will allow you to pixel-by-pixel shave those pesky black lines.

I did stray from the guide however to increase the resolution to 1280 X 720 and the framerate to 59.94, all in VirtualDubMod. I tried to also increase bitrate, but the Xvid codec only allowed a targeted bitrate and I could tell it was a bit confused when it tried to calculate it against a 5GB target file. I then used BeSweet's -ota command to stretch the audio while adjusting pitch before encoding and remuxing. Add to bowl, mix, and serve.

One day later ...

The transfer came out pretty damn good for the most part. The picture, while not up to snuff to true HD material, did look pretty good and definitely not as grainy as the stretching. That being said though there were definitely problems and this is what I would like help on.

1) Frame rate. It seems that VirtualDubMod just sped things up when increasing the frame rate. Theoretically, it seems you could just duplicate every frame effectively doubling the frame rate (29.97 to 59.94). Is this possible in VirtualDubMod or other programs?

2) Slight skewing. These damn anamorphic DVD's! It is very slight though, almost unnoticable even by me and I'm a stickler for skewing. I'm thinking this has something to do with pixel size and shape due to the anamorphic source and I saw settings to adjust such things in VirtualDubMod. If I'm transferring from a 2.35:1 source what should I do to fix this?

3) Audio synch. As mentioned above, the video was playing at double speed so of course there were audio problems. But even though it sounded like the movie was cast with Alvin and the Chipmunks, it was still way behind the picture. I did come out with a 0ms delay on the demux so no need for delay adjustments, and I know BeSweet is used to fix sync problems when increasing framerate from PAL to NTSC. Is doubling too far a stretch for audio? Or is VirtualDubMod perhaps messing with the audio on the remux?

4) Bitrate. Again, as mentioned before, I used the Xvid codec to specify a target file size of 5GB and it then calculated frame rate for me, which was targeted around 700Kbps. However the completed file only has a 384Kbps which is clearly giving the slight imperfection in video quality. What is the standard bitrate for true 720p material? Should I perhaps use another codec that allows you to define bitrate instead of target? (I've seen HD files in DivX and x.264 as well as Xvid)

Sorry for the extremely long post, hopefully it gives you hardcorers something to think about.

zacoz
2nd January 2007, 13:36
I'm disappointed by the general lack of HD quality material available....no one has legit HD movies for purchasable download.
You said it yourself: "full length 720p movies take waaay to long to download." I'd imagine the market for them would be miniscule - who's really going to purchase them and then spend forever downloading them rather than simply buy them on disc.
To me a little trimming is definitely preferable to black bars or skewing.
Aren't you losing a quarter of the picture by zooming in a 2.35:1 movie?
Apparently there are higher end DVD players that feature 420p to 720p upscaling.
Which still won't look like native HD.
There is now a HD-DVD USB external add-on for the Xbox 360 that runs for $250 (waaaay cheaper than a deck) that plug and plays perfectly with a Windows PC.
But still won't make a DVD look like a HD.
apply the null transform filter in VirtualDubMod before encoding and it will allow you to pixel-by-pixel shave those pesky black lines. (emphasis added)
See manono's post above on cropping.
I tried to also increase bitrate, but the Xvid codec only allowed a targeted bitrate and I could tell it was a bit confused when it tried to calculate it against a 5GB target file.
XviD allows setting the target bitrate or the desired target size on the second pass of a two pass encode.
1) Frame rate. It seems that VirtualDubMod just sped things up when increasing the frame rate.
Exactly. Frame rate = rate at which the frames are played.
Theoretically, it seems you could just duplicate every frame effectively doubling the frame rate (29.97 to 59.94).
Duplicating every frame would double the frames, not the frame rate. If you duplicated the frames AND doubled the frame rate, then the movie would play for the same time as it originally did - also achieving nothing in regards to video quality.
2) Slight skewing. These damn anamorphic DVD's! It is very slight though, almost unnoticable even by me and I'm a stickler for skewing.
It's not uncommon for a 2.35:1 movie source (or any other aspect ratio) to not be exactly spot on, so if you resize to exactly 2.35:1 skewing can be the result.
4) Bitrate. Again, as mentioned before, I used the Xvid codec to specify a target file size of 5GB and it then calculated frame rate for me, which was targeted around 700Kbps. However the completed file only has a 384Kbps which is clearly giving the slight imperfection in video quality.
frame rate of 700 Kbps??? Guess you mean bitrate. Never tried upsizing or butchering a DVD like this, but maybe you saturated the codec (check out the sticky in the XviD forum (http://forum.doom9.org/forumdisplay.php?f=52).
Sorry for the extremely long post, hopefully it gives you hardcorers something to think about.
Sorry for the extremely long reply. I'm no hardcorer, but it gave me something to think about. :scared:

tominator
4th January 2007, 17:52
It's not uncommon for a 2.35:1 movie source (or any other aspect ratio) to not be exactly spot on, so if you resize to exactly 2.35:1 skewing can be the result.


What is skewing?

zacoz
5th January 2007, 14:38
In the context used by theronmoore, I took it that he meant that the picture was being stretched inconsistently between the height and the width, e.g stretched in one direction proportionately more than the other. Sorry if I've confused you by taking this approach in my response.

Normally it's not the term I would use, as I normally think of skewing to be something like this:
/----------/
/ /
/----------/