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

Exoplayer can not play some HLS video stream just only playback audio #5108

Closed
chenwu80 opened this issue Nov 15, 2018 · 8 comments
Closed
Assignees

Comments

@chenwu80
Copy link

Issue description
I am facing an issue where my exoplayer can not playback H.264+AAC hls stream.It just has only sound track, can not be play video track.

Reproduction steps
Use the m3u8 Link http://119.36.240.18:8099/HLStest/Indeltestvod/index.m3u8 to playback please.
Exoplayer just only play audio sound.But when I used PC/Android side tools such as VLC app, it can be playback correctly.

I guess this issue maybe a compatibility issue. I traced the log , it can not recognized the video stream.

Link to test content http://119.36.240.18:8099/HLStest/Indeltestvod/index.m3u8
Also you can download zip file on http://file.yiyuen.com/detail.html?id=891 or
Indeltestvod.zip
include the log file and test stream clip. Our customer side is a live hls steam, I catched a clip and put in the zip file for sample.

Version of ExoPlayer being used
r.2.9.0 & 2.8.1

Device(s) and version(s) of Android being used
Tested on Xiaomi 6 Android 8.0.

Please let me know if there are any other inputs needed.

@surajm14
Copy link

Hi, we are facing same problem, MPEG 4 HD of resolution 1080p and 1920 cannot play in mobile, 720p plays fine.

We tried to set parameters in defaulttrackfactory by setvideosize to 1080, instead of default sdsize but it fails to take

@ojw28

This comment has been minimized.

@AquilesCanta
Copy link
Contributor

This stream works if you enable FLAG_ALLOW_NON_IDR_KEYFRAMES. You can do this by setting the flag when you create the DefaultHlsExtractorFactory. Something like:

DefaultHlsExtractorFactory defaultHlsExtractorFactory = 
    new DefaultHlsExtractorFactory(FLAG_ALLOW_NON_IDR_KEYFRAMES);
MediaSource mediaSource = 
    new HlsMediaSource.Factory(dataSourceFactory)
        .setExtractorFactory(defaultHlsExtractorFactory)
        .createMediaSource(uri);

Let me know if this does not work for you. Thanks!

@surajm14
Copy link

surajm14 commented Nov 28, 2018 via email

@AquilesCanta
Copy link
Contributor

From what I understand your issue is that
DefaultHlsExtractorFactory defaultHlsExtractorFactory = new DefaultHlsExtractorFactory(DefaultTsPayloadReaderFactory.FLAG_ALLOW_NON_IDR_KEYFRAMES); does not compile. Note that the DefaultHlsExtractorFactory constructor that takes the flags was added in 2.9.1.

If you don't want to upgrade your ExoPlayer version from 2.6.1 then you'll have to provide your own HlsExtractorFactory implementation that sets FLAG_ALLOW_NON_IDR_KEYFRAMES in the TsExtractor instantiation. Hope this helps.

@surajm14
Copy link

surajm14 commented Dec 6, 2018 via email

@AquilesCanta
Copy link
Contributor

Can you please file a new issue including all the information required in the issue template? Please don't skip any items.

ojw28 pushed a commit that referenced this issue Dec 18, 2018
Use random access indicator in transport streams

Issue:#1967
Issue:#2020
Issue:#2182
Issue:#2469
Issue:#2581
Issue:#2748
Issue:#2939
Issue:#2979
Issue:#3316
Issue:#3574
Issue:#3709
Issue:#3747
Issue:#4103
Issue:#4184
Issue:#4355
Issue:#4538
Issue:#4719
Issue:#4861
Issue:#4925
Issue:#4951
Issue:#5108
Issue:#5186
PiperOrigin-RevId: 225798044
ojw28 pushed a commit that referenced this issue Dec 19, 2018
Use random access indicator in transport streams

Issue:#1967
Issue:#2020
Issue:#2182
Issue:#2469
Issue:#2581
Issue:#2748
Issue:#2939
Issue:#2979
Issue:#3316
Issue:#3574
Issue:#3709
Issue:#3747
Issue:#4103
Issue:#4184
Issue:#4355
Issue:#4538
Issue:#4719
Issue:#4861
Issue:#4925
Issue:#4951
Issue:#5108
Issue:#5186
PiperOrigin-RevId: 225798044
@surajm14
Copy link

surajm14 commented May 3, 2019 via email

@google google locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants