Tusky icon indicating copy to clipboard operation
Tusky copied to clipboard

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

Open kenrestivo opened this issue 1 year ago • 11 comments

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:

@[email protected] Version: 4.2.8

kenrestivo avatar May 28 '24 03:05 kenrestivo

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?

connyduck avatar Jun 02 '24 06:06 connyduck

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

Zirias avatar Jun 02 '24 11:06 Zirias

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

Which Android?

connyduck avatar Jun 02 '24 12:06 connyduck

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...

Zirias avatar Jun 02 '24 14:06 Zirias

Which Gallery app is that?

connyduck avatar Jun 02 '24 15:06 connyduck

Which Gallery app is that?

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

Zirias avatar Jun 02 '24 16:06 Zirias

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.

Zirias avatar Jun 03 '24 11:06 Zirias

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?

connyduck avatar Jun 03 '24 19:06 connyduck

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 avatar Jun 03 '24 21:06 cbeyls

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.

cbeyls avatar Jun 03 '24 21:06 cbeyls

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.

kenrestivo avatar Jun 16 '24 03:06 kenrestivo