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

for some strream length returned stay at 0 #1231

Closed
kodeplateform opened this issue May 17, 2024 · 3 comments
Closed

for some strream length returned stay at 0 #1231

kodeplateform opened this issue May 17, 2024 · 3 comments
Labels

Comments

@kodeplateform
Copy link

Hello,

Thanks for your library.

I use it in combination with Jetpack Compose Multiplatform on the desktop side. I'm facing a problem with the length (duration) of streams. For some streams, the length returned by lengthChanged(mediaPlayer: MediaPlayer, newLength: Long) is 0, and the same issue occurs with val duration = mediaPlayer.media().info().duration(), even if it is called after the stream has started to play.

For info , on android side , i'm able to get the correct duration with exoplayer

@caprica
Copy link
Owner

caprica commented May 17, 2024

If the length is reported at 0, then that's what VLC thinks the length is, vlcj just tells you what VLC says the length is.

So the reality is I'm afraid nothing can be done in vlcj to resolve this.

What might be interesting if you use VLC on Android, do you see a non-zero length reported?

(Presumably this is not a live-stream or something with no known end?)

@kodeplateform
Copy link
Author

Hello,

Thanks for your response.

Indeed, when using VLC Player, the duration is not displayed, but interestingly, the progress bar works for tracking the advancement and allows jumping directly to a specific position in the video.

@caprica caprica changed the title for some strream lenght returned stay at 0 for some strream length returned stay at 0 May 18, 2024
@caprica
Copy link
Owner

caprica commented Jun 4, 2024

I really don't think there's anything can be "fixed" in vlcj here, so closing issue. It can be reopened if new information comes to light.

@caprica caprica closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants