The OSSC, OBS, and Aspect Ratios

The place for all discussion on gaming hardware
Post Reply
User avatar
Jademalo
Posts: 233
Joined: Tue Apr 01, 2014 6:50 pm

The OSSC, OBS, and Aspect Ratios

Post by Jademalo »

Apologies in advance for this being extremely pedantic, but I like things to be as correct as I can possibly make them whenever possible.

I've recently been setting up a stream setup for my analogue consoles using the OSSC, the iScan VP50Pro, and an AverMedia Extremecap U3.
Essentially, the plan is to create "clean" sources in OBS that are properly cropped and have a correct aspect ratio for the console in question.

For the SNES and the N64, this was relatively trivial.
For the SNES, there's a nice and easy way to tell if the aspect ratio is correct - Everything that should be square is instead 7:6. I've argued at length about SNES pixel art and intentions, but at the end of the day when it's displayed on a CRT the PAR is 7:6. One of the easiest places to test this is in SMW, since every box or tile is 7:6. Using a 7:6 test thing on OBS, I was able to correctly fix the aspect so it displayed "correctly". In addition, there is the 240p Test Suite which has a load of useful tools of that nature.
For the N64, Ocarina of Time has the perfect test. In the equipment menu, the squares over the currently equipped things should be 1:1 square if the aspect is correct. Interestingly, the N64 required absolutely no correction using the default settings of the OSSC, so that was nice. Some games like SM64 do have quite large black bars top and bottom, but again it was trivial to add a variant that has those cropped nicely.

Today, I've been trying to set up the GameCube. This is where everything gets a bit... Messy.

First of all, I checked everything out with the 240p test suite running at 480p through official GC component cables. Using the white square grid, with 480p output from the OSSC and 480p output from the VP50Pro (With 4:3 input and 4:3 output - so no scaling), I get a nice 720x480 image.
Here's the first weird thing - The image is in a different place every time I boot up the GameCube. The amount of cropping I need on the Left and the Right is, for whatever reason, different every time. It's the same total (Exactly 80 pixels, which turns the 720x480 into a perfect 640x480), but sometimes it's 36/44, sometimes it's 42/38. It's very weird, and very inconsistent.
Regardless, the aspect ratio when using the square grid seems perfect. However, the linearity circles are all over the place. To actually get those to be correctly circular, I need to compress the cropped 640x480 image to be 580x480. This makes this test image perfect, but messes up the rest of the test images and most games seem wrong. I have absolutely no idea how these linearity circles work, since they just seem to be totally incorrect. The Wiki says they should be perfectly circular and have a consistent dimension, but when setting them up like that it's definitely not correct.

The third and final weird issue is to do with Super Mario Sunshine. Neither the simple 640x480 crop nor the 580x480 aspect fix looked right at all. Eventually I found a nice circle (the vignette when you go behind a wall) and started testing.
For some absolutely bizzare as heck reason, the output for SMS is crazy. First of all, the horizontal lines seem to be longer than everything else. To crop it correctly needs ~31 pixels cropped left and right, rather than the ~40 for the test suite and Swiss. In addition, it seems to only be 448 lines tall, needing 16 pixels top and bottom cropped.
After testing the aspect on this circle, it seems the way to correctly proportion it is to crop the smaller amount of horizontal pixels, compress it to 640x480, and then crop the 16 pixels top and bottom.


Needless to say, after doing all of this testing I'm pretty sure there's something funky going on with the default settings of 0.81, though I'm not sure what.
I've been having quite a few issues with the OSSC's default settings just generally. Including but not limited to;
- The SNES and N64 signals are very unstable, and shimmer horizontally quite a lot
- Jailbars on definitely good RGC cables
- Slightly incorrect aspect ratios for most consoles
- 256x240 Optim not working for the SNES, resulting in a blurry mess along with 8:7 not working
- Weird inconsistencies with games like SMS

