microsoft/FFmpegInterop

Is H265 hardware acceleration a supported configuration on HoloLens-2 using FFmpeg?

payyavula opened this issue · 5 comments

Before I debug further, I would like to check if H265 hardware acceleration is a supported configuration on HoloLens-2 using FFmpeg?

My Unity running on HL2 using FFmpeg 4.2 and FfmpegInteropX etc, works fine for H264 with hardware acceleration. However, FFmpeg crashes for the H265 RTP video stream.

Hello, can you share the effect of using unity, ffmpeg, ffmpegInteropX on hololens 2 and how to implement it?
I am very interested in it and I want to try it~
Thank you~~~~

Hello !
Did anyone try to resolve that issue ? It works using both h264 and h265 on windows desktop and for h264 on UWP HL but for h265 it returns empty green image on my side even tho Hololens supports both codec formats and on fmmpeg API side you should only change avcodec_find_decoder and av_find_input_format from h264 to hevc.

I don't have a HoloLens and I'm not using ffmpeg for encoding h265, but I do have a UWP app and I do encode h265 using the MediaCapture, MediaComposition, and MediaTranscoding APIs. I know the green screen you're talking about. And I usually see it when I'm trying to use a video pixel format that the device doesn't support. For example, some devices can't handle NV12 and others can't handle YUY2. See if there's someplace in the ffmpeg code to switch the pixel format to something different. Formats I've fiddled with to get around the green screen result are ARGB32, BGRA8, NV12, P010, and YUY2. Good luck!

Every windows device should handle nv12. It's the other pixel formats that might be a problem.

Thanks @Zofware for answer. However as I mentioned NV12 for h264 works fine so isn't it a proof already that NV12 is supported independently from codecs format ? Also when I decode with custom directx based only implementation h265 it works on HL so I assume I miss something on ffmpeg API side.