Opened 6 years ago

Last modified 23 months ago

#6998 open enhancement

[Feature Request] add IYU2 and Y410 to DShow/FFMPEG

Reported by: Jan Reimer Owned by:
Priority: wish Component: avdevice
Version: git-master Keywords: dshow
Cc: Diederick Niehorster Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no



I have a Magewell Pro Capture HDMI 4K Plus and it supports IYU2 (yuv 444 8-bit) and Y410 (yuv 444 10-bit), however, neither DShow nor FFMPEG does support them.

IYU2 = 0x32555949
Y410 = 0x30313459

I did try adding them on my own (in dshow.c I added the case for each and made IYU2 recognize as yuv444p and Y410 as yuv444p10le. Within the raw.c I have added the corresponding tags)


	case 0x32555949:
		return AV_PIX_FMT_YUV444P;
	case 0x30313459:
		return AV_PIX_FMT_YUV444P10BE;


    { AV_PIX_FMT_YUV444P,     MKTAG('I', 'Y', 'U', '2') },
    { AV_PIX_FMT_YUV444P10LE, MKTAG('Y', '4', '1', '0') },

For IYU2 it actually worked. DShow recognized it as a pixel format for my capture card, and I was able to select it for recording. However, the recorded image is distorted (wrong colors) and it looks as if it is zoomed in. I assume that I either did something wrong, as in applying the wrong formats, or something else has to be added for it to work.
Unfortunately I am not knowledgable enough to do it on my own.

About Y410: While it was shown as a pixel format for my capture card via DShow, I was also able to select it, however, I did get the following error message:
{{{[rawvideo @ 000002b1a22c2680] Invalid buffer size, packet size 14745600 < expected frame_size 22118400
Error while decoding stream #0:0: Invalid argument}}}

Thanks in advance.

Attachments (1)

IYU2.jpg (1.6 MB ) - added by Jan Reimer 6 years ago.
Image when recording with IYU2 via FFMPEG with the things I set up.

Download all attachments as: .zip

Change History (11)

by Jan Reimer, 6 years ago

Attachment: IYU2.jpg added

Image when recording with IYU2 via FFMPEG with the things I set up.

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: ffmpegavdevice
Keywords: ffmpeg pixel_format yuv444p removed
Priority: normalwish
Version: unspecifiedgit-master

AV_PIX_FMT_YUV444P is planar while IYU2 is likely packed, so this is not completely trivial.

comment:2 by Jan Reimer, 6 years ago

Yes, according to this website ( IYU2 is packed. I wasn't sure whether this was the issue or not.

In this case it is not as useful for me as I had hoped. My idea was to use scale-npp to output yuv444p and I thought IYU2 is yuv444p, so the input would have the same pixel format as the output, which would have better performance than having the input pixel format in bgr24 and then converting it to yuv444p.

Thanks for clarification.

Last edited 6 years ago by Jan Reimer (previous) (diff)

comment:3 by Diederick Niehorster, 3 years ago

Cc: Diederick Niehorster added

comment:5 by Balling, 2 years ago

Status: newopen

Okay, WTF. I just found out that these patches are not applied:

So, qsvdec it works, nvdec, it works, and yet d3d11 and dxva are not there! See also code in MPC that applies these patches (BE, not HC, LOL), it works! LOL!

Really, wow.

Last edited 2 years ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.