Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Addressable videos not working on Android

Discussion in 'Addressables' started by rmuk, Nov 26, 2018.

  1. rmuk

    rmuk

    Joined:
    Feb 18, 2015
    Posts:
    37
    I have a mobile project (both iOS/Android) and I recently tried moving all of the video assets we have over to addressables. On iOS builds they play just fine, however on Android they do not load. I am seeing the following error:
    AndroidVideoMedia::OpenExtractor could not translate archive:/CAB-5ac6a43aade2e32bbe0b94c06f8a0126/CAB-5ac6a43aade2e32bbe0b94c06f8a0126.resource to local file. Make sure file exists, is on disk (not in memory) and not compressed.


    Right below that is this:
    AndroidVideoMedia: Error opening extractor: -10004


    Here is the code used to load the video:
    public void loadVideo(string imagePath)
    {
    Addressables.LoadAsset<VideoClip>(imagePath).Completed += onLoadDone;
    }

    private void onLoadDone(UnityEngine.ResourceManagement.IAsyncOperation<VideoClip> obj)
    {
    GetComponent<VideoPlayer>().clip = obj.Result;
    }



    Some other bits of info:
    - The file plays perfectly if i just include it in the project and don't use it with addressables
    - The file is HEVC
     
  2. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    1,013
    Thanks for the info, I've filed a bug in our system about this.
     
  3. rmuk

    rmuk

    Joined:
    Feb 18, 2015
    Posts:
    37
    Thanks! Is this on a public bug tracker so that I can just watch that page for updates, or is it internal only?
     
  4. MrCool92

    MrCool92

    Joined:
    Jul 13, 2015
    Posts:
    16
    This is because videos are inside compressed bundle and should not be... Just put them in streaming assets and stream them via url or uncompressed bundle.

    Tip: enable send ready events of video player, subscribe to on frame ready and enable video canvas to avoid "last video frame" bug.

    edit: correcting myself.. this behavior is not a bug.
     
    Last edited: Apr 26, 2019
  5. Piflik

    Piflik

    Joined:
    Sep 11, 2011
    Posts:
    248
    I get the same error with videos I try to load from the disk (not part of the apk, nor in an asset bundle or in streaming assets, just a video file in /storage/emulated/0/BUNDLE_IDENTIFIER).
     
  6. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    262
    MrCool92 likes this.
  7. vzlomvl

    vzlomvl

    Joined:
    Jun 25, 2016
    Posts:
    38
    Hi @unity_bill
    I have similar error on Android with loading of the Video from Addressable with Uncompressed remote group. Adressable version 1.6.2.
    Unity version 2018.4.17.
    Android version 9.0
    Do you have plan to fix this issue in upcoming releases? And if not, are there any workarounds for loading video from addressable remote group on Android?
    Thanks.
     
  8. vzlomvl

    vzlomvl

    Joined:
    Jun 25, 2016
    Posts:
    38
    JFYI error message is the same:
    AndroidVideoMedia::OpenExtractor could not translate archive:/CAB-0e93fe237ec0f897d04b37ebb9d6d416/CAB-0e93fe237ec0f897d04b37ebb9d6d416.resource to local file. Make sure file exists, is on disk (not in memory) and not compressed.
    AndroidVideoMedia: Error opening extractor: -10004
     
  9. florinel2102

    florinel2102

    Joined:
    May 21, 2019
    Posts:
    24
    For anyone who has the same issue caused by addresable system , try to build addressable (window->asset managment -> addresable -> build -> new build -> default build script) before exporting.
     
  10. Dev_HNK

    Dev_HNK

    Joined:
    Feb 5, 2020
    Posts:
    1
    The following settings worked for me:

    - Turn off Cache Compression in script: Caching.compressionEnabled = false;
    - Set Assetpack Compression to None
     
    Last edited: Sep 3, 2020
unityunity