I'm honestly not skilled enough to know what to do to fix most of this.
Ideally, I'd like to have this;
- SNES captured at 3x 256x240 Optim 8:7, letting me dynamically scale the output to either square pixels or 4:3
- N64 captured at 3x Generic 4:3, with properly square boxes on Ocarina of Time
- GCN captured at 480p passthrough with correct aspect ratio across all software

My SNES and N64 are RGB with cSync with a properly attenuated sync output. My GCN is a PAL GC with official Component Cables, with 480p set in Swiss. They're all going into AV1 since they run through my crosspoint, but these issues are all present if they're directly connected as well.

Any advice on the best approach? I know I've got all the hardware I need, but this level of configuring is beyond me. I'm assuming there's something up with the sync settings which is causing the instability on the N64 and SNES, but I have no idea what I need to change.

Thanks!

EDIT: Whoa got a new one now - SMS sometimes doesn't correctly get identified as 480p and is instead seen as 525i at 119.88hz.
User avatar
Jademalo
Posts: 233
Joined: Tue Apr 01, 2014 6:50 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by Jademalo »

Apologies for the double post, but I figured it was better than cluttering an already huge wall of text.

After doing a few more tests on GCN and Wii, I've come up with the following -

- Wii needs to be aspect corrected from 720x480 to either 640x480 or 853x480, then cropped horizontally and vertically. This was confirmed by the circles on the main menu.
- GCN needs to simply be cropped horizontally for Swiss/240p Test Suite since it already uses the full horizontal resolution and outputs at a correct aspect.
- Super Mario Sunshine needs to be cropped horizontally, then aspect corrected to 640x480, then cropped vertically.

Here's an example of the difference in correction needed for Swiss/240pTS and SMS;
Image

As you can see, SMS actually has to be compressed horizontally a decent bit more than the native output for it to be correct.
I tested a couple of other games, the easiest one to test was F-Zero GX since it has the emblem editor which has some nice squares. It seems to have the correct internal aspect for 4:3, and just needs cropped properly. The 16:9 mode as well requires the uncropped 720x480 to be stretched to 853x480, then cropped for it to display correctly.
Interestingly, it displays in a different place horizontally again to Swiss and 240pTS. I've figured out a decent what essentially amounts to an overscan crop, so that's all looking good now at least. I still have absolutely no idea what's going on with SMS though, and why it has such a weird output.

EDIT: Found out what was causing the GCN output to be inconsistent horizontally - 240p/480i is further to the left, 480p is about 4 pixels to the right. Any idea how I can fix this with the OSSC?
Never mind, for once I actually figured it out!
Setting the 480i H. Backporch to 58 and the 480p H. Backporch to 57 lines up the two video modes and also centres them perfectly.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by paulb_nl »

You seem to be unaware that 720x480 is supposed to be aspect corrected to 4:3 / 16:9. Displays already do this.

Can you post a video of the unstable signals/shimmering you get with SNES and N64?

For the optimized modes have you adjusted sampling phase? FBX made a tutorial video https://youtu.be/dEr3uFPs7gU
User avatar
Jademalo
Posts: 233
Joined: Tue Apr 01, 2014 6:50 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by Jademalo »

Been struggling to get a good video of the unstable signals, haven't really got a good enough camera (and compression eats them). It's just left-right instability. It used to be absolutely fine on the earlier firmwares. The sync coming in to the consoles should be properly attenuated too - it's a crosspoint output BNC to SCART with a resistor to bring the signal down to the right level.
I'll give FBX's video a watch, thanks. It's just surprising since Optim mode used to work absolutely fine on 0.77

I'm well aware that 720x480 is supposed to be aspect corrected, but the point is that the Gamecube's output doesn't seem to intend that to happen. Nothing looks right if you do that.
Just cropping the 720x480 for the gamecube gives the perfect 640x480 with proper 4:3 aspect. This is clearly evident when testing using F-Zero GX, since it has the emblem editor that has perfect circles and squares. Correcting 720x480 compresses everything terribly. Purely cropping results in a perfect image.
The Swiss menu and the 240p Test Suite seem to corroborate that, since they're perfect with just cropping.
SMS is wrong if you just crop or if you compress the whole thing, and this can be verified with the circular vignette when you're backed up against a wall. The only way to get SMS to look correct is to first crop the horizontal borders, then squish the image to 640x480, then crop the vertical borders. I've got no idea why, but the output from the gamecube for that game musn't be done properly for some reason. It's almost like the top and bottom borders weren't taken into account when working out the aspect for the output, so the whole thing ended up squashed slightly. I'll try and get some screenshots to show what I mean later, it's pretty clear when you see it.

