UnityPlugin-AVProVideo
UnityPlugin-AVProVideo copied to clipboard
Error loading HAP video 640x800 with Media Foundation and Direct Show
This happened when we updated to latest version of AVProVideo. It was working with the previous version
Link to the video will be emailed
How to reproduce: Go into Demo_MediaPlayer Load up the HAP clip Press play It has Error: Loading Failed
`[Error] [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources. MediaPlayer.UpdateErrors() at /AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:1277 1275: if (ErrorCode.None != errorCode) 1276: { -->1277: Debug.LogError("[AVProVideo] Error: " + Helper.GetErrorMessage(errorCode)); 1279: // Display additional information for load failures
MediaPlayer.Update() at /AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:705 703: //_playerInterface.Render(); -->705: UpdateErrors(); 706: UpdateEvents();
MediaPlayer.EditorUpdate() at /AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:661 659: if (_playerInterface != null) 660: { -->661: Update(); 662: _playerInterface.Render(); 663: return true;
MediaPlayerEditor.OnInspectorGUI() at /AVProVideo/Editor/Scripts/Components/MediaPlayerEditor.cs:373 371: if (!Application.isPlaying && Event.current.type == EventType.Layout) 372: { -->373: isPlayingInEditor = media.EditorUpdate(); 374: } 375: #endif
GUIUtility.ProcessEvent() `
Also having trouble with Media Foundation, I have to restart Unity every time I change the media player settings:
Video HAP: BAD error - media foundation - use hap off Good - media foundation - use hap on Good - direct show - use hap off Good - direct show - use hap on
Video AVC: BAD crash - media foundation- use hap off BAD crash- media foundation- use hap on Good - direct show - use hap off Good - direct show - use hap on
I'll send the clips
Hi @drinsley,
We had been made aware of the HAP bug that has appeared with the most recent update. Have these other Media Foundation issues started at the same time? Its hopefully caused by the same bug. Our Windows Dev is back from holiday at the end of next week, so we will hopefully get it sorted then. Thank you for your patience.
Hi @drinsley,
I've just looked at the files that you sent. The Video AVC.mp4 has 4.2.2 chroma sub-sampling. This is a known issue. https://www.renderheads.com/content/docs/AVProVideo/articles/known-issues.html#2-h264-on-windows-only-supports-420-8-bit-using-media-foundation--winrt-apis
Hi @drinsley,
- Note, the 'Use Hap' flag is Media Foundation-specific and required for playback of HAP videos: https://www.renderheads.com/content/docs/AVProVideo/articles/component-media-player.html#platform-specific---windows
- As per Chris's comment, 4:2:2 playback with Media Foundation is a known issue: https://www.renderheads.com/content/docs/AVProVideo/articles/known-issues.html#2-h264-on-windows-only-supports-420-8-bit-using-media-foundation--winrt-apis
- You don't specify Unity/D3D version but we have encountered an issue with Unity 2022/D3D12 and HAP/NotchLC - a fix will be in the next release but a workaround can be found here: https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1286
Based on the above, the results you see in your second post appear to be as expected, albeit the 'Use Hap' flag should have no impact on Direct Show.
Cheers,
Are you still having issues with this with the version that has just been released (2.6.3)?
Closed due to lack of further response