Open LSDsl opened 4 years ago
It seems the problem comes from the TS file. This file has an H.264 video stream and an MP2 audio stream.
The video stream should be supported. I will investigate why this specific video is not played.
To play the audio stream, you should use the FFMEG ExoPlayer extension (see Supported formats page).
You should check out the FAQ: Why do some MPEG-TS files fail to play?.
This content has AUD NAL units but doesn't have IDR frames. Setting the flag FLAG_ALLOW_NON_IDR_KEYFRAMES fixes the issue (see HlsMediaSource.Factory.setExtractorFactory() and DefaultHlsExtractorsFactory).
Not it work (with FLAG_ALLOW_NON_IDR_KEYFRAMES ). But may be better add some help info in logs in this situation? Ty
@kim-vde @AquilesCanta - The flags might remain useful to force certain behaviours on, but would it be possible to do something more intelligent by default so that specifying the flags is required for fewer cases?
For example, I suspect that we could have a default behaviour where we start off detecting access units the expensive way, and switch to the cheap way as soon as we see an AUD in the stream. This would make FLAG_DETECT_ACCESS_UNITS
unnecessary, except in weird edge cases where there are some AUDs, but they're not everywhere they should be, which I doubt this ever happens. It might be possible to do something similar for FLAG_ALLOW_NON_IDR_KEYFRAMES
as well.
I think it should indeed be feasible. I'll mark the issue as an enhancement to keep track of this improvement.
I think the DETECT_ACCESS_UNITS flag can be removed using the following rules:
Re allowing non-idr sync frames, the number of reported issues decreased (I think) with the introduction of the detection of the random access indicator. But after some research I haven't found a way of avoiding the allowing of non-IDR key frames for the provided stream, which doesn't seem to include any TS-level information about sync frames.
Hello , Do you have an ETA for enhancement to reduce the usage of FLAG_ALLOW_NON_IDR_KEYFRAMES and FLAG_DETECT_ACCESS_UNITS? Thanks
I am afraid not. All I can say is that we haven't planned to work on that in the following months.
@kim-vde Just checking if it's possible to add this feature request?
I am afraid we still don't have plans to work on this in the near future. What you can do is implement the fix in a pull request and we will look at it.
An update to this? This seems to effect tuners like https://www.silicondust.com are using for mpeg-ts, I have finally figured out that its exoplayer being the root cause!
Worth note that its randomly whenever it keeps getting in endless buffering state with black screen.
If any dev's need samle let us know :)
Demo app show buffering progress, length of video and show progress during play. But all this with black screen.
test file http://212.237.34.148/test.ts test hls http://212.237.34.148/test2.m3u8