In contrast, the output of the Wii is absolutely perfect if you take the 720x480 and aspect correct it. Both 4:3 and 16:9, and this is easily verifiable with the circles on the main menu. Booting a gamecube game with it gives the exact same output as the Gamecube though, with the same weird correction needed for SMS to be right.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by paulb_nl »

Jademalo wrote:Been struggling to get a good video of the unstable signals, haven't really got a good enough camera.
Why don't you use your capture card?
The Swiss menu and the 240p Test Suite seem to corroborate that, since they're perfect with just cropping.
Actually I aspect corrected the Linearity test of the 240p Test suite to 4:3 and it came out almost perfect. Just cropping makes the circles too wide.
User avatar
Extrems
Posts: 540
Joined: Sat Jan 30, 2016 5:01 pm
Contact:

Re: The OSSC, OBS, and Aspect Ratios

Post by Extrems »

Most GameCube/Wii homebrew have incorrect aspect ratios.
User avatar
Jademalo
Posts: 233
Joined: Tue Apr 01, 2014 6:50 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by Jademalo »

paulb_nl wrote:
Why don't you use your capture card?
Hah, I edited that immediately after you replied but before I refreshed. Compression eats it, makes it super difficult to see. I'll have another go with different settings and see if I can get a clear video later.

Actually I aspect corrected the Linearity test of the 240p Test suite to 4:3 and it came out almost perfect. Just cropping makes the circles too wide.
The circles of the Linearity test do, but the red/white grid doesn't. Nor do any of the menus. Nor does the white grid over the linearity test. Nor does frankly anything else in the 240p suite except for those circles.

Regardless of homebrew though, F-Zero GX has a totally incorrect aspect if it's squashed to 4:3. As I said, the simple test of the emblem editor conclusively proves that. So far the only exception to the crop only rule has been SMS, and even then it's a special edge case that needs more than simple 720->640 correction.

I don't have too many Gamecube games to hand to test, I'll have to figure something out to run some more. I'll try and get some pictures of exactly what I mean, or maybe do a quick video showing the differences.
My main point is that the Gamecube is super funky.


Extrems wrote:Most GameCube/Wii homebrew have incorrect aspect ratios.
That's interesting - Everything I tested on the Wii seemed to be fine. Just 720->640 and it all seemed to be perfect. There's obviously the really nice system level test of the circles on the main menu to confirm this, but the few games I tested seemed to work the same.
I would be inclined to believe you with regard to the Gamecube, were it not for F-Zero GX throwing a spanner in the works by just needing cropping like the homebrew and SMS behaving even weirder.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by paulb_nl »

Jademalo wrote: The circles of the Linearity test do, but the red/white grid doesn't. Nor do any of the menus. Nor does the white grid over the linearity test. Nor does frankly anything else in the 240p suite except for those circles.
Only the circles in the Linearity test matter because thats the only test which is adjusted for the aspect ratio. The rest of the 240p suite is just displayed 1:1.
User avatar
Harrumph
Posts: 368
Joined: Tue Jan 19, 2016 10:06 pm
Location: Sweden

Re: The OSSC, OBS, and Aspect Ratios

Post by Harrumph »

Doesn’t Gamecube usually output 704 active video px at 10:11 PAR? (704*10/11=640)

Try setting h.active to 704, iirc that’s what I did for my GC preset but I’d have to double check.
User avatar
Extrems
Posts: 540
Joined: Sat Jan 30, 2016 5:01 pm
Contact:

Re: The OSSC, OBS, and Aspect Ratios

