Load VideoClip in assetbundle on Android

Hi,

I have some problem to get my assetloader work on Android. I try to load VideoClip from assetBundle. It works great on editor but when i try this small piece of code on Android I have this error in my logcat.

The code :

        videos = bundle.LoadAllAssets<VideoClip> ().ToList ();

        var go = new GameObject ();
        var player = go.AddComponent<VideoPlayer> ();
        player.renderMode = VideoRenderMode.CameraNearPlane;
        player.targetCamera = Camera.main;
        player.audioOutputMode = VideoAudioOutputMode.Direct;
        player.clip = videos [0];

The error :
[quote]
Failed to open file 'archive:/CAB-14b18b06cefe699b4e940ceb502b0591/CAB-14b18b06cefe699b4e940ceb502b0591.resource'. (No such file or directory)
[/quote]

Do i need to do some other work to get my videoClip on Android ?

Thanks in advance for your help

Blist

I got same problem too. Has solved it?

me too !!

1 Like

Hi,

I've send an issue to the unity team and this is the anwser :

Hey,

Thanks for reporting the issue.

In https://unity3d.com/jp/unity/whats-new/unity-5.6.0 release notes it says that this feature was not yet implemented. So it is expected behavior to throw an error. As for now, You can simply keep following up with newest unity releases and check if the feature was implemented in newest unity versions.

Regards,
Artūras
QA Team

In fact in the 5.6 release note :

The Android VideoPlayer cannot yet read videos from asset bundles.

I am sorry to hear that. I have been searching for 2 days.
is there any other soulution we can use?
thanks

Hi, I read on the video documentation draft that videos are now compatible with assetbundles (look attachment or documentation link).
Is this feature already confirmed with the current version or will it be scheduled in the next release?
3139056--238098--Schermata 2017-07-10 alle 16.01.13.png

Any Update on this ?
I try to load a movie from an assetBundle (The AssetBundle Loader is tried and tested).

When I try to load a movie I get the reference (I can see the VideoClip in inspector and get its info) but when I try to play it I get following error:
WindowsVideoMedia error 0xc00d36c3 while reading archive:/CAB-079738cb4484a886591221850bcc2bec/CAB-079738cb4484a886591221850bcc2bec.resource

Context: MFCreateSourceReaderFromURL
Error details: Das Schema der angegebenen URL wird nicht unterstützt.
Track types:

This is on Windows (Editor and Build)

5.6.2p4 videoplayer from bundle still does not work

2017.1.0p3 videoplayer from bundle does not work

5.6.3f1 videoplayer from bundle does not work

2017.2.0f3 videoplayer from AssetBundles still not working.

3 Likes

Does iOS also exist this problem?

Is this still an issue? And if yes is there any workaround?

EDIT: Does not work on v2017.2.0f3

Ye,same

Tested it on v2017.1.2p3 as well but it still doesnt work.
Same output:

AndroidVideoMedia OpenExtractor unable to open archive:/CAB-14baa5416d7d039303ccd3f472c5d1c1/CAB-14baa5416d7d039303ccd3f472c5d1c1.resource, error: 2
UnityEngine.Video.VideoPlayer:INTERNAL_CALL_Prepare(VideoPlayer)
UnityEngine.Video.VideoPlayer:Prepare() (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/modules/Video/VideoPlayerBindings.gen.cs:175)

  • Video: Fixed clip from asset bundle not played. (964652)

Some things in the patch notes of Unity 2017.2.1

I hope the Unity team will fix the problem as soon possible since many people are having issue with it.

Sigh, same issue here, and I'm using 2017.2.1. Video doesn't playback on android.

the same problem。not fixed in 2017.2.1
temp load from resources

I have the same problem too. And finally I found that we can use VideoPlayer's url to resolve this question.Download .mp4 file from remote url and save to persistentDataPath then set the path to VideoPlayer's url.This can work well on Android and IOS both.