0

I'm trying to encode a direct x buffer using MediaFoundation. My Direct X Texture Format is

B8G8R8A8_UNorm

and my media input subtype in my Sink Writer is

ARGB32

When I run the program the system hang for a couple of minute and then it close. I tried changing

ARGB32

to

RGB32

and it works but its not a hardware encode. I got High CPU usage on my app. I've searched online and I discovered that only NV12 and ARGB32 works on hardware encode. Can anyone help me how can I make ARGB32 media input accept the B8G8R8A8_UNorm Texture. Thanks.

kripto
  • 69
  • 1
  • 10
  • Use this tool to find out why it hangs and closes: https://msdn.microsoft.com/en-us/library/windows/desktop/ff685370(v=vs.85).aspx – Soonts May 31 '17 at 10:09
  • I can't find it on my windows 10. No MFTrace tool in my Microsoft SDKs. – kripto Jun 01 '17 at 00:34
  • C:\Program Files (x86)\Windows Kits\10\bin\x64\mftrace.exe – Soonts Jun 01 '17 at 00:44
  • Similar for 8.0 and 8.1 SDKs. – Soonts Jun 01 '17 at 00:45
  • Yes There is no MFTrace. – kripto Jun 01 '17 at 00:59
  • You probably haven't installed native Windows SDKs. Modify your visual studio install to include "Windows 10 Tools and SDKs". I have 10 different mftrace.exe under my C:\Program Files (x86)\Windows Kits. – Soonts Jun 01 '17 at 01:03
  • This is where it failing 1716,2494 03:19:20.59903 CMFTransformDetours::SetInputType @02E96B4C Failed MT: MF_MT_FRAME_SIZE=5866925327104 (1366,768);MF_MT_MAJOR_TYPE=MEDIATYPE_Video;MF_MT_FRAME_RATE=257698037761 (60,1);MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1,1);MF_MT_INTERLACE_MODE=2;MF_MT_SUBTYPE=MFVideoFormat_ARGB32 – kripto Jun 01 '17 at 05:22

0 Answers0