Post by Extrems »

If you disregard borders, that's correct, yes.

The borders should be cut after aspect correction.
User avatar
Harrumph
Posts: 368
Joined: Tue Jan 19, 2016 10:06 pm
Location: Sweden

Re: The OSSC, OBS, and Aspect Ratios

Post by Harrumph »

So I extensively tested a number of Gamecube games to check the horizontal resolutions used (i.e. containing actual video).

There is some variety here, and certain implications for what the actual aspect ratio is. However, I'm not so concerned with how this would be treated for capture, just what looks good on my TV. Note that the given resolutions below does not necessarily mean that the h.active should be adjusted, but more on that further down.

All games were tested at 480i (forced by Swiss, when needed. Afaik, output should be same regardless of PAL or NTSC region). I double checked for 480p mode on my Wii for a few games, and it was always identical also.

666x448
Mario Kart DD
Pikmin 2
Zelda Four Swords Adventure

660x448
Metroid Prime*
Metroid Prime 2*
Super Mario Sunshine

660x480
Animal Crossing
Paper Mario TTYD
Zelda Wind Waker

640x448
F-Zero GX
Final Fantasy CC
Star Wars Rogue Leader
Super Monkey Ball 2
Viewtiful Joe
Wario Ware Inc
Wario World

640x480
Burnout 2
Eternal Darkness
Killer 7
Luigis Mansion
Skies of Arcadia Legends
SSX 3

*The metroid games have variable horizontal resolution of 680-640 depending on ”stretch” setting. Default is 660.

Now, the statement I made in another post of 704 h.active, does seem to achieve correct AR (when scaled to a 4:3 window by the TV) for most of the games I tested, particularly first party games and even games with 640 resolution (Luigis Mansion is a notable exception). Other games definitely do seem to need to be cropped to 640 h.active (i.e. identical to the situation with the Dreamcast).
In other 640 width games it's more ambigous, and there might be even a middle ground. In those cases, 682-684 h.active seems appropriate. (maintains same ratio as 660 is to 704).

Eternal Darkness is an interesting example, and is easy to check because it has a nice big circle in the pause menu. Widescreen is correct at 704 h.active, but 4:3 needs adjustment to 640 h.active.

