tuskyapp / Tusky

An Android client for the microblogging server Mastodon
https://tusky.app
GNU General Public License v3.0
2.42k stars 384 forks source link

Playback failed: Decoder failed: c2.qti.avc.decoder when trying to play inline video #4476

Open kenrestivo opened 1 month ago

kenrestivo commented 1 month ago

Detailed description

I get Playback failed: Decoder failed: c2.qti.avc.decoder when trying to play inline video on most videos on Tusky. Some do work though! But most do not.

If I download the video instead, and play it through the Android gallery app, it plays just fine. But not from within Tusky

Steps to reproduce the problem

  1. Scroll to a post that has video
  2. Click on it to play it
  3. First frame changes, then you see the attached image with the error signal-2024-05-27-195944
  4. Download the video instead, and play it through Android Gallery app, it works fine there, but not in tusky.

Debug information

Tusky 25.2

Device:

Google Pixel 3a Android version: 14 SDK version: 34

Account:

@bamfic@autonomous.zone Version: 4.2.8

connyduck commented 1 month ago

I thought this was fixed with https://github.com/tuskyapp/Tusky/pull/4360, but apparently not.

@kenrestivo Can you please link me one of posts where this occurs?

Zirias commented 1 month ago

I just had this happen to one of my own toots: https://mastodon.bsd.cafe/@zirias/112546709648558545

connyduck commented 1 month ago

I just had this happen to one of my own toots: https://mastodon.bsd.cafe/@zirias/112546709648558545

Which Android?

Zirias commented 1 month ago

Which Android?

In my case Android 14 (Xiaomi "HyperOS" 1.0.3.0)

edit: a few experimentation results: while my desktop browser (chromium/freebsd) plays the embedded vid just fine, chrome on this android fails as well. especially strange because same as described by the reporter, downloading the vid and playing it from the gallery works...

connyduck commented 1 month ago

Which Gallery app is that?

Zirias commented 1 month ago

Which Gallery app is that?

Xiaomi's System Gallery ... (com.miui.gallery)

Zirias commented 1 month ago

Another observation: This one plays fine in Tusky on the same phone: https://mastodon.bsd.cafe/@zirias/112552266260940365

Both are created with ffmpeg default options for writing mp4, the only difference is the framerate. 30fps works, 25fps fails.

connyduck commented 1 month ago

Can not reproduce unfortunately. Works on all my devices and an Android 14 emulator. Also it can't be a vendor specific bug if it affects both Xiaomi and Google 🤔

When searching the error message I find similar bugs, but we already applied the suggested fix https://github.com/tuskyapp/Tusky/pull/4360 😒

@cbeyls do you have an idea what else could be causing this?

cbeyls commented 1 month ago

This looks like a low-level bug in the decoder, ExoPlayer or the way they interact. Not much we can do about it, especially if it doesn't play in Chrome.

We could try to analyze the MP4 files in detail to watch the differences (encoding profile, max bitrate, type and ordering of atoms, ...)

Also, maybe we can provide an option in the settings to prefer software decoders over hardware decoders for problematic devices. Fallback to software decoders doesn't always work.

cbeyls commented 1 month ago

If it's network-related, we could also try to use Cronet as network transport for ExoPlayer instead of OkHttp and see if the result is the same. But first I need to find a device to reproduce the error.

kenrestivo commented 4 weeks ago

I thought this was fixed with #4360, but apparently not.

@kenrestivo Can you please link me one of posts where this occurs?

Yes, https://mastodon.social/@flameReactor/112623359169750432 fails for me consistently.

FWIW, I've had a few recently that failed intermittently. But most that fail, do so every time.