androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.72k stars 413 forks source link

Screen Casting,miracast wifi-direct,player rtsp uri by exoplayer,throw Caused by: java.io.IOException: DESCRIBE not supported #1874

Open rooony opened 1 week ago

rooony commented 1 week ago

Version

Media3 1.4.1

More version details

release media3 1.4.1

Devices that reproduce the issue

Must appear, all devices

Devices that do not reproduce the issue

Must appear, all devices

Reproducible in the demo app?

No

Reproduction steps

screen casting by miracast, wifi direct source: android 14 sink: android 10

  1. wifi direct
  2. two devices are connected via wifi-direct
  3. start playing after get ip and port by wifi-direct, uri: rtsp://ip:port
private void play() {
        PlayerView playerView = findViewById(R.id.playerview);
        ExoPlayer exoPlayer = new ExoPlayer.Builder(this).build();
        playerView.setPlayer(exoPlayer);
        exoPlayer.setMediaItem(MediaItem.fromUri(Uri.parse("rtsp://192.168.49.17:7236")));
        exoPlayer.prepare();
        exoPlayer.play();
    }

throw Caused by: java.io.IOException: DESCRIBE not supported

Expected result

Screen casting successful

Actual result

screenshot-20241111-155539

Playback error androidx.media3.exoplayer.ExoPlaybackException: Source error at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:736) at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:712) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: java.io.IOException: DESCRIBE not supported. at androidx.media3.exoplayer.rtsp.RtspMediaPeriod$InternalListener.onSessionTimelineRequestFailed(RtspMediaPeriod.java:697) at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.onOptionsResponseReceived(RtspClient.java:709) at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspResponse(RtspClient.java:627) at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:527) at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener.lambda$onRtspMessageReceived$0$androidx-media3-exoplayer-rtsp-RtspClient$MessageListener(RtspClient.java:520) at androidx.media3.exoplayer.rtsp.RtspClient$MessageListener$$ExternalSyntheticLambda0.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214)  at android.os.HandlerThread.run(HandlerThread.java:67) 

screenshot-20241112-101500

screenshot-20241112-101919

Can DESCRIBE be set as optional? Handling non-standard rstp responses

Or there may be other reasons

Media

none

Bug Report

microkatz commented 1 day ago

@rooony

Thank you for reporting your issue! Is the problem that your server does support DESCRIBE but provides a non-empty RTSP OPTIONS response without DESCRIBE? Or is it that your server does not support DESCRIBE at all?