-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[BUG]: HLS fallback (exoplayer) #4106
Comments
Thank you for your bug report. We will review it and get back to you if we need more information. There is a newer version of the library available. You are using version 6.4.3, while the latest stable version is 6.4.5. Please update to the latest version and check if the issue still exists.
|
Hey, Thanks for report - I will try look into it |
you should try to reproduce the debug enable, here your decoder cannot play the file (exception is expected), but the package should not allow to select this version of the video |
notice that we already set following flags in java code:
You may try to disable them, it is maybe the issue |
Here are the debug logs: logs
Exoplayer initially report that it can play the file and then fail. To be honest I don't know why this file can't be played, VLC can play it just fine. Is it because cpu decoding is not used as a fallback? |
I confirm what you are saying. initially the device says the format is supported, but afterward it fails to decode. 08-22 17:33:03.828 23950 29747 E ExoPlayerImplInternal: Playback error An interesting complementary test to do is to try playing this content directly in exoplayer sample. I will confirm if this is a react native video issue or an exoplayer issue ... As you use a pixel device, I assume this is not a device issue. |
Do you want me to send you the video file (if so where)? If you need to I can try with the exoplayer's demo but it might take me a bit of time to setup an android dev environment |
Testing with exoplayer demo would allow to identify if the issue is really a react native video issue... |
I do get the same error with the main demo. Sorry for the noise with this issue then. It seems exoplayer doesn't support software decoding fallback :c I think the |
Send me media to test. |
@zoriya I think you are right, To build ffmpeg you should start to build from source (see https://thewidlarzgroup.github.io/react-native-video/other/debug#debug-media3-build-from-media3-source) And you you want to document ffmpeg integration, the community will great you ! :) |
I opened an issue on media3's repo for hls auto switch: androidx/media#1656. You can find logs of the demo app there that were taken with this media https://drive.google.com/file/d/1boaFwlO5kTnpK6Wzg2kYaTHwvryr-Rl2/view?usp=drive_link I'm not convident about compiling media3 from scratch but this will be something I need so I'll try when media3 receive video decoding via ffmpeg. I also want to have native ass subtitles rendering via libass and I think I'd have to write an extension for media3 for that so I'll have to learn how extensions work at one point. PS: I'll close the issue, I don't think there's much to do in rnv side for now. Thanks for the help! |
@zoriya thank you for the update! |
@FongMi if you can write a doc on how to build with ffmpeg, it would be wonderful ! (Maybe just after build from source section?!) |
whaat? how did you do? I tested with the demo app using the Thank you so much for checking this! |
I suggest you use nextlib because it is simpler. |
nextlib looks like a separate implementation of ffmpeg, if my understanding is correct, androidx/media#1591 should bring feature parity to mainstream's exoplayer, right? if nextlib has other advantages, it might be nice to add an option to use it on rnv (it can't be the default due to license issues). Otherwise, I think I'll wait for the previous PR to get merged and try to enable ffmpeg directly here. |
I don't think media3 will merge this pr that quickly, and it may not even be merged at all. I suggest you use mpv because you want to use libass. |
using libmpv or libvlc seems way harder, especially with react-native. it would mean adding a new backend, which is a huge maintenance burden, unfortunately. |
Version
6.4.3
What platforms are you having the problem on?
Android
System Version
Android 14
On what device are you experiencing the issue?
Real device
Architecture
Old architecture
What happened?
I have a hls file containing multi-variant videos. One variant cannot be played on the device, but the others can. When exoplayers tries to load the incompatible variant, I get this error:
After getting this error, playback is aborted. I would expect exoplayer to fallback to another variant (since it can play the others). I can confirm that the others are playable, since the video play without issue if I remove the incompatible variant from the master.m3u8 file.
This is not the first time this issue was mentioned: #1598. The issue was closed because a workaround was found for this particular use case, but I don't see any obvious workaround there.
Reproduction Link
No response
Reproduction
I can either send a video file or a complete m3u8 zip, but since this is copyrighted media I probably should send it privately.
The text was updated successfully, but these errors were encountered: