Navigation Menu

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

Exception when parse RTSP url like rtsp://10.1.58.192/stream/0?config.login=web #613

Closed
1 task
hoozh opened this issue Aug 26, 2023 · 3 comments
Closed
1 task
Assignees
Labels

Comments

@hoozh
Copy link

hoozh commented Aug 26, 2023

Version

ExoPlayer 2.19.1

More version details

No response

Devices that reproduce the issue

A tablet running android 7.1.2

Devices that do not reproduce the issue

VLC Android 3.5.4 on this tablet is OK

Reproducible in the demo app?

Yes

Reproduction steps

  1. Edit media.exolist.json
  2. Add rtsp url:
{
    "name": "RTSP",
    "samples": [
      {
        "name": "AVA Rbs",
        "uri": "rtsp://10.1.58.192/stream/0?config.login=web"
      }
    ]
  },
  1. Play this rtsp url in demo app

Expected result

play this rtsp video successfully

Actual result

demo app crashed:

14:38:34.485 androidx.media3.demo.main       D  loading [eventTime=43.95, mediaPos=0.00, window=0, period=0, true]
14:38:34.494 androidx.media3.demo.main       E  Playback error
                                                  androidx.media3.exoplayer.ExoPlaybackException: Source error
                                                      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:684)
                                                      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:660)
                                                      at android.os.Handler.dispatchMessage(Handler.java:98)
                                                      at android.os.Looper.loop(Looper.java:154)
                                                      at android.os.HandlerThread.run(HandlerThread.java:61)
                                                  Caused by: java.io.IOException: java.lang.IllegalArgumentException
                                                      at androidx.media3.exoplayer.rtsp.RtspMediaPeriod$InternalListener.onSessionTimelineRequestFailed(RtspMediaPeriod.java:689)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient.dispatchRtspError(RtspClient.java:322)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient.access$700(RtspClient.java:76)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspResponse(RtspClient.java:682)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:515)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.lambda$onRtspMessageReceived$0$androidx-media3-exoplayer-rtsp-RtspClient$MessageListener(RtspClient.java:508)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
                                                      at android.os.Handler.handleCallback(Handler.java:755)
                                                      at android.os.Handler.dispatchMessage(Handler.java:95)
                                                      at android.os.Looper.loop(Looper.java:154) 
                                                      at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                  Caused by: androidx.media3.exoplayer.rtsp.RtspMediaSource$RtspPlaybackException: java.lang.IllegalArgumentException
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspResponse(RtspClient.java:682) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:515) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.lambda$onRtspMessageReceived$0$androidx-media3-exoplayer-rtsp-RtspClient$MessageListener(RtspClient.java:508) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener$$ExternalSyntheticLambda0.run(D8$$SyntheticClass) 
                                                      at android.os.Handler.handleCallback(Handler.java:755) 
                                                      at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                      at android.os.Looper.loop(Looper.java:154) 
                                                      at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                  Caused by: java.lang.IllegalArgumentException
                                                      at androidx.media3.exoplayer.rtsp.RtspMessageUtil.parseMethodString(RtspMessageUtil.java:286)
                                                      at androidx.media3.exoplayer.rtsp.RtspMessageUtil.parsePublicHeader(RtspMessageUtil.java:389)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspResponse(RtspClient.java:618)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:515) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.lambda$onRtspMessageReceived$0$androidx-media3-exoplayer-rtsp-RtspClient$MessageListener(RtspClient.java:508) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener$$ExternalSyntheticLambda0.run(D8$$SyntheticClass) 
                                                      at android.os.Handler.handleCallback(Handler.java:755) 
                                                      at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                      at android.os.Looper.loop(Looper.java:154) 
                                                      at android.os.HandlerThread.run(HandlerThread.java:61) 
