RTSP: can't open stream from OBS
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
ExoPlayer can't open RTSP stream from OBS Studio with "OBS-RTSP Server" plugin. Nothing happens, only these http headers appears in logcat:
```
RtspClient: OPTIONS rtsp://192.168.1.10:8554/live RTSP/1.0
RtspClient: User-Agent: ExoPlayerLib/2.18.2
RtspClient: CSeq: 0
RtspClient:
RtspClient: RTSP/1.0 200 OK
RtspClient: CSeq: 0
RtspClient: Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY
RtspClient: DESCRIBE rtsp://192.168.1.10:8554/live RTSP/1.0
RtspClient: User-Agent: ExoPlayerLib/2.18.2
RtspClient: CSeq: 1
RtspClient:
```
Can it be related to headers issue? (https://github.com/google/ExoPlayer/issues/10919)
VLC player opens the steam OK on desktop player and Android devices (both real device and emulator).
Repro:
Run OBS Studio 29.0.0 with OBS-RTSP Server plugin
https://github.com/iamscottxu/obs-rtspserver/releases
I'm using [v3.0.0-beta3](https://github.com/iamscottxu/obs-rtspserver/releases/tag/v3.0.0-beta3) which is required for OBS 29 on macOS.
I think stable version [2.3.0](https://github.com/iamscottxu/obs-rtspserver/releases/tag/v2.3.0) with previous versions of OBS will do same.
Run OBS, add anything to sources (I'm using macOS screen capture)
Set encoding in Settings - Output (I'm using H264 Hardware encoder, rescale to 720p, 5000 Kbps CBR, high profile)
Open Tools - RTSP Server, disable Multicast, press Start.
Try to open rtsp://192.168.1.10:8554/live in ExoPlayer (replace IP-address to yours):
```
ExoPlayer.Builder(requireContext())
.build()
.apply {
val mediaSource = RtspMediaSource.Factory()
.setDebugLoggingEnabled(true)
//.setForceUseRtpTcp(true)
.createMediaSource(MediaItem.fromUri("rtsp://192.168.1.10:8554/live"))
addListener(playerListener)
setVideoTextureView(view?.findViewById(R.id.live_texture_view))
setMediaSource(mediaSource)
prepare()
play()
}
```
Checked on Emulator running Android 11 (API 30) arm64-v8a and Tinkerboard S running Android 7 with ExoPlayer library 2.18.2
Contributor guide
Assessment
This issue has not been assessed yet.