Steps to reproduce
- Open Cloudstream on an Android TV device.
- Select any media link containing an AC3 or E-AC3 5.1 audio track.
- Observe that video runs completely smoothly, but audio constantly drops frames and stutters.
- Attempting to change to an external player or toggling standard passthrough settings on the TV does not fix the stuttering.
Expected behavior
The internal player engine should recognize hardware limitations or provide a mechanism to decode/downmix the AC3/E-AC3 audio stream entirely via software into stereo PCM, ensuring stable playback on hardware-constrained smart TVs.
Actual behavior
When playing streams that contain multi-channel AC3 or E-AC3 (Dolby 5.1) audio tracks on an Android TV device, the audio suffers from severe, rhythmic stuttering and skipping. The video stream itself plays completely smoothly with zero frame drops, indicating that this is exclusively an audio-sink processing bottleneck.
Attempting to route the stream to external players (like Just Player, VLC, MPV, or MX Player) fails to resolve the issue, as the underlying audio pipeline/extraction remains constrained by the initial internal player configuration. The exact same links play flawlessly on Android mobile devices, pointing to a severe optimization issue on low-power Android TV SoCs.
Cloudstream version and commit hash
4.7.0-PRE 2c03a3d
Android version
Android 8
Logcat
Other details
This is a device-specific capability mismatch involving the Android Media3 / ExoPlayer framework:
- The TV's firmware incorrectly reports native hardware decoding support for high-bitrate AC3/E-AC3 when queried via
AudioManager.getDirectProfilesForAttributes().
- ExoPlayer relies on this report and initializes a hardware audio track (
MediaCodecAudioRenderer).
- The budget TV processor hits a severe decoding/licensing bottleneck, leading to constant buffer underruns in the audio track sink, which manifests as rhythmic stuttering
Suggested Solutions / Feature Requests
To fix this compatibility roadblock for TV users, please consider exposing one of the following settings in the Player menu:
- Expose a Preference for Extension Decoders
Allow users to toggle EXTENSION_RENDERER_MODE_PREFER over platform decoders. Utilizing software-based extension decoders (like the ExoPlayer FFmpeg extension) to decode multi-channel audio to flat PCM stereo before it hits the TV's audio track sink would completely bypass buggy native hardware decoders.
- Manual Audio Capabilities Override
Implement an option to manually override or spoof AudioCapabilities inside the player configuration (similar to Plex or Kodi). Forcing a stereo-only profile to the DefaultAudioSink will stop ExoPlayer from trying to force broken hardware passthrough routes.
- Audio-Only Hardware Acceleration Toggle
Provide an internal player flag to force-disable hardware acceleration strictly for the audio track, delegating audio parsing entirely to software execution.
Acknowledgements
Steps to reproduce
Expected behavior
The internal player engine should recognize hardware limitations or provide a mechanism to decode/downmix the AC3/E-AC3 audio stream entirely via software into stereo PCM, ensuring stable playback on hardware-constrained smart TVs.
Actual behavior
When playing streams that contain multi-channel AC3 or E-AC3 (Dolby 5.1) audio tracks on an Android TV device, the audio suffers from severe, rhythmic stuttering and skipping. The video stream itself plays completely smoothly with zero frame drops, indicating that this is exclusively an audio-sink processing bottleneck.
Attempting to route the stream to external players (like Just Player, VLC, MPV, or MX Player) fails to resolve the issue, as the underlying audio pipeline/extraction remains constrained by the initial internal player configuration. The exact same links play flawlessly on Android mobile devices, pointing to a severe optimization issue on low-power Android TV SoCs.
Cloudstream version and commit hash
4.7.0-PRE 2c03a3d
Android version
Android 8
Logcat
Other details
This is a device-specific capability mismatch involving the Android
Media3/ExoPlayerframework:AudioManager.getDirectProfilesForAttributes().MediaCodecAudioRenderer).Suggested Solutions / Feature Requests
To fix this compatibility roadblock for TV users, please consider exposing one of the following settings in the Player menu:
Allow users to toggle
EXTENSION_RENDERER_MODE_PREFERover platform decoders. Utilizing software-based extension decoders (like the ExoPlayer FFmpeg extension) to decode multi-channel audio to flat PCM stereo before it hits the TV's audio track sink would completely bypass buggy native hardware decoders.Implement an option to manually override or spoof
AudioCapabilitiesinside the player configuration (similar to Plex or Kodi). Forcing a stereo-only profile to theDefaultAudioSinkwill stop ExoPlayer from trying to force broken hardware passthrough routes.Provide an internal player flag to force-disable hardware acceleration strictly for the audio track, delegating audio parsing entirely to software execution.
Acknowledgements