14:38:34.501 androidx.media3.demo.main       E  playerFailed [eventTime=43.96, mediaPos=0.00, window=0, period=0, errorCode=ERROR_CODE_IO_UNSPECIFIED
                                                  androidx.media3.exoplayer.ExoPlaybackException: Source error
                                                      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:684)
                                                      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:660)
                                                      at android.os.Handler.dispatchMessage(Handler.java:98)
                                                      at android.os.Looper.loop(Looper.java:154)
                                                      at android.os.HandlerThread.run(HandlerThread.java:61)
                                                  Caused by: java.io.IOException: java.lang.IllegalArgumentException
                                                      at androidx.media3.exoplayer.rtsp.RtspMediaPeriod$InternalListener.onSessionTimelineRequestFailed(RtspMediaPeriod.java:689)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient.dispatchRtspError(RtspClient.java:322)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient.access$700(RtspClient.java:76)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspResponse(RtspClient.java:682)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:515)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.lambda$onRtspMessageReceived$0$androidx-media3-exoplayer-rtsp-RtspClient$MessageListener(RtspClient.java:508)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
                                                      at android.os.Handler.handleCallback(Handler.java:755)
                                                      at android.os.Handler.dispatchMessage(Handler.java:95)
                                                      at android.os.Looper.loop(Looper.java:154) 
                                                      at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                  Caused by: androidx.media3.exoplayer.rtsp.RtspMediaSource$RtspPlaybackException: java.lang.IllegalArgumentException
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspResponse(RtspClient.java:682) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:515) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.lambda$onRtspMessageReceived$0$androidx-media3-exoplayer-rtsp-RtspClient$MessageListener(RtspClient.java:508) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener$$ExternalSyntheticLambda0.run(D8$$SyntheticClass) 
                                                      at android.os.Handler.handleCallback(Handler.java:755) 
                                                      at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                      at android.os.Looper.loop(Looper.java:154) 
                                                      at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                  Caused by: java.lang.IllegalArgumentException
                                                      at androidx.media3.exoplayer.rtsp.RtspMessageUtil.parseMethodString(RtspMessageUtil.java:286)
                                                      at androidx.media3.exoplayer.rtsp.RtspMessageUtil.parsePublicHeader(RtspMessageUtil.java:389)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspResponse(RtspClient.java:618)
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:515) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.lambda$onRtspMessageReceived$0$androidx-media3-exoplayer-rtsp-RtspClient$MessageListener(RtspClient.java:508) 
                                                      at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener$$ExternalSyntheticLambda0.run(D8$$SyntheticClass) 
                                                      at android.os.Handler.handleCallback(Handler.java:755) 
                                                      at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                      at android.os.Looper.loop(Looper.java:154) 
                                                      at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                ]

Media

URL like this:

rtsp://10.1.58.192/stream/0?config.login=web

Bug Report

@microkatz
Copy link
Contributor

@hoozh
Thank you for reporting your issue! It appears that your RTSP server returns a Public Header with a method name not in the spec list. Do you have custom RTSP commands for your server?

@hoozh
Copy link
Author

hoozh commented Sep 22, 2023

I don't know if there is RTSP commands for server, the rtsp server is running in a conference recording device

copybara-service bot pushed a commit that referenced this issue Sep 25, 2023
ExoPlayer will not fail playback if an RTSP server responds to the Options request with an unknown RTSP method request type. ExoPlayer will parse the response and just not call methods it does not know how to use.

Issue: #613
PiperOrigin-RevId: 568152076
copybara-service bot pushed a commit to google/ExoPlayer that referenced this issue Sep 25, 2023
ExoPlayer will not fail playback if an RTSP server responds to the Options request with an unknown RTSP method request type. ExoPlayer will parse the response and just not call methods it does not know how to use.

Issue: androidx/media#613
PiperOrigin-RevId: 568152076
@microkatz
Copy link
Contributor

Hello @hoozh,

I submitted a code fix, 916b4b0, into the androidx/media main branch that will hopefully address your issue. ExoPlayer will now ignore custom commands returned in the RTSP Options response. I'm going to close this issue. Please reopen or create a new issue if your are still having problems.

microkatz added a commit to hugohlln/media that referenced this issue Sep 29, 2023
ExoPlayer will not fail playback if an RTSP server responds to the Options request with an unknown RTSP method request type. ExoPlayer will parse the response and just not call methods it does not know how to use.

Issue: androidx#613
PiperOrigin-RevId: 568152076
@androidx androidx locked and limited conversation to collaborators Nov 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants