Question / Help Custom resolution on capture device doesn't actually take

Nimble

Member
Hey there,

I'm considering swapping my Magewell HDMI 4k+ for an Elgato 4K60 Pro Mk2 due to Elgato's simultaneous application support, however, I can't seem to get the card to accept the correct resolution and framerate... For starters, I'm using the Asus XG35VQ which has a 3440x1440@100Hz signal. In Elgato's 4K Capture Utility it keeps throwing an error message about an incompatible resolution / hz signal, and in OBS it actually displays a feed but forces the aspect ratio from 43:18 to 16:9. Seeing as even Elgato's software wasn't accepting the signal as it should I assumed it was an issue with the card itself being incompatible with my target resolution / hz (3440x1440@100Hz)... until I started experimenting with FFmpeg.

In FFmpeg I'm able to record at 3440x1440 100FPS using this command:
Code:
ffmpeg -y -hide_banner `
-thread_queue_size 9999 -indexmem 9999 -f dshow -rtbufsize 2147.48M -video_size 3440x1440 `
-pixel_format nv12 -i video="Game Capture 4K60 Pro MK.2 Video":audio="Analog (3+4) (RME Fireface UCX)" `
-map 0:0,0:1 -map 0:1 -c:v h264_nvenc -preset: hp -r 100 -pix_fmt nv12 -b:v 288M -minrate 288M `
-maxrate 288M -bufsize 288M -c:a aac -ar 44100 -b:a 320k -vsync 1 -max_muxing_queue_size 9999 `
C:\Users\$env:UserName\Videos\MW%02d.ts

And the output video comes out just as desired, 3440x1440 at 100FPS. Although interestingly when I actually dictate the framerate as an input option, like "-Framerate 100", FFmpeg throws this error:
Code:
[dshow @ 0000023f16b8db00] Could not set video options
video=Game Capture 4K60 Pro MK.2 Video:audio=Analog (3+4) (RME Fireface UCX): I/O error

In the end this doesn't really matter as FFmpeg correctly ingests the input when I exclude said input framerate option, but it seems noteworthy as my Magewell card does not throw the same error when using the input framerate option. Also noteworthy, even when I exclude the input resolution option "-video_size 3440x1440" in the above command, the output comes out correctly. So it would seem that FFmpeg has the ability / simply accepts the correct signal from the capture card / Display. So I begin thinking there would just be a way to just force the correct resolution in OBS, but when I set the "Resolution/FPS Type" to "Custom" in the capture cards properties within OBS the aspect ratio remains at 16:9 instead of the desired 43:18:
image.png


OBS just seems to completely ignore that I've set a custom resolution instead of the "Device Default", which actually shows as 3440x1440@100Hz when I click on "Configure Video" ironically:
image.png


Sorry for the novel length post, but I think having complete context may be helpful in this situation. Any ideas?
 

Nimble

Member
Update: Stretching the video via transform or by using the "Scaling/Aspect Ratio" filter corrects the resolution problem well enough, considering that I'm outputting at 1080p60 6000kbps, still looks a little off but tolerable.

However this results in encoder lag and choppy output, would seem the only effective way to fix this would be getting OBS to recognize the correct 3440x1440@100Hz signal upon ingestion.
 

Nimble

Member
As I look more into things it would appear that OBS and FFmpeg are both using Direct Show, could anyone explain why setting a custom resolution in FFmpeg would be any different in OBS?

In FFmpeg when I set the resolution to 3440x1440 it outputs a 43:18 image, while when I do the exact same custom resolution in OBS it outputs a 16:9 stretched image as explained above... Seeing as both FFmpeg and OBS use Direct Show, it makes me think that OBS is in-fact the issue and not the capture card, but I may just be misunderstanding something.
 

Nimble

Member
Attaching log file, interestingly the log shows nothing about 3440x1440@100Hz despite the fact that that is the capture cards default configuration as shown above, furthermore when I switch between 3440x1440 and 3840x2160 the preview doesn't change at all:
OBS-Custom-Res.gif


Which just reinforces what the log file is saying, OBS is displaying one thing (the option for 3440x1440) but then doing something else. As you can see when I change to any custom resolution that isn't 3440x1440 it applies like you think it would.
 

Attachments

  • 2020-05-05 21-27-55.txt
    23.7 KB · Views: 45

FerretBomb

Active Member
Magewell has simultaneous application support on all of their capture cards already.
It's actually the origin of where I'd suggested the feature to Elgato as being incredibly useful, implemented through drivers rather than hardware, then provided the use-cases that got them to add SAS.

While it's a great get for Elgato gear and an awesome feature to have in a prosumer-grade bit of kit, Elgato gear is a marked step down from Magewell, which falls into the studio-grade realm pretty easily. I'd recommend sticking with the Magewell... it has a lot more options and fewer foibles and issues (as you're discovering, like locked/predefined resolution support rather than just capturing anything that the internal framebuffer can fit).
 

Nimble

Member
Magewell has simultaneous application support on all of their capture cards already.
It's actually the origin of where I'd suggested the feature to Elgato as being incredibly useful, implemented through drivers rather than hardware, then provided the use-cases that got them to add SAS.

While it's a great get for Elgato gear and an awesome feature to have in a prosumer-grade bit of kit, Elgato gear is a marked step down from Magewell, which falls into the studio-grade realm pretty easily. I'd recommend sticking with the Magewell... it has a lot more options and fewer foibles and issues (as you're discovering, like locked/predefined resolution support rather than just capturing anything that the internal framebuffer can fit).
I've noticed that I was able to open my Magewell card in multiple programs, and I do agree that it's obviously a superior card in almost every aspect. However, when I try to record with OBS and FFmpeg simultaneously FFmpeg starts duping thousands of frames a minute, as soon as I close OBS FFmpeg stops duplicating frames.

None of my resources are being maxed out, and I'm using the same settings in each application, yet it can't seem to keep up. It's almost like the buffer on the card is shared between applications or something, nevertheless with my limited testing in regards to the Elgato 4k60 pro it does not exhibit the same issue, really my only issue with the Elgato card for my application is that OBS seems to think 3440x1440 means 3840x2160 as seen in the log.

If the Magewell simply worked like the Elgato seems to I'd definitely opt of the Magewell, especially considering how hard it is to find the 4k60 Pro right now and I need 2 more for my setup to function how I'd like. If I could keep the Magewell I'd only need one more 4k60 Pro.
 

FerretBomb

Active Member
I've noticed that I was able to open my Magewell card in multiple programs, and I do agree that it's obviously a superior card in almost every aspect. However, when I try to record with OBS and FFmpeg simultaneously FFmpeg starts duping thousands of frames a minute, as soon as I close OBS FFmpeg stops duplicating frames.

None of my resources are being maxed out, and I'm using the same settings in each application, yet it can't seem to keep up. It's almost like the buffer on the card is shared between applications or something, nevertheless with my limited testing in regards to the Elgato 4k60 pro it does not exhibit the same issue, really my only issue with the Elgato card for my application is that OBS seems to think 3440x1440 means 3840x2160 as seen in the log.

If the Magewell simply worked like the Elgato seems to I'd definitely opt of the Magewell, especially considering how hard it is to find the 4k60 Pro right now and I need 2 more for my setup to function how I'd like. If I could keep the Magewell I'd only need one more 4k60 Pro.
I'd say that reaching out to Elgato Support would be the next step. If their software is saying that the resolution is out-of-range, that means it's one of the resolutions the card can't 'speak' natively. They might have steps available allowing the advanced user to add their own resolution definition. I'd assume that OBS might be requesting it, and the card is opting-up to the next-closest. Are any of them exhibiting the correct aspect ratio? You could always crop off the sides if it's just letter/columnboxing the feed.
A lower-quality option would be to manually edit the transform to correct the AR by hand. If it's cutting the sides (as it somewhat looks like in your demo GIF) then that's less of an option.

Hmm. I actually had a similar problem with my 2-port Pro Capture; it turned out that my motherboard was running the slot I had it in at 1x speed; due to some of the options I had turned on for onboard features, it was 'stealing' PCIe lanes from the card slots. Was kind of a PITA to run down. You can check the link state by going to the Video Capture Device source Properties, Configure Video, then to the Info tab. Should list the PCIe generation and link width:
1588791600542.png

Just as a sanity-check. Also, have you tried emailing their support? They do provide it in English, are very competent, and had a quick turnaround when I contacted them about the card's somewhat high temps (which they assured me were entirely normal and safe).
 

Nimble

Member
I'd say that reaching out to Elgato Support would be the next step. If their software is saying that the resolution is out-of-range, that means it's one of the resolutions the card can't 'speak' natively.
I think the same could be said about Magewell's software, back when I first tried using one of their capture utilities it did not support 3440x1440@100Hz but the card itself supported it when I used with FFmpeg or OBS. The reason I'm finding it a bit hard to believe that the issue is the card is because in FFmpeg, when not even dictating the resolution or FPS, it picks up the signal just fine and outputs it at the correct resolution and FPS. Both OBS and FFmpeg use DirectShow, from what I can tell TBH OBS is just utilizing FFmpeg in the background to do a ton of stuff...

They might have steps available allowing the advanced user to add their own resolution definition. I'd assume that OBS might be requesting it, and the card is opting-up to the next-closest. Are any of them exhibiting the correct aspect ratio? You could always crop off the sides if it's just letter/columnboxing the feed. A lower-quality option would be to manually edit the transform to correct the AR by hand. If it's cutting the sides (as it somewhat looks like in your demo GIF) then that's less of an option.
Every custom resolution except for 3440x1440 (43:18) are exhibiting the correct aspect ratio, but when you look at the log when you click 3440x1440 it's just setting it to 3840x2160. I've tried transforming the image with filters or just distorting it with transform and it causes massive encoder lag with unusable footage, on top of that the image is a bit fuzzy in comparison to my recordings with FFmpeg.

Hmm. I actually had a similar problem with my 2-port Pro Capture; it turned out that my motherboard was running the slot I had it in at 1x speed; due to some of the options I had turned on for onboard features, it was 'stealing' PCIe lanes from the card slots. Was kind of a PITA to run down. You can check the link state by going to the Video Capture Device source Properties, Configure Video, then to the Info tab. Should list the PCIe generation and link width:
Yeah my card is running in a 4x slot at 4x, this was something I made sure of a few years back:
Info.png


Just as a sanity-check. Also, have you tried emailing their support? They do provide it in English, are very competent, and had a quick turnaround when I contacted them about the card's somewhat high temps (which they assured me were entirely normal and safe).
I've reached out to support a few times, not regarding the multi application support however, I guess I just never really found it as a real option. It just seemed unlikely to me that a brand catering more towards professionals and business would modify their drivers or something to fix this, if they even can, I'm not convinced that it's not hardware limitation depending on how they're implementing the feature. Whatever they're doing, it seems to break away from Elgato's methodology which doesn't present the same issue. Also that's kind of crazy that your card runs at 95c+ lol, mine was running in the high 80's and the fan was annoyingly loud so I strapped a water block to it, now I get pretty decent temps like in the screenshot above.

I'm thinking maybe I should repost this issue as a bug report and see what the admins think, it just seems to me that the application should throw an error or something as opposed to silently setting the card to a different resolution than what I'm entering at the very least.
 

FerretBomb

Active Member
A Mantis bug report would probably be appropriate in this case, yes. Chances are good it may be closed with 'hardware issue, talk to Elgato', but worth a shot.

Ah, the 2-port 1080p max card is passively-cooled. I'd been toying with the idea of watercooling it once I swap to an open-loop cooler, but it's been running fine at these temps for a couple of years now. Actually started out with the 4-port for futureproofing, but the fan was crazy-loud.

I'd still reach out to Magewell, SAS is part of their advertised feature-set, and if it isn't working, at worst they'd probably want to know about it, and at best they might be able to get it troubleshot and working properly again.
 

Nimble

Member
A Mantis bug report would probably be appropriate in this case, yes. Chances are good it may be closed with 'hardware issue, talk to Elgato', but worth a shot.

Ah, the 2-port 1080p max card is passively-cooled. I'd been toying with the idea of watercooling it once I swap to an open-loop cooler, but it's been running fine at these temps for a couple of years now. Actually started out with the 4-port for futureproofing, but the fan was crazy-loud.

I'd still reach out to Magewell, SAS is part of their advertised feature-set, and if it isn't working, at worst they'd probably want to know about it, and at best they might be able to get it troubleshot and working properly again.
I've now reached out to both Magewell and Elgato support, and will wait to submit a bug report here until I hear back from Elgato.

Such a tiring process, thanks for the input!
 

Nimble

Member
Just as a sanity-check. Also, have you tried emailing their support? They do provide it in English, are very competent, and had a quick turnaround when I contacted them about the card's somewhat high temps (which they assured me were entirely normal and safe).
So Magewell got back to me (insane response time) and confirmed my suspicion that their method of simultaneous streams from one card is hardware restricted, each time you open the card in a new application it pulls a unique stream from the card. The problem is when pulling a 3440x1440@100hz signal more than once, you oversaturate the bandwidth of an x4 PCIe 2.0 slot (the standard that the card runs on)... so not even 2 streams are possible at my target resolution / framerate with my Magewell card.

Meanwhile with the 4K60 Pro, Elgato has opted for some sort of software solution. I was able to run 4 streams at the full 3440x1440@100FPS using FFmpeg, and the only thing that stopped from doing more was that I had the encoder on my RTX 2080ti at 100% usage. Meaning in my actual capture PC with a GTX 1080 which has 2x the encoding bandwidth in comparison to the RTX 2080ti, thanks to it's dual NVENC processors, I could do 7-8 streams of 3440x1440@100FPS simultaneously from one 4K60 Pro. Not really the application I'm looking for (looking to do 2-3 from each card), but just shows the difference in methodology between Magewell and Elgato.

I'm sure there are benefits to the way Magewell is handling it, like response time, but doing 3+ streams is not one of them. So hopefully I can get the 4K60 Pro working with OBS, else I won't actually be able to achieve what I'm trying to do. I know I've already said it multiple times, but it works perfectly with FFmpeg so it's definitely possible...
 

Nimble

Member
I was recording all sorts of examples and resulting log files to eventually post a bug report when I found that when I set the Video Format to NV12 within the device properties (along with 3440x1440 as the custom resolution) and restart OBS, when I open it again it actually ingests the signal at the proper resolution / aspect ratio!:
1588900409394.png


I had thought that maybe restarting OBS after setting the correct custom variables was the solution earlier, but I guess I just never tried this specific combo... a bit hacky but it's working as desired!
 
Top