Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported Video Codec? #1083

Open
bee8bit opened this issue Nov 8, 2024 · 3 comments
Open

Unsupported Video Codec? #1083

bee8bit opened this issue Nov 8, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@bee8bit
Copy link

bee8bit commented Nov 8, 2024

Describe the bug
Repeatedly stumbled across toots with a video that won't play In the last few days. Instead a very technical error message appears:

Wiedergabe fehlgeschlagen: Decoder init failed: c2.qti.avc.decoder, Format(1, null, null, video/ avc, avc1.4D0033, -1, null, [2232, 1340, 56.39198, ColorInfo(BT709, Limited range, SDR SMPTE 170M, false, 8bit Luma, 8bit Chroma)], [-1, -1])

”Wiedergabe fehlgeschlagen“ is ”Playback failed in German.

I cannot tell if users have started posting videos in a new and unsupported format, if it is a bug in my version of Pachli, or if it is the fault of my new device (Moto g84 5G, Android 14).

To Reproduce
Steps to reproduce the behavior:

  1. Open https://front-end.social/@chriscoyier/113439004295620843 in Pachli
  2. Click on the video
  3. See an error message instead of a video

Expected behavior
The video plays (or, if that's beyond possible, I can find a helpful explanation. That is, for non-developers: File is corrupted; Codec is missing. See here to install; Android 1138 required; Device with special hardware required; ...)

Versions
Pachli Current 2.8.3+adc7060b

Device:
motorola moto g84 5G
Android-Version: 14
SDK-Level: 34

Account:
@[email protected]
Version: 4.3.1

Affirmation
I have checked other issues for this project (open and closed) and I cannot find one that matches the problem I am reporting.

@nikclayton
Copy link
Contributor

Thanks for the report.

Note to self: ViewVideoFragment has this:

            override fun onPlayerError(error: PlaybackException) {
                val message = getString(
                    R.string.error_media_playback,
                    error.cause?.message ?: error.message,
                )
                Snackbar.make(binding.root, message, Snackbar.LENGTH_INDEFINITE)
                    .setAction(app.pachli.core.ui.R.string.action_retry) { player?.prepare() }
                    .show()
            }

which preferentially shows the inner error message from cause. Changing that to just use error.message might provide a better error, which is worth trying.

@nikclayton nikclayton added the good first issue Good for newcomers label Nov 12, 2024
nikclayton added a commit that referenced this issue Nov 25, 2024
Previous code showed the error message for the underlying cause, which
might be too technical for the user. Prefer to use top level error
message; hopefully that is more actionable.

Contributes to #1083
nikclayton added a commit that referenced this issue Nov 25, 2024
Previous code showed the error message for the underlying cause, which
might be too technical for the user. Prefer to use top level error
message; hopefully that is more actionable.

Contributes to #1083
@nikclayton
Copy link
Contributor

Today's Pachli Current is going to include a change that prefers the "higher level" error message from the video player (if it exists). I'd be grateful if you could let me know if that provides better / more actionable information.

@bee8bit
Copy link
Author

bee8bit commented Nov 26, 2024

Thank you for the effort. The message is different now:

Wiedergabe fehlgeschlagen: MediaCodec VideoRenderer error, index=0, format-Format(1, null, null, video/ avc, avc1.4D0033, -1, null, [2232, 1340, 56.39198, ColorInfo(BT709, Limited range, SDR SMPTE 170M, false, 8bit Luma, 8bit Chroma)], [-1, -1]), format_su...

Well, that is still very technical. And now the message is cropped.
The last word might be something readable but right now it is not useful yet.

Idea:
What about a simple message like "Playback failed" (localized), followed by a "details" button/link/collapse_toggle that reveals the full details.
I suppose the exceptions themselves are too unpredictable or complex so it would be out of scope to translate them into anything understandable. We're talking about a mastodon client, not a video authoring tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Todo
Development

No branches or pull requests

2 participants