[Android] Trying to Load AV1 video in Android build only works half the time
Unity version
6000.0.51f1
Unity editor platform
Windows
AVPro Video edition
Trial
AVPro Video version
3.2.9
Device hardware
Windows 11 HP ZBook Elite laptop, intel i7-137020H, 32GB Ram, Geforce RTX 4080 12GB
Which Windows version are you using?
11
Graphics API
D3D 11
Video API
Media Foundation
Audio output
System Direct
Any other Media Player component configuration required to reproduce the issue.
Tried adding a Media Player and a sphere Apply to mesh like in the example. The preview of the AV1 video does not work, while the demo videos do work in preview.
Which output component(s) are you using?
Apply to Mesh
Any other component configuration required to reproduce the issue.
No response
The issue
Im trying to load an MP4 video file using AV1 codec. The file is 5GB in size and around 18 minutes long. The goal is to render it to a 360 degree sphere for VR playback. Im trying to just Load the video in the Media Player but I get the following error :
[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:1476) RenderHeads.Media.AVProVideo.MediaPlayer:Update () (at Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:854) RenderHeads.Media.AVProVideo.MediaPlayer:EditorUpdate () (at Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:809) RenderHeads.Media.AVProVideo.Editor.MediaPlayerEditor:OnInspectorGUI () (at Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor.cs:388) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Is there any way I can get more specific information out of the media player on what specifically is causing the load to fail?
Media information
No response
Log output
[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:1476)
RenderHeads.Media.AVProVideo.MediaPlayer:Update () (at Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:854)
RenderHeads.Media.AVProVideo.MediaPlayer:EditorUpdate () (at Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:809)
RenderHeads.Media.AVProVideo.Editor.MediaPlayerEditor:OnInspectorGUI () (at Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor.cs:388)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Are you able to send us a copy of the file that you are having an issue with please? [email protected]
Have you made sure that you have the AV1 codec installed on your PC?
I have the K1 codec pack installed, and the video does play in Windows Media Player Legacy (as well as VLC, but I'm guessing VLC brings its own codec support) So yes I should have AC1 codec installed. Does it play on your end in unity?
Did you try installing the one from Windows Store? It didn't play on mine without installing that, but was ok after I installed the codec. Saying that, my computer is very old and it did struggle with the resolution. It should be fine on yours. It played using Media Foundation, but not DirectShow.
That specific plugin seemed to do the trick, other codec installers did not work but the AV1 codec Extention from the Microsoft store did. (I have a no telemetry and no windows account setup on windows so installing it was a hassle) Thank you for your help. Closing this issue.
Now I am receiving the same error : [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources. on Android (Pico G4 Business Ultra). It happens some of the time, not every time the app starts. Id say 50/50 currently.
Is there any way to get more info out of this log? Maybe change the code in a specific way? The headset reports 6 gigs of available memory at this point so it shouldnt be that. And the file definately is there or else it wouldnt work half the time.
So its the exact same file, on the exact same device, but half the time it works fine and half the time you get this error? Could you make sure that you are using the latest version of AVPro Video please. Could you resend a copy of the file that you are having an issue with please? [email protected]. Could you also provide a full, unfiltered logcat in txt format please
Yes, always the same file that is loaded, hard coded file path string in PersistentDataPath. I used to be on 3.2.9 but updated to 3.3.3 two days ago and the issue persists. Sending the link and logcat log via mail.
The video provided is AVC1/H264, not AV1.
It looks like the log that you sent us is only showing Unity logging, but we need to see everything. If you're using Android Studio, you can set it to have no filters, like this.
Can you upgrade to AVPro Video version 3.3.4 and see if this is still an issue for you please.
Sorry my deadline for this project was last thursday so ive been in release hell all week haha. I will test this as soon as I can and get back to you!
closing this for now. please update us if this is still and issue.