Unity videoPlayer not working on android when using a URL

videoPlayer is not working in unity 2018.3.0f2 when using url on android (tested it on android 9), it works fine in the editor.I tried assigning a video clip and it works (on android and editor) but when I try to stream a video from url it doesn’t work,

I tried turning off auto graphic api and forcing GLES2 but it still doesn’t work.

tried using this url

http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_640x360.m4v

gives the following error

androidVideoMedia: Error opening extractor: -10000

Same problem here with some difference. Samsung Galaxy S8+ works fine, but OnePlus 5 does not work. iOS and Editor works fine.

동일한 문제가 있습니다. 안드로이드 9 가 나오기 전에는 정상적으로 영상이 재생되었으나 안드로이드 9 업데이트 이후 해당 폰들은 모두 재생이 되지 않습니다.

나도 같은 문제가있어. Android 9 업데이트 후에는 동영상을 재생할 수 없습니다.

<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
    <uses-permission android:name="android.permission.INTERNET" />
    <application
        ...
        android:usesCleartextTraffic="true"
        ...>
        ...
    </application>
</manifest>

add android:usesCleartextTraffic=“true” to your androidmanifest.xml

2 Likes

Even i am facing this same issue. please suggest some way to sort. Device using one + 6.

I am also facing this issue. Have anyone found a fix?

Got the same error on my android phone. Works fine on PC and IOS
UnityVersion: 2017.4.14f
Video Format:MP4

2 Likes

Indeed, even I am confronting this equivalent issue. if you don’t mind recommend some approach to sort. Gadget utilizing one + 6.

[akash437]( https://discussions.unity.com/t/731826 members/akash437.327070/), thanks for this. It seems to have worked for me when using Android API 28.

Thank you! It worked for me too.
Changed manifest (used this video
https://www.youtube.com/watch?v=G4-bPjhe2A4
)
It turned out Android 9 changed some request policies and it allows only https requests.
https://stackoverflow.com/questions/51902629/how-to-allow-all-network-connection-types-http-and-https-in-android-9-pie

I have this problema and seems nothing work :S
any help?

Hey you all, I don’t know if this is related or not but I got a bit different error, even if I’m using https url. please help if anyone can.

2020-01-21 19:17:25.287 2236-3753/? E/Conscrypt: ------------------Untrusted chain: ----------------------
2020-01-21 19:17:25.287 2236-3753/? E/Conscrypt: == Chain0 ==
     Version:   3
2020-01-21 19:17:25.288 2236-3753/? E/Conscrypt:  Serial Number:   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2020-01-21 19:17:25.288 2236-3753/? E/Conscrypt:  SubjectDN:   CN=app.tarc.co.ke
2020-01-21 19:17:25.300 2236-3753/? E/Conscrypt:  IssuerDN:   CN=Sectigo RSA Domain Validation Secure Server CA, O=Sectigo Limited, L=Salford, ST=Greater Manchester, C=GB
2020-01-21 19:17:25.306 2236-3753/? E/Conscrypt:  Get not before:   Sat Jan 04 05:30:00 GMT+05:30 2020
2020-01-21 19:17:25.310 2236-3753/? E/Conscrypt:  Get not after:   Fri Nov 20 05:29:59 GMT+05:30 2020
2020-01-21 19:17:25.310 2236-3753/? E/Conscrypt:  Sig ALG name:   SHA256withRSA

The thing is that if I open the same Url in my mobile browser it just works fine but when it comes to streaming the video in my unity app(this is using unity’s own Video Player and from Url) it doesn’t.
And everything just works fine in Unity editor.

Still having issues with this-
Same issue -Unity 2018.4.16 video played from URL works fine on older devices S6, as well as iOS and editor. On newer Android 9 the begin, sometime playing thru, but other times the video freezes as if paused. I have added the Cleartext line to the manifest and confirmed it merges when building. No Change, Files are delivered via AWS bucket, MP4 baseline. Seems to freeze at similar spots, 10-12 second in, sometimes 20sec in, sometimes will play without issue occasionally. when freezing the app shows no error, audio stops and the frame sits still, app runs and triggers the VideoEnded(VideoPlayer) callback at the end. Clips are 2-12 meg in length and all use https://.
Only item I get that stands out in the logcat around the time video freezes is…

01-28 10:32:16.543 W Unknown NuMediaExtractor 13032 13173 read on track 0 failed with error -2147483646

Tried with and without vsync, targeting android api 23 thru 28 - with no change, randomizing the url to eliminate cache. Nothing seems to change the behavior or resolve. (testing device is GalaxyTabS5 e) (all works fine on Samsung S6)

Anyone else still experiencing this issue or have any other potential solution to try?

Thanks Max

i am using unity 2019.4.5, when i import normal mp4 video, unity giving me this error- UnityEditor.VideoClipImporterInspector:OnDisable() , and i am unable to attach video file ,
i read that unity supports .ogv file, so i converted my video and then imported it, it attached successfully, but doesn’t show up on built (i tried all, material override option, camera far/near , also trans coding as informed ), on trans coding .ogv file unity gives this error -
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Now i am stuck in this loop, cannot find any solution, can anyone help?.

I have a similar issue, Im working in Unity 2020.1.11f1, pushing to Samsung Tab S5e and Samsung S8.
The video loads as a white plane without playing the video. However, if I reopen the scene, it plays perfectly fine the 2nd time.
I originally built the App in iOS where the video played perfectly first time

2 Likes

Did you ever resolve this issue? I’ve tried to update the manifest like it says but it doesn’t seem to work :frowning:

I am experiencing the same issue.

Facing the same issue with video performance (lag in a few seconds for some time).
Have 4 different resolutions videos, max is 1080 - it’s really lagging. The only video which is running without lags is 360 (100Mb, 5:30 min, H.264).
In my case lagging devices are:
Samsung Galaxy S20+ Android 11
Huawei MediaPad M5 Lite 10 Android 8.0.0
Huawei P30 ELE-L29 Android 10
Google Pixel 4a, Android 11

Not lagging devices:
Samsung Galaxy S8 Android 8.0.0
Xiaomi Mi 10 Pro Android 10

Currently have no resolution to the issue, but need it.

Bump, same issue, Unity 2021.1.21f1, VideoPlayer shows a black rectangle instead of video on Android, everything’s fine in Editor. Webm + VP8.

1 Like