Description
Version
Media3 1.1.1
More version details
No response
Devices that reproduce the issue
tested on several emulators (Android Studio Emulator, MUMU12) and Redmi Note 8T
RTSP source: 70MAI Dash Cam A800S
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
according to rfc2326, the second parameter in "Session" in the response header is a timeout:
Session = "Session" ":" session-id [ ";" "timeout" "=" delta-seconds ]
The timeout parameter is only allowed in a response header. The
server uses it to indicate to the client how long the server is
prepared to wait between RTSP commands before closing the session due
to lack of activity (see Section A). The timeout is measured in
seconds, with a default of 60 seconds (1 minute).
it is this timeout that must be used when creating androidx.media3.exoplayer.rtsp.RtspClient.KeepAliveMonitor instead of androidx.media3.exoplayer.rtsp.RtspClient.DEFAULT_RTSP_KEEP_ALIVE_INTERVAL_MS = 30_000.
this will allow to use servers that have a session timeout of less than 30 seconds, such as DVRs.
Expected result
video plays for a long time
Actual result
playback stops after 3 seconds
Media
video stream from 70MAI Dash Cam A800S
SETUP rtsp://192.168.10.1/liveRTSP/av4/track1 RTSP/1.0
User-Agent: ExoPlayerLib/2.19.1
CSeq: 2
Transport: RTP/AVP;unicast;client_port=53426-53427
RTSP/1.0 200 OK
CSeq: 2
Date: Tue, Sep 19 2023 18:36:32 GMT
Transport: RTP/AVP;unicast;destination=192.168.10.10;source=192.168.10.1;client_port=53426-53427;server_port=6970-6971
Session: 60D9C7BC;timeout=3
Bug Report
- You will email the zip file produced by
adb bugreport
to [email protected] after filing this issue.