Some recommended h.active listed by game, from my testing (and my taste, others may disagree and that's fine).

704 h.active
Animal Crossing
Billy Hatcher
Eternal Darkness (16:9 mode)
F-Zero GX (both 16:9 and 4:3 modes)
Mario Kart DD
Metroid Prime
Metroid Prime 2
Paper Mario TTYD
Pikmin 2
Super Mario Sunshine
Zelda Four Swords Adventure
Zelda Wind Waker
Wario World

682-684 h.active
SSX3
Super Monkey Ball 2

640 h.active
Eternal Darkness (4:3 mode)
Killer7
Luigis Mansion
Star Wars Rogue Leader

In summary, except for games with 660-666 horizontal where 704 is correct, how h.active should be set is not a given.

Finally, 704 h.active is the proper setting for Wii also, in my opinion. I tested the half-dozen games I have, and all were 686x456 (same as Wii dashboard) except Metroid Prime 3 which is 660x448 (like its predecessors).
User avatar
Jademalo
Posts: 233
Joined: Tue Apr 01, 2014 6:50 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by Jademalo »

Oh wow, awesome info Harrumph!
I've been super busy the last few days and haven't managed to do any testing. I'm still planning on doing a short comparison video of a few games to give a more visual comparison between the different weird aspect ratio things. FBX seems to recommend 858 sample and 720 active for a pixel accurate image. I'll try that and then scale to correct aspect ratios and see what I get.

I can confirm as well btw that the wii's output for gamecube games is identical to the gamecube for both 480i and 480p. Slightly lower quality, but aspect etc is all exactly the same.

It's interesting just how different SMS and F-Zero handle their aspect though, even if it looks the same. I'll try and get some really accurate images once I get my E1s.
F-Zero needs to be in the cropped list though, I did quite a bit of testing on it and it's definitely right at 640. There are a few nice circles to confirm that.
User avatar
Unseen
Posts: 723
Joined: Sun May 25, 2014 8:12 pm
Contact:

Re: The OSSC, OBS, and Aspect Ratios

Post by Unseen »

Harrumph wrote:So I extensively tested a number of Gamecube games to check the horizontal resolutions used (i.e. containing actual video).
Have you tried the movies and emulated N64 games on the Zelda Collection disc?
User avatar
Harrumph
Posts: 368
Joined: Tue Jan 19, 2016 10:06 pm
Location: Sweden

Re: The OSSC, OBS, and Aspect Ratios

Post by Harrumph »

Jademalo wrote: FBX seems to recommend 858 sample and 720 active for a pixel accurate image.
I’m still sampling at 858 in all cases, so the image is pixel accurate rgardless of how the h.active is set.
Jademalo wrote:F-Zero needs to be in the cropped list though, I did quite a bit of testing on it and it's definitely right at 640. There are a few nice circles to confirm that.
We can agree to disagree on that one. With 704px h.active, icons have the same shape in both modes. Portrait circles during races are symmetrical. In emblem editor, they don’t scale the actual drawing area quite correctly for some reason (drawing a circle or square it is slightly slightly squished) BUT the icons on the left side for circles and squares are in fact perfectly symmetrical.

Two images from emblem editor in each mode. The gray areas on left and right demarks the 64 px from the 704 width edge to the active video edge. Sorry for the glare, didnt bother reshooting at night...
https://drive.google.com/open?id=18b7-N ... zXYBTlMsY0
https://drive.google.com/open?id=1ZrB0Q ... ETCN89cyl1

And from Eternal Darkness, notice how there is no gray on the 4:3 image because it is cropped straight to 640.
https://drive.google.com/open?id=1yHVJ9 ... tsg5W9mRtv
https://drive.google.com/open?id=1tJ8Wc ... 31dhuHePBY
Unseen wrote:Have you tried the movies and emulated N64 games on the Zelda Collection disc?
No sorry, I do have that disc though, but now I will be away on holiday for two weeks...
User avatar
Jademalo
Posts: 233
Joined: Tue Apr 01, 2014 6:50 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by Jademalo »

Harrumph wrote:
Jademalo wrote:F-Zero needs to be in the cropped list though, I did quite a bit of testing on it and it's definitely right at 640. There are a few nice circles to confirm that.
We can agree to disagree on that one. With 704px h.active, icons have the same shape in both modes. Portrait circles during races are symmetrical. In emblem editor, they don’t scale the actual drawing area quite correctly for some reason (drawing a circle or square it is slightly slightly squished) BUT the icons on the left side for circles and squares are in fact perfectly symmetrical.
Alright, I see what you mean. I'll do some tests of my own and see what I come up with.
User avatar
Jademalo
Posts: 233
Joined: Tue Apr 01, 2014 6:50 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by Jademalo »

EDIT: Ignore this top bit
Spoiler
Small update to this - F-Zero GX is without question cropped 858/720.

GC/Wii gives a square pixel output at 858/720. This was confirmed with the 240p suite as well as a few other things. Capturing this direct with a Datapath Vision E1S means that scaling H*(10/11) should give me a *real* correct 4:3 output, which it does. This gives me exactly the same real world aspect as 858/704.
F-Zero GX outputs at 640x448 when capturing square pixels.

However, F-Zero GX is unquestionably wrongly scaled when using that real world aspect.

Image

Top is scaling it with H*(10/11) for true 4:3, bottom is simply cropping the 858/720 feed. F-Zero definitely renders incorrectly when properly scaled. The white square overlay is perfectly square.
EDIT: Actually, I'm totally wrong. I have a scaler made for SMS, which crops 660x448 and then scales that to 640x448 (This makes circles in that game circular). Applying that same scaler to F-Zero gives even more circular circles.
I'm going to have to test this a bit more, but there is something SUPER freaky going on with properly scaled assets in Gamecube games.

Image



Right, assuming square pixels, here is my fraction - 32/33.
858/720, capture the 720x480 frame. H*(32/33). This gives a rough size of 698x480 base scaled from 720x480 with square sampled pixels. Now, SMS and F-Zero GX have correctly scaled assets, and circles are circular.

Image
Image

I have ABSOLUTELY ZERO idea why this would be the case, but it implies to me Nintendo screwed something up in the SDK.
I know this isn't the "correct" aspect correction since that's H*(10/11) for the gamecube, but there are a few games that this definitely seems to correct.

This is derived by accident, but it's essentially taking the 660x448 output of SMS and squashing it to 640. Applying this ratio across everything else seems to be working.


EDIT: Just as an aside, this isn't the case for every game. Just checked TWW, and it definitely scales everything correctly. Using H*(10/11) gives properly circular circles

Image
User avatar
Harrumph
Posts: 368
Joined: Tue Jan 19, 2016 10:06 pm
Location: Sweden

Re: The OSSC, OBS, and Aspect Ratios

Post by Harrumph »

Unseen wrote: Have you tried the movies and emulated N64 games on the Zelda Collection disc?
Tested now, N64 games have 704 active pixels, i.e. they fill the whole aspect corrected 4:3 frame.
Movies are maximally 670 px wide.

The nes games seem to be pre-scaled by a 7:6 factor. It seems they cannot be optimally sampled for this reason (someone please correct me if I’m wrong here). Using x2 generic 4:3 mode, they have 656 h.px, which after 10:11 correction is ~596. To match real nes output exactly, this should have been ~585.
User avatar
Harrumph
Posts: 368
Joined: Tue Jan 19, 2016 10:06 pm
Location: Sweden

Re: The OSSC, OBS, and Aspect Ratios

Post by Harrumph »

Jademalo wrote: Right, assuming square pixels, here is my fraction - 32/33.
858/720, capture the 720x480 frame. H*(32/33). This gives a rough size of 698x480 base scaled from 720x480 with square sampled pixels. Now, SMS and F-Zero GX have correctly scaled assets, and circles are circular.
Yeah, that’s the same fraction as I suggested as a middle ground h.active, except corrected from 704. 704*32/33= 682.67
So there are then two possible intermediate h.actives, 698* & 682.
Remains to be determined how many games are suited for those particular corrections. What a mess! :)

*EDIT: I realised I misunderstood you and made a brain fart. So the second alternative h.active would be 660, rather than 698 (as in my posts before, I’m talking only about how to scale into a 4:3 window on a TV screen). That would make more sense e.g. for Luigis Mansion, where Luigi didn’t look skinny enough with the 640 crop, but I couldn’t find a suitable in game graphic asset to figure it out.
User avatar
Jademalo
Posts: 233
Joined: Tue Apr 01, 2014 6:50 pm

Re: The OSSC, OBS, and Aspect Ratios

Post by Jademalo »

Image

Guess what - Your assumptions about Luigi's Mansion were correct!
It indeed is another game where the H*(32/33) correction works to correctly aspect the image, meaning it's in the same camp as F-Zero and SMS in having an incorrect aspect ratio when using proper 4:3 scaling.

Top is H*(10/11) for correctly aspected 4:3
Bottom is H*(32/33) for the magical christmas land weird aspect correction.


I appreciate your confusion as well - we're both trying to do the same thing through totally different methods.
I'm doing all of this correction in post, with the use of 858/720 on the OSSC for a pixel perfect sample of the GC into my capture card, even though that doesn't display the aspect correctly without further tweaking.
Since this is a pixel perfect capture however, I can use this amazing table to figure out how to get the true 4:3 aspect ratio when square pixels are being sampled. Obviously this means that when I've got that square pixel input, H*(10/11) gives me true 4:3. The H*(32/33) sum that I figured out was just on a fluke - Noticing that SMS, which after cropping has a native output of 660x448, looked better when squashing it to 660x480 rather than the mathematically correct 4:3 600x448.
Post Reply