Search Unity

LTS 2020.3.15 Play Asset Delivery cannot load Videos on Android

Discussion in 'Android' started by mylastggeast, Aug 3, 2021.

  1. mylastggeast

    mylastggeast

    Joined:
    Jun 14, 2021
    Posts:
    41
    Hello!
    I have an Android project working with the PAD google plugin, and this morning I moved the project from 2020.3.14 to 2020.3.15, mainly to use the built-in PAD support instead of relying on the external google plugin.

    The documentation here is pretty straightforward: https://docs.unity3d.com/Manual/play-asset-delivery.html and I was able to build and deploy the .aab without the google PAD plugin, but here's the catch: I have many .mp4 files inside AssetBundles and they won't load anymore. Logcat says that:

    2021/08/03 11:11:28.489 17082 17136 Warn Unity AndroidVideoMedia::OpenExtractor could not translate archive:/CAB-da7e5cc2578a42415407da10d8bd2923/CAB-da7e5cc2578a42415407da10d8bd2923.resource to local file. Make sure the file exists, is on disk (not in memory), and not compressed.

    This is a well-known issue where videos in Asset Bundles need to be Uncompressed or many android devices won't load them.

    The Asset Bundles I build manually ARE set Uncompressed, but my guess is that when Unity bundles everything into a .assetpack (so, my AssetBundles from the StreamingAssets folder) it actually creates a compressed AssetBundle or more in general applies some sort of compression? If so, is there a way to control this type of compression?

    Thanks for your help!
     
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Files in asset packs are not compressed. Do you check that asset packs automatically created by Unity are downloaded before trying to load video files from asset bundles? If the asset packs are downloaded, please submit a bug report.
     
  3. mylastggeast

    mylastggeast

    Joined:
    Jun 14, 2021
    Posts:
    41
    Hello JuliusM! And thanks for the quick reply.

    I don't download asset packs, everything is bundled in the same .aab by default, so it gets the install-time policy automatically. The size is way below the 1GB threshold mentioned in the docs. If I open the .aab with Android Studio I can see the assets there, and all other assets (texture, sounds, prefabs, scriptable objects, etc) get loaded properly at runtime. It's only videos and only on Android with this very specific error from logcat:

    2021/08/03 11:11:28.489 17082 17136 Warn Unity AndroidVideoMedia::OpenExtractor could not translate archive:/CAB-da7e5cc2578a42415407da10d8bd2923/CAB-da7e5cc2578a42415407da10d8bd2923.resource to local file. Make sure the file exists, is on disk (not in memory), [B]and not compressed.[/B]
     
  4. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    I see. Could you submit a bug report with a small project which would allow our QA to reproduce the issue? Please paste the issue ID in this thread as well, so that I could track it right away.
    Edit: just in case, here are instructions on how to submit a bug report https://unity3d.com/unity/qa/bug-reporting
     
  5. mylastggeast

    mylastggeast

    Joined:
    Jun 14, 2021
    Posts:
    41
    Thanks for the update! I will try to create a demo project to replicate the issue and report back
     
    JuliusM likes this.
  6. LilMako17

    LilMako17

    Joined:
    Apr 10, 2019
    Posts:
    43
    Any update on this? I just ran into the same issue. I'm using Unity 2019.4.17f1. Videos from uncompressed asset bundles via streaming assets load fine when built as an APK, but i get the same loading error described above when building an AAB.
     
  7. mylastggeast

    mylastggeast

    Joined:
    Jun 14, 2021
    Posts:
    41
  8. Sigono-Unity4

    Sigono-Unity4

    Joined:
    Aug 27, 2020
    Posts:
    11
    Also getting the following errors right now after using Play Asset Delivery, right after all core Unity assetpacks are downloaded, and our Splash screen .mp4 should play:

    AndroidVideoMedia::OpenExtractor could not translate sharedassets0.resource to local file. Make sure file exists, is on disk (not in memory) and not compressed.
    AndroidVideoMedia: Error opening extractor: -10004

    We're on Unity 2020.3.35f1 for this project. Any ideas?