Search Issue Tracker

By Design

Votes

14

Found in

2019.1.5f1

2020.1

Issue ID

1163390

Regression

No

[Android] Video is not being rendered when using URL on some Android devices

Mobile

-

To reproduce:
1. Open attached project VideoPlayerAndroidQ.zip
2. Build and run to android device

Actual result: Video is not playing in application
Expected result: video should play normally

Reproduced on: 2017.4.32f1; 2020.1.0a1

Tested and reproduced:
VLNQA00173, Xiaomi Redmi 6Pro (Redmi 6 Pro), Android 9, CPU: Snapdragon 625 MSM8953, GPU: Adreno (TM) 506
VLNQA00022, Xiaomi Redmi Note 3 (Redmi Note 3), Android 5.1.1, CPU: Snapdragon 617 MSM8952, GPU: Adreno (TM) 510
VLNQA00054, Xiaomi MI 4LTE (MI 4LTE), Android 6.0.1, CPU: Snapdragon 801 MSM8974AC, GPU: Adreno (TM) 330
VLNQA00262, Sony Xperia XZ Premium (G8141), Android 9, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540

Tested and not reproduced:
VLNQA00277, Asus ROG Phone (ASUS_Z01QD), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
----------, Xiaomi Mi 5 (MI 5), Android 6.0.1, CPU: Snapdragon 820 MSM8996, GPU: Adreno (TM) 530
VLNQA00219, Samsung Galaxy Note9 (SM-N960U), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00125, Google Pixel 2 (Pixel 2), Android 8.1.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00286, Meizu - (PRO 5), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760

Note: no repro on standalone
Note: User gets error line with W/Unity: AndroidVideoMedia: Error opening extractor: -10000

  1. Response avatar

    Resolution Note (fix version 2020.1):

    The critical thing is in the Player Settings. If the "Target API Level" is Android 9 or later, then this bug seems to happen.

    In the AndroidManifest.xml file, which Unity generates for you, you can add stuff if necessary. There are some instructions on how to do this here: https://docs.unity3d.com/Manual/android-manifest.html. The problem is that when targeting Android 9 or later, cleartext network traffic is no longer allowed by default. So, "http" URLs are no longer allowed by default. "https" should be fine. You can change this by modifying the following in your AndroidManifest.xml:
    <application android:isGame="true" android:usesCleartextTraffic="true">

Comments (10)

  1. 0d25d162ec96f220f4e0d5e563f127e4?d=mm

    anujsaini

    Mar 25, 2020 09:31

    Videos are playing fine in 2019.1.14 but not in 2019.2.5.
    What is this...?

  2. 769568bf07b13130fa845897126c939a?d=mm

    Brad-Newman

    Jan 10, 2020 05:35

    I'm not using URLs, just loading videos from an uncompressed local Asset Bundle, and I get this error in 2019.2.7f2. Some videos work, others don't. Can't determine a pattern:

    Warn MediaExtractor: FAILED to autodetect media content.
    Error MediaExtractor: Trace connect 0x0 0xbf955600
    Error NdkMediaExtractor: sf error code: -1010
    Warn Unity: AndroidVideoMedia: Error opening extractor: -10000
    Warn Unity: (Filename: ./PlatformDependent/AndroidPlayer/Modules/Video/Private/AndroidVideoMedia.cpp Line: 457)

  3. D522620105ed2fbe6ef8e6d925f0758b?d=mm

    fiachradunn

    Nov 05, 2019 15:59

    Reproduced in 2019.1.8f1 after changing target API level to Android 8.0

    Fix doesn't work for my device (Lenovo Phab 2 Pro) still receive error;
    AndroidVideoMedia: Error opening extractor: -10000

    Https links are not okay as the fix suggested. (Using Azure media service progressive download URLs)

  4. 25cc96cd391d75328b7c46f2a0f87409?d=mm

    danyruibal

    Oct 10, 2019 10:47

    Video is not playing on Android Q / Pixel 2 when using a local filesystem url. Remote URLs are working just fine. Permissions are correctly set, and videos are playing on any other device/OS.

    W/Unity: AndroidVideoMedia: Error opening extractor: -10002

  5. 7bca48968ac91729fac75293b3b11b58?d=mm

    wintermuute

    Oct 09, 2019 21:55

    Having this issue with Unity 2019.2.8 in Android 10/Q. Added the suggested changes to the Android Manifest but the problem still persists...

    E/NdkMediaExtractor: can't create http service
    W/Unity: AndroidVideoMedia: Error opening extractor: -10002

  6. 27866db6a3aee39bbc2a2a04fddd0282?d=mm

    RobAtJam

    Sep 24, 2019 09:49

    Also reproduced in 2019.1.11f1

  7. 27866db6a3aee39bbc2a2a04fddd0282?d=mm

    RobAtJam

    Sep 24, 2019 09:42

    We have a similar issue using a Google Pixel (first generation) on Android 10.

    E/NdkMediaExtractor: can't create http service
    W/Unity: AndroidVideoMedia: Error opening extractor: -10002

    We're using a persistent data video file using the URL as the source for the video player.

    videoPlayer.source = VideoSource.Url;
    videoPlayer.url = Path.Combine(Application.persistentDataPath, videoToOpen.video_src);

  8. 7fe42a1a08544e832260ea8177bc7eb7?d=mm

    jaguartallerdigital

    Sep 18, 2019 23:27

    Reproduced on a Xiaomi Mi Lite 8 / Xiaomi Mi 8 / Xiaomi Mi 9 / Xiaomi MIX 2S. All with Android 9

    On an Iphone 6 works ok. Dual-core 1.4 GHz Typhoon (ARM v8-based) / 16GB 1GB RAM

    Is there any chance to avoid this issue using a Video Player asset like UMP Pro or MPMP? We are short of time and can't wait for a bug solution

  9. 3b8ae5534ab11c7ad6c33ab28874baa9?d=mm

    BrunoCroci

    Sep 16, 2019 16:49

    We're also able to reproduce that on 2017.4.27f1.

    But the error we get is slightly different:

    `E/NdkMediaExtractor(11617): can't create http service
    W/Unity(11617): AndroidVideoMedia: Error opening extractor: -10002`

  10. 2e5a3975a054f936b6cd2e4fd3a94327?d=mm

    dchung-ludia

    Sep 10, 2019 22:59

    Hello, following is the portion of AndroidManifest which is in apk.

    <uses-sdk
    android:minSdkVersion="19"
    android:targetSdkVersion="28" />

    <uses-permission
    android:name="android.permission.INTERNET" />

    <uses-permission
    android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-permission
    android:name="android.permission.READ_EXTERNAL_STORAGE" />

    As you can see, there are WRITE_EXTERNAL_STORAGE & READ_EXTERNAL_STORAGE. With setting, this bug still can be produced which means it can't be resolved by design.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.