Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elgato CamLink 4K DirectShow Pixel Format #132

Closed
Muny opened this issue Feb 4, 2024 · 4 comments · Fixed by #141 or #144
Closed

Elgato CamLink 4K DirectShow Pixel Format #132

Muny opened this issue Feb 4, 2024 · 4 comments · Fixed by #141 or #144
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Muny
Copy link
Contributor

Muny commented Feb 4, 2024

Before I describe the issue, I want to say that I very much appreciate your effort on this project. It's been extremely useful, and it's so helpful that it's cross-platform.

Now to the issue:

I see that the Elgato CamLink 4K is on the list of verified devices, however it seems to not be working for me.

I'm developing on Win11 with .NET 8.0.

The device enumerates as a DirectShow device with one characteristic:
3840x2160 [Unknown, 29.970fps]

It seems FlashCap doesn't support the pixel format reported by the device.
Value of RawPixelFormat:
3231564e-0000-0010-8000-00aa00389b71

Looking at https://gix.github.io/media-types, it seems this format is a YUV variant called NV12.
(side note: I found this sample code for converting NV12 to RGB: https://paulbourke.net/dataformats/nv12)

I'm curious, when the CamLink 4K was tested before, what pixel format did it report?

@kekyo
Copy link
Owner

kekyo commented Feb 5, 2024

@Muny Thanks reached out FlashCap!

Hmm, I just tried it in my environment (Ubuntu 22.04 x64 and ), and it is treated as YUYV (In RawPixelFormat).

image

image

I don't understand why only NV12 is listed. In fact, NV12 is a widely available format and I would like to support it in FlashCap, but it is not supported in the current version.

Maybe it's because I only tested with FHD in my environment. In your report, it is 4K resolution, and if it is 4K resolution, it may only be able to select NV12.

@Muny
Copy link
Contributor Author

Muny commented Feb 5, 2024

Thanks for the quick feedback. It seems you're right about the resolution the device is outputting having an effect on the reported formats from the Cam Link.

I changed my device to output 1080p video, and I now have a 4:2:2 YUYV characteristic (along with the unsupported NV12):

Cam Link 4K: Cam Link 4K (DirectShow), Characteristics=2
1920x1080 [YUYV, 59.940fps], RawPixelFormat: 32595559-0000-0010-8000-00aa00389b71 (YUYV 4:2:2 Packed 16pp 8bpc)
1920x1080 [Unknown, 59.940fps], RawPixelFormat: 3231564e-0000-0010-8000-00aa00389b71 (NV12 4:2:0 Planar 12bpp 8bpc)

@kekyo kekyo added enhancement New feature or request help wanted Extra attention is needed labels Feb 6, 2024
@kekyo
Copy link
Owner

kekyo commented Feb 7, 2024

Related #3

This was linked to pull requests Apr 12, 2024
@kekyo
Copy link
Owner

kekyo commented Apr 19, 2024

@Muny Thanks for the long wait. I will be releasing a version with this fix this weekend!

@kekyo kekyo closed this as completed Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants