You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android 5 emulator: the software H.264 decoder fails on the Lewei stream #268
Found while checking PR #267 (lewei://, #262). The 184 frames of the capture from #262, replayed from a fake toy, do not play on the API 21 emulator:
OMX.google.h264.decoder starts, then SoftAVC logs Decoder failed: -2, ACodec reports ERROR(0x80001001), and the app retries with a growing delay (Codec exception, retry in … ms).
The same build and the same frames play on the API 25 emulator with no codec errors, and ffmpeg decodes them without errors.
The stream is H.264 Main at 1280×720, 20 fps, with SPS and PPS every 2 s or so; the first frame after connecting can be a P frame, before any SPS.
Not known yet: whether this comes from the stream, from how the app starts the decoder on Android 5, or from the emulator's software decoder alone. The first step is to play another H.264 stream on the API 21 emulator; if that fails too, the Lewei stream is not the cause. No report from a real Android 5 device so far.
Cause found: the software decoder of the Android 5.0 emulator handles H.264 Baseline only, and the Lewei stream is not Baseline. This is not a bug in the app or in the Lewei transport.
media_codecs_google_video.xml in the API 21 image declares OMX.google.h264.decoder as ProfileBaseline : Level51.
The last two rows rule out how the app starts the decoder, and the P frame before the first SPS as well: frames wait for the full parameter set. The Main stream that plays has no CABAC or weighted prediction, so the limit is the coding tools, not the profile number. API 25 has a newer software decoder, which is why the same frames play there.
Not checked: a real Android 5 device. Those normally use a hardware decoder, so this result does not say how they behave. An attempt to play the files in the emulator's system player gave no result: Baseline failed there too, before any decoder started.
What remains: on a device with only this decoder, a Main stream shows no picture and the app keeps retrying with a growing delay, with no message about the reason.
Activity
compot-dev commentedon Nov 4, 2026
Cause found: the software decoder of the Android 5.0 emulator handles H.264 Baseline only, and the Lewei stream is not Baseline. This is not a bug in the app or in the Lewei transport.
media_codecs_google_video.xmlin the API 21 image declaresOMX.google.h264.decoderasProfileBaseline : Level51.entropy_coding_mode_flag= 1). Its SPS says Main (profile_idc77) withconstraint_set0_flag= 1, so it claims to be Baseline-compatible, which it is not.Each stream below went through the same app build and the same
lewei://path for 14 s on the API 21 emulator:Decoder failed: -2The last two rows rule out how the app starts the decoder, and the P frame before the first SPS as well: frames wait for the full parameter set. The Main stream that plays has no CABAC or weighted prediction, so the limit is the coding tools, not the profile number. API 25 has a newer software decoder, which is why the same frames play there.
Not checked: a real Android 5 device. Those normally use a hardware decoder, so this result does not say how they behave. An attempt to play the files in the emulator's system player gave no result: Baseline failed there too, before any decoder started.
What remains: on a device with only this decoder, a Main stream shows no picture and the app keeps retrying with a growing delay, with no message about the reason.
compot-dev commentedon Nov 4, 2026
Closing: this is a limit of the Android 5.0 emulator's software decoder, not a bug in the app. Reopen if a real device shows the same failure.