RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
224 stars 27 forks source link

Azure Kinect videos in "gray16le" format do not play #396

Open PinoEire opened 4 years ago

PinoEire commented 4 years ago

test.zip

Describe the bug I encoded the 16-bit grayscale info from Azure Kinect DK using H265 lossless format (file attached). This format is supported by the operating system and by FFmpeg (libx265) but AVProVideo gives the error "Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources"

Your Setup (please complete the following information):

To Reproduce

  1. Add the file to the StreamingAssets folder
  2. Try to load in the player

Logs [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources. UnityEngine.Debug:LogError(Object) RenderHeads.Media.AVProVideo.MediaPlayer:UpdateErrors() (at Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:1161) RenderHeads.Media.AVProVideo.MediaPlayer:Update() (at Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:563) RenderHeads.Media.AVProVideo.MediaPlayer:EditorUpdate() (at Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:519) RenderHeads.Media.AVProVideo.Editor.MediaPlayerEditor:OnInspectorGUI() (at Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor.cs:261) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Videos Attached here

AndrewRH commented 4 years ago

Hi,

Yes this is an uncommon pixel format and not one that most players (including AVPro Video ) support. We will see whether it's possible to add support for this format (gray10le) in the future.

Thanks for the test media we will use this for testing.

Thanks,

PinoEire commented 4 years ago

I'm not sure it's correct to say that unrecognised video tracks count as no video track :) Anyhow the first track is MJPEG and the Media Player plays it normally, so why it's telling me that there are 0 video tracks if it's playing the main track?

PinoEire commented 4 years ago

I also tried encoding this using jpegls, ffv1 and libopenjpeg, all generate with bit format gray16le which is common for grayscale HR videos, still no luck, none of those are supported either. Can you please advise which supported format you have? On the UWP page you take me to Microsoft supported page, implying you support any installed codec, but I do have from factory HEVC (x265) installed but if I encode the video that way you don't play it either. A list of supported decoders would be nice to have, otherwise I keep trying decoders that play OK using the regular player but fail using yours.

AndrewRH commented 4 years ago

I'm not sure it's correct to say that unrecognised video tracks count as no video track :) Anyhow the first track is MJPEG and the Media Player plays it normally, so why it's telling me that there are 0 video tracks if it's playing the main track?

Ahh I missed that on the first pass. It certainly isn't correct for it to be reporting 0 video tracks if it is able to actually play the video. We will investigat this and get back to you shortly.

AndrewRH commented 4 years ago

I also tried encoding this using jpegls, ffv1 and libopenjpeg, all generate with bit format gray16le which is common for grayscale HR videos, still no luck, none of those are supported either. Can you please advise which supported format you have? On the UWP page you take me to Microsoft supported page, implying you support any installed codec, but I do have from factory HEVC (x265) installed but if I encode the video that way you don't play it either. A list of supported decoders would be nice to have, otherwise I keep trying decoders that play OK using the regular player but fail using yours.

For the gray16le support, we've been talking about adding support for this. We would need to create a custom MFT to handle the conversion. We don't have a timeline for this yet, but it's definitely on the TODO list.

H.264 is generally the best format for compatibility and should allow the video to be played on pretty much any device. We rely on any codecs that are available on the system to handle the decoding (except for Hap codec which we have built-in support for). HEVC should play back I'm not sure why it's not. I found this document from Microsoft: https://docs.microsoft.com/en-us/windows/mixed-reality/release-notes-april-2018 Which says "HEVC Video Playback does not work - Applications that attempt to play back H.265 videos will receive an error message. The workaround is to access the Windows Device Portal, select Apps on the left navigation bar, and remove the HEVC application. Then, install the latest HEVC Video Extension from the Microsoft Store. We are investigating the issue." so perhaps that will work? I'm not sure if you're specifically talking about the Hololens 2 or another UWP platform.

Thanks,

PinoEire commented 4 years ago

Sorry, I posted this in the wrong issue, I meant it for here: https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/395#issuecomment-651656946

PinoEire commented 4 years ago

So it appears that consuming an HTTP stream is not working

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically closed because it has not had recent activity. If you wish to continue this issue, then please create a new issue as we do not monitor closed issues.