androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.72k stars 413 forks source link

Transport stream H264 video track not playable due to missing AUD NAL units #1908

Closed spiricn closed 22 hours ago

spiricn commented 2 days ago

Version

Media3 main branch

More version details

Video track produces no frames for decoding.

Upon deeper investigation of H264Reader#endNalUnit it seems that outputSample branch is never executed.

The stream does not contain any AUD NAL units, and neither is detectAccessUnits set to true.

The NAL units in the stream are as follows:

SPS -> PPS -> SEI -> IDR -> NON_IDR -> NON_IDR etc.

Devices that reproduce the issue

Galaxy Samsung S23

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Play attached media

Expected result

Both audio and video plays correctly

Actual result

Only audio plays, without video ; even though video track is detected

Media

https://hospitality-dev.codemeup.net/images/spiric-test/224.0.121.4_1510.ts

Bug Report

icbaker commented 22 hours ago

The stream does not contain any AUD NAL units, and neither is detectAccessUnits set to true.

You can set FLAG_DETECT_ACCESS_UNITS for this: https://developer.android.com/media/media3/exoplayer/troubleshooting#why-do-some-mpeg-ts-files-fail-to-play