Search Issue Tracker

By Design

Votes

0

Found in

2021.3.41f1

2022.3.39f1

6000.0.12f1

Issue ID

UUM-76317

Regression

No

[Linux] .webm video files don't work when using the Android platform and transcoding the imported video

--

-

Reproduction steps:
1. Create a new project for a Standalone platform
2. Copy the “Video.webm” to the project Assets directory
3. In the Project view, select the “Video.webm” file
4. In the Inspector view, observe that you can play the video, and see the thumbnail
5. In the Inspector View, enable Transcode in the default settings
6. In the Inspector View, click Apply
7. Click File > Build Settings…
8. In the Build Settings window, select Android Platform and switch to it
9. In the Project View, select the “Video.webm” file
10. In the Inspector view, observe that you can’t play the video, and do not see the thumbnail
11. In the Console view, observe an error

Expected results: Video thumbnail is shown, and the video can be played on all Platforms
Actual results: Video thumbnail is not shown, and the video can’t be played on the Android Platform

Reproducible with: 2021.3.41f1, 2022.3.39f1, 6000.0.12f1

Reproducible on: Ubuntu 24.04, Ubuntu 22.04
Not reproducible on: Windows 10

Notes:
- Other Target Platforms may be affected, didn’t test all of them;
- Does not reproduce, when in the inspector, under default import settings, Transcode is not enabled
- Thrown errors in the console:
-- VideoClip import error for Assets/Video.webm. On Linux, import of VP8 movies (.webm extension) is supported.: selected target format is not supported on this editor platform
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
-- Movie encoding error […/Assets/Video.webm]:
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

  1. Resolution Note:

    The Linux Editor doesn't support H.264 encoding/decoding. So when transcoding a webm/VP8 movie file into mp4/H.264 (which is what the default behaviour does when transcoding for Android), you get the expected "Movie encoding error" message. The resulting asset is therefore not usable, which explains why playing back this content on Android will not be working.

    While transcoding to mp4/H.264 on Linux is not supported, one possible mitigation, if you want to have mp4/H.264 content in the build, is to put your mp4 file in StreamingAssets and set the VideoPlayer to point to it via URL (instead of via VideoClip). This will sidestep the editor limitation while allowing the build to have the wanted content. But this requires that you use an external application to transcode the webm/VP8 file into mp4/H.264. The Linux editor will still not be able to play this file - you may add logic to use a VP8 version in-editor as a workaround - but at least you can get the wanted content in the build.

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.