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

Problems using RTSP #11160

Closed
Darthsandr opened this issue May 12, 2023 · 5 comments
Closed

Problems using RTSP #11160

Darthsandr opened this issue May 12, 2023 · 5 comments

Comments

@Darthsandr
Copy link

I'm trying to use the rtsp extension in an android app but I have a problem and I get a black screen without an explicit error.
My video url is rtsp://myserver:port/live/test?t=pippo
Watching streaming server's logs I see that, during the SETUP phase, the exoplayer client send this url rtsp://myserver:port/live/test/trackID=1?t=pippo while trying the same url with VLC during the same phase the streaming server logs rtsp://myserver:port/live/test/trackID=1 (whitout query parameter of the original url)
Is it possible to remove the query parameter in the url sent by exoplayer client for the SETUP session with the streaming server?

I'm using this code

val mediaitem = MediaItem.fromUri(Uri.parse(videoUrl))
val mediaSource = RtspMediaSource.Factory().setForceUseRtpTcp(true).setTimeoutMs(10000)
.createMediaSource(mediaItem)
mediaSource.addEventListener(mainHandler, mediaSourceEventListener)
player?.repeatMode = repatMode
player?.setMediaSource(mediaSource ,true)
player?.prepare()

Thanks for the response

@microkatz
Copy link
Contributor

Hello @Darthsandr,

Would you be able to provide the responses to the RTSP Describe message that your server is providing?

Also would you be able to provide a bug reports so we can review the logs? You can either attach them to this github issue or send them to [email protected] using a subject in the format "Issue #11160". Please also update this issue to indicate you've done this.

@Darthsandr
Copy link
Author

Hello this is the flow between Exoplayer and our streaming servers.
We have not an error in the player but the screen remains black.

Exoplayer
OPTIONS rtsp://myserver:port/live/test/cfc4257f-523f-4081-b2ac-efee33efe264-af7d354a-9cf2-47c7-a4be-ac794e653252?t=pippo RTSP/1.0
User-Agent: ExoPlayerLib/2.18.5
CSeq: 0

Streaming Server
RTSP/1.0 200 OK
CSeq: 0
Server: Wowza Streaming Engine 4.8.20+1 build20220919162035
Cache-Control: no-cache
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS, ANNOUNCE, RECORD, GET_PARAMETER
Supported: play.basic, con.persistent

Exoplayer
DESCRIBE rtsp://myserver:port/live/test/cfc4257f-523f-4081-b2ac-efee33efe264-af7d354a-9cf2-47c7-a4be-ac794e653252?t=pippo RTSP/1.0
User-Agent: ExoPlayerLib/2.18.5
CSeq: 1

Streaming server
RTSP/1.0 200 OK
CSeq: 1
Server: Wowza Streaming Engine 4.8.20+1 build20220919162035
Cache-Control: no-cache
Expires: Thu, 11 May 2023 17:36:55 CEST
Content-Length: 640
Content-Base: rtsp://myserver:port/live/test/cfc4257f-523f-4081-b2ac-efee33efe264-af7d354a-9cf2-47c7-a4be-ac794e653252/
Date: Thu, 11 May 2023 17:36:55 CEST
Content-Type: application/sdp
Session: 113644209;timeout=60

v=0
o=- 113644209 113644209 IN IP4 127.0.0.1
s=cfc4257f-523f-4081-b2ac-efee33efe264-af7d354a-9cf2-47c7-a4be-ac794e653252
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
a=range:npt=now-
a=control:*
m=audio 0 RTP/AVP 96
a=rtpmap:96 mpeg4-generic/48000/2
a=fmtp:96 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=119056e500
a=control:trackID=1
m=video 0 RTP/AVP 97
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;profile-level-id=42C028;sprop-parameter-sets=Z0LAKNkAeAIn5YQAAAMABAAAAwDAPGDJIA==,aMuDyyA=
a=cliprect:0,0,1088,1920
a=framesize:97 1920-1088
a=framerate:24.0
a=control:trackID=2

Exoplayer
SETUP rtsp://myserver:port/live/test/cfc4257f-523f-4081-b2ac-efee33efe264-af7d354a-9cf2-47c7-a4be-ac794e653252/trackID=2?t=pippo RTSP/1.0
User-Agent: ExoPlayerLib/2.18.5
CSeq: 2
Transport: RTP/AVP/TCP;unicast;interleaved=2-3

Streaming server
RTSP/1.0 200 OK
CSeq: 2
Server: Wowza Streaming Engine 4.8.20+1 build20220919162035
Cache-Control: no-cache
Expires: Thu, 11 May 2023 17:36:55 CEST
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
Date: Thu, 11 May 2023 17:36:55 CEST
Session: 113644209;timeout=60

Exoplayer
SETUP rtsp://myserver:port/live/test/cfc4257f-523f-4081-b2ac-efee33efe264-af7d354a-9cf2-47c7-a4be-ac794e653252/trackID=1?t=pippo RTSP/1.0
User-Agent: ExoPlayerLib/2.18.5
CSeq: 3
Session: 113644209
Transport: RTP/AVP/TCP;unicast;interleaved=0-1

Streaming server
RTSP/1.0 200 OK
CSeq: 3
Server: Wowza Streaming Engine 4.8.20+1 build20220919162035
Cache-Control: no-cache
Expires: Thu, 11 May 2023 17:36:55 CEST
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Date: Thu, 11 May 2023 17:36:55 CEST
Session: 113644209;timeout=60

Exoplayer
PLAY rtsp://myserver:port/live/test/cfc4257f-523f-4081-b2ac-efee33efe264-af7d354a-9cf2-47c7-a4be-ac794e653252?t=pippo RTSP/1.0
User-Agent: ExoPlayerLib/2.18.5
CSeq: 4
Session: 113644209
Range: npt=0.000-

Streaming server
RTSP/1.0 200 OK
RTP-Info: url=trackID=1;seq=1;rtptime=119987712,url=trackID=2;seq=1;rtptime=224976960
CSeq: 4
Server: Wowza Streaming Engine 4.8.20+1 build20220919162035
Cache-Control: no-cache
Range: npt=now-
Session: 113644209;timeout=60

tonihei pushed a commit to androidx/media that referenced this issue May 25, 2023
@microkatz
Copy link
Contributor

microkatz commented May 25, 2023

@Darthsandr

Thank you for reporting your issue! A fix has been submitted to the main branch of androidx/media that should solve your problem. Eventually the fix will be brought into the release branch. Here is a link to the commit. Hopefully this helps!

tonihei pushed a commit that referenced this issue May 25, 2023
Issue: #11160

#minor-release

PiperOrigin-RevId: 534896789
@Darthsandr
Copy link
Author

Hi
Thanks for the fix
Actually I'm using these implemenmtations:

implementation 'androidx.core:core-ktx:1.9.0'
implementation 'com.google.android.exoplayer:exoplayer-rtsp:2.18.5'

need I to update the version of these libraries?

tof-tof pushed a commit to androidx/media that referenced this issue May 30, 2023
Issue: google/ExoPlayer#11160

#minor-release

PiperOrigin-RevId: 534896789
(cherry picked from commit 85f83b1)
tof-tof pushed a commit that referenced this issue Jun 14, 2023
Issue: #11160

#minor-release

PiperOrigin-RevId: 534896789
(cherry picked from commit b72ef3e)
@Darthsandr
Copy link
Author

I updated Exoplayer lib but it's still not working; need I the update of android:media lib? Actualy I'm using the androidx.media:media:1.6.0

@google google locked and limited conversation to collaborators Jul 25, 2023
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

3 participants