ElectraPlayer can't play any video on Pixel 2 device

Videos don’t play on the Google Pixel 2 device, just a black screen.

Tried many video options (different resolutions, different containers, fast start, etc), but none of them played on Pixel 2. In the log, you can find such an error:

LogElectraPlayerPlugin: [0x6d527b3100] IMediaPlayer::Open: Options@0x6d5161ba68

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] IMediaPlayer::Open(file://../../../VideoTest/Content/Movies/test_video.mp4)

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Opening stream at “file://../../../VideoTest/Content/Movies/test_video.mp4”

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Received master playlist from “file://../../../VideoTest/Content/Movies/test_video.mp4”

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Received initial stream playlists

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Found 1280 * 720 video stream at bitrate 1226980

LogElectraPlayerPlugin: [0x6d527b3100] IMediaControls::SetRate(1.000000)

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Initial buffering starts

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Player switched video quality to 1226980 bps from 0 bps. 0 upswitches, 0 downswitches (0 drastic ones)

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Initial buffering ended after 0.034s

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Player starts prerolling to warm decoders and renderers

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Playback paused at play position 0.000

LogElectraPlayer: Error: [0x6d2ac47a20][0x6d13df0850] ReportError: “error=1 in Video decoder: code 4, “Failed to initialize decoder”; platform message “1 (0x00000001)””

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] IMediaPlayer::Close()

LogElectraPlayer: [0x6d2ac47a20][0x6d13df0850] Playback stopped. Last play position 0.000

According to Snapdragon 835 specs, it should be able to play video up to 2160p [Content removed] VP9

Sample RickRoll video with the same parameters attached.

Steps to Reproduce
Engine: Unreal Engine 5.3.2 from Launcher

Project: Third Person mobile project

Plugins: ElectraPlayer plugin and all plugins that depend on it

Steps to reproduce:

  1. Create Material, Media Texture, Media Player, Media Source with a video, and choose ElectraPlayer for Android in platform overrides
  2. In the created material, create a Texture Sample, assign Media Texture there and connect it to Base Color
  3. In the Media Texture, assign the created Media Player
  4. Drop the basic plane mesh on a scene, it will be our “screen”, assign the created material there
  5. In the level blueprint, create a variable of Media Player type and assign our created Media Player asset
  6. On BeginPlay run “Open Source” method, provide the MediaPlayer variable and select MediaSource as an asset to play
  7. Package project for Android and try to run on Pixel 2 (or similar device, but not sure if it’s reproducible somewhere else)
  8. Install and run the project on a device, the video won’t play

Hi Zetom_ZX,

This sounds like an issue with the underlying platform codec. Can you confirm which Android OS version is running on the device?

Best regards.

Thanks for the details Zetom,

We will try to track down an exact CL once we get our hands on a device that exhibits the same issue. We suspect the fix will likely come from Engine/Plugins/Media/ElectraCodecs/Source/ElectraDecoders/Private/Android/…

Best regards

Hi! Testable Pixel 2 has Android 11.

I’ve made additional checks and packaged an identical project with UE 5.5, and the video successfully plays there.

Thanks in advance)