google / google/ExoPlayer

App does not stream RTSP - missing line on RTSP Server response - how to suppress

Open
#9,931 6 comments 0 reactions 1 assignee Claimed by @claincly View on GitHub
question
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I'm working with a non-compliant RTSP server, but I really want to use Exo libs. I want to know a way to suppress the following issue on my camera response:

App will try to play:
```
D/RtspClient: PLAY rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 4
Session: 2tgy24fmtzkfnz25hne2caa4
Range: npt=0.000-
```
And here is the incomplete response:
```
D/RtspClient: RTSP/1.0 200 OK
CSeq: 4
Date: 1 1 1970 1:58:36 GMT
Session: 2tgy24fmtzkfnz25hne2caa4
```

This missing line causes the app to raise an exception: "Server did not provide timing for track".

As the issue #9664 suggests, I commented the lines 515-520 from `RtspMediaPeriod`, but I can't play my stream yet. The following happens:

```
D/RtspClient: DESCRIBE rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 1
I/Adreno: QUALCOMM build : c4b610c, Ib931e1538c
Build Date : 01/15/18
OpenGL ES Shader Compiler Version: EV031.22.00.01
Local Branch :
Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.6.4.R1.08.00.00.309.051
Remote Branch : NONE
Reconstruct Branch : NOTHING
I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib64/hw/gralloc.msm8998.so from the current namespace instead.
I/Adreno: PFP: 0x005ff087, ME: 0x005ff063
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 2
I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib64/hw/gralloc.msm8998.so from the current namespace instead.
D/RtspClient: RTSP/1.0 200 OK
CSeq: 1
Date: 1 1 1970 1:58:35 GMT
Content-Base: rtsp://192.168.99.1/media/stream2/
Content-Type: application/sdp
Content-Length: 522

v=0
o=- 0 0 IN IP4 127.0.0.1
s=media/stream2
i=A Seminar on the session description protocol
c=IN IP4 0.0.0.0
t=0 0
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=000042;sprop-parameter-sets=Z01AKZZUBQHsgA==,aO44gA==
a=framerate:30
a=control:stream=0
m=audio 0 RTP/AVP 97
a=rtpmap:97 MPEG4-GENERIC/11025/1
a=fmtp:97 streamtype=5;profile-level-id=15;mode=AAC-hbr;config=1508;sizeLength=13;indexLength=3;indexDeltaLength=3;constantDuration=1024
a=control:stream=1
W/AudioCapabilities: Unsupported mime audio/dts
W/VideoCapabilities: Unrecognized profile 65536 for video/avc
Unrecognized profile 2130706433 for video/avc
Unrecognized profile 524288 for video/avc
Unrecognized profile 2130706434 for video/avc
W/VideoCapabilities: Unrecognized profile 65536 for video/avc
Unrecognized profile 2130706433 for video/avc
Unrecognized profile 524288 for video/avc
Unrecognized profile 2130706434 for video/avc
W/VideoCapabilities: Unrecognized profile 65536 for video/avc
Unrecognized profile 2130706433 for video/avc
Unrecognized profile 524288 for video/avc
Unrecognized profile 2130706434 for video/avc
W/VideoCapabilities: Unsupported mime video/mp4v-esdp
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
W/VideoCapabilities: Unrecognized profile 65536 for video/avc
Unrecognized profile 2130706433 for video/avc
Unrecognized profile 524288 for video/avc
Unrecognized profile 2130706434 for video/avc
W/MediaCodecUtil: Unknown AVC profile: 0
I/chatty: uid=10223(u0_a223) ExoPlayer:Playb identical 1 line
W/MediaCodecUtil: Unknown AVC profile: 0
W/VideoCapabilities: Unrecognized profile 65536 for video/avc
Unrecognized profile 2130706433 for video/avc
Unrecognized profile 524288 for video/avc
Unrecognized profile 2130706434 for video/avc
W/VideoCapabilities: Unrecognized profile 65536 for video/avc
Unrecognized profile 2130706433 for video/avc
Unrecognized profile 524288 for video/avc
Unrecognized profile 2130706434 for video/avc
W/MediaCodecUtil: Unknown AVC profile: 0
I/chatty: uid=10223(u0_a223) ExoPlayer:Playb identical 1 line
W/MediaCodecUtil: Unknown AVC profile: 0
I/zygote64: Do partial code cache collection, code=59KB, data=57KB
After code cache collection, code=59KB, data=57KB
Increasing code cache capacity to 256KB
D/RtspClient: SETUP rtsp://192.168.99.1/media/stream2/stream=0 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 2
Transport: RTP/AVP;unicast;client_port=45828-45829
W/MediaCodecUtil: Unknown AVC profile: 0
Unknown AVC profile: 0
I/OMXClient: Treble IOmx obtained
D/SurfaceUtils: connecting to surface 0x787df7d010, reason connectToSurface
I/MediaCodec: [OMX.qcom.video.decoder.avc] setting surface generation to 4072449
D/SurfaceUtils: disconnecting from surface 0x787df7d010, reason connectToSurface(reconnect)
connecting to surface 0x787df7d010, reason connectToSurface(reconnect)
I/ExtendedACodec: setupVideoDecoder()
I/ExtendedACodec: Decoder will be in frame by frame mode
D/SurfaceUtils: set up nativeWindow 0x787df7d010 for 640x480, color 0x7fa30c06, rotation 0, usage 0x20002900
I/OMXClient: Treble IOmx obtained
I/ACodec: codec does not support config priority (err -2147483648)
I/ACodec: codec does not support config priority (err -2147483648)
W/ExtendedACodec: Failed to get extension for extradata parameter
D/RtspClient: RTSP/1.0 200 OK
CSeq: 2
Date: 1 1 1970 1:58:35 GMT
Session: 2tgy24fmtzkfnz25hne2caa4
Transport: RTP/AVP/UDP;unicast;client_port=45828-45829;server_port=4500-4501
D/RtspClient: SETUP rtsp://192.168.99.1/media/stream2/stream=1 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 3
Session: 2tgy24fmtzkfnz25hne2caa4
Transport: RTP/AVP;unicast;client_port=45066-45067
D/RtspClient: RTSP/1.0 200 OK
CSeq: 3
Date: 1 1 1970 1:58:36 GMT
Session: 2tgy24fmtzkfnz25hne2caa4
Transport: RTP/AVP/UDP;unicast;client_port=45066-45067;server_port=4500-4501
D/RtspClient: PLAY rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 4
Session: 2tgy24fmtzkfnz25hne2caa4
Range: npt=0.000-
D/RtspClient: RTSP/1.0 200 OK
CSeq: 4
Date: 1 1 1970 1:58:36 GMT
Session: 2tgy24fmtzkfnz25hne2caa4
I/zygote64: Do full code cache collection, code=125KB, data=93KB
I/zygote64: After code cache collection, code=114KB, data=63KB
I/zygote64: Do partial code cache collection, code=119KB, data=71KB
After code cache collection, code=119KB, data=71KB
Increasing code cache capacity to 512KB
D/RtspClient: TEARDOWN rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 5
Session: 2tgy24fmtzkfnz25hne2caa4
D/RtspClient: SETUP rtsp://192.168.99.1/media/stream2/stream=0 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 6
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
D/RtspClient: RTSP/1.0 200 OK
CSeq: 6
Date: 1 1 1970 1:58:43 GMT
Session: 43vhpk6o5lm144clm05gxjvl
Transport: RTP/AVP/TCP;interleaved=0-1
D/RtspClient: SETUP rtsp://192.168.99.1/media/stream2/stream=1 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 7
Session: 43vhpk6o5lm144clm05gxjvl
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
D/RtspClient: RTSP/1.0 200 OK
CSeq: 7
Date: 1 1 1970 1:58:43 GMT
Session: 43vhpk6o5lm144clm05gxjvl
Transport: RTP/AVP/TCP;interleaved=2-3
D/RtspClient: PLAY rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 8
Session: 43vhpk6o5lm144clm05gxjvl
Range: npt=0.000-
D/RtspClient: RTSP/1.0 200 OK
CSeq: 8
Date: 1 1 1970 1:58:43 GMT
Session: 43vhpk6o5lm144clm05gxjvl
D/RtspClient: OPTIONS rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 9
Session: 43vhpk6o5lm144clm05gxjvl
D/RtspClient: RTSP/1.0 200 OK
CSeq: 9
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
D/RtspClient: OPTIONS rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 10
Session: 43vhpk6o5lm144clm05gxjvl
D/RtspClient: RTSP/1.0 200 OK
CSeq: 10
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
D/RtspClient: OPTIONS rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 11
Session: 43vhpk6o5lm144clm05gxjvl
D/RtspClient: RTSP/1.0 200 OK
CSeq: 11
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
D/RtspClient: OPTIONS rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 12
Session: 43vhpk6o5lm144clm05gxjvl
D/RtspClient: RTSP/1.0 200 OK
CSeq: 12
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
D/RtspClient: OPTIONS rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 13
Session: 43vhpk6o5lm144clm05gxjvl
D/RtspClient: RTSP/1.0 200 OK
CSeq: 13
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
D/RtspClient: OPTIONS rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 14
Session: 43vhpk6o5lm144clm05gxjvl
D/RtspClient: RTSP/1.0 200 OK
CSeq: 14
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
D/RtspClient: OPTIONS rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 15
Session: 43vhpk6o5lm144clm05gxjvl
D/RtspClient: RTSP/1.0 200 OK
CSeq: 15
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
D/RtspClient: OPTIONS rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 16
Session: 43vhpk6o5lm144clm05gxjvl
D/RtspClient: RTSP/1.0 200 OK
CSeq: 16
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
D/RtspClient: OPTIONS rtsp://192.168.99.1/media/stream2 RTSP/1.0
User-Agent: ExoPlayerLib/2.16.1
CSeq: 17
Session: 43vhpk6o5lm144clm05gxjvl
```

As you can see, after the first PLAY in UDP, occurs the TEARDOWN. After this TEARDOWN, the app sends OPTIONS again and again.

Is this due to that missing line? If yes, how can I suppress it? If not, what's going wrong?

Thank you all!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.