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

[BUG]: RTSP on android failed #4375

Open
DGonzo01 opened this issue Jan 15, 2025 · 4 comments
Open

[BUG]: RTSP on android failed #4375

DGonzo01 opened this issue Jan 15, 2025 · 4 comments

Comments

@DGonzo01
Copy link

DGonzo01 commented Jan 15, 2025

Version

6.9.1

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?

useExoplayerRtsp is enabled in build gradle, react-native version 0.73.11

RTSP, Video - H264, Audio - AAC

 <Video
            ref={videoRef}
            controls
            source={{
              uri: ' rtsp://localhost:8554/stream',
            }}
            style={{
              borderColor: 'red',
              borderWidth: 1,
              width: '100%',
              height: 400,
            }}
            onBuffer={e => console.log('onBuffer', e)}
            onError={e => console.log('onError', e)}
          />

After starting the application I get an error

 onError {"error": {"errorCode": "21004", "errorException": "androidx.media3.exoplayer.ExoPlaybackException: Source error", "errorStackTrace": "androidx.media3.exoplayer.ExoPlaybackException: Source error
	at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:736)
	at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:708)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loopOnce(Looper.java:230)
	at android.os.Looper.loop(Looper.java:319)
	at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: androidx.media3.datasource.HttpDataSource$HttpDataSourceException: Malformed URL
	at androidx.media3.datasource.okhttp.OkHttpDataSource.makeRequest(OkHttpDataSource.java:369)
	at androidx.media3.datasource.okhttp.OkHttpDataSource.open(OkHttpDataSource.java:262)
	at androidx.media3.datasource.DefaultDataSource.open(DefaultDataSource.java:275)
	at androidx.media3.datasource.StatsDataSource.open(StatsDataSource.java:86)
	at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1045)
	at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:421)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)
", "errorString": "ExoPlaybackException: ERROR_CODE_FAILED_RUNTIME_CHECK"}}

Reproduction Link

No response

Reproduction

Start the rtsp stream using both mediamtx and ffmpeg and run the code from the examples

@DGonzo01 DGonzo01 added the bug label Jan 15, 2025
Copy link

github-actions bot commented Jan 15, 2025

Previous bot comment (click to expand)

Thank you for your bug report. We will review it and get back to you if we need more information.

Copy link

Thank you for your bug report. We will review it and get back to you if we need more information.

@freeboub
Copy link
Collaborator

did you correctly enable rstp support in you gradle file or expo config ?

you should also try to force the rtsp type in source prop like in the sample:

  {
    description: 'rtsp big bug bunny',
    uri: 'rtsp://rtspstream:[email protected]/movie',
    type: 'rtsp',
  },

You should also try to reproduce the issue with the sample !

@freeboub
Copy link
Collaborator

Another clue would to try to update media3 with this configuration value in gradle file: RNVideo_media3Version !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants