ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

RTSP crash caused by sprop-parameter-sets empty

Open wingkingbobo opened this issue 3 years ago • 4 comments
trafficstars

It looks like a crash caused by "sprop parameter sets" being empty. It can be played with VLC.

version: v2.17.1

rtsp log:

    RTSP/1.0 200 OK
    CSeq: 2
    Content-Base: rtsp://admin:[email protected]:554/h264/ch1/main/av_stream/
    Content-Type: application/sdp
    Content-Length: 525
    
    v=0
    o=- 934117181649 934117181649 IN IP4 192.168.0.115
    s=Media Presentation
    e=NONE
    b=AS:5050
    t=0 0
    a=control:rtsp://admin:[email protected]:554/h264/ch1/main/av_stream/
    m=video 0 RTP/AVP 96
    b=AS:5000
    a=control:rtsp://admin:[email protected]:554/h264/ch1/main/av_stream/trackID=1
    a=rtpmap:96 H264/90000
    a=fmtp:96 profile-level-id=420029; packetization-mode=1; sprop-parameter-sets=
    a=Media_header:MEDIAINFO=494D4B48010100000400010000000000000000000000000000000000000000000000000000000000;
    a=appversion:1.0

crash log:

2022-03-14 15:38:40.672 13643-14091/com.ixlab.mapbox.wemap E/DEBUG: java.lang.IllegalArgumentException
2022-03-14 15:38:40.672 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.util.Assertions.checkArgument(Assertions.java:39)
2022-03-14 15:38:40.673 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.RtspMediaTrack.processH264FmtpAttribute(RtspMediaTrack.java:166)
2022-03-14 15:38:40.673 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.RtspMediaTrack.generatePayloadFormat(RtspMediaTrack.java:119)
2022-03-14 15:38:40.673 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.RtspMediaTrack.<init>(RtspMediaTrack.java:65)
2022-03-14 15:38:40.674 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.RtspClient.buildTrackList(RtspClient.java:347)
2022-03-14 15:38:40.674 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.RtspClient.access$1700(RtspClient.java:75)
2022-03-14 15:38:40.674 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener.onDescribeResponseReceived(RtspClient.java:690)
2022-03-14 15:38:40.674 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener.handleRtspResponse(RtspClient.java:598)
2022-03-14 15:38:40.675 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:507)
2022-03-14 15:38:40.675 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener.lambda$onRtspMessageReceived$0$RtspClient$MessageListener(RtspClient.java:500)
2022-03-14 15:38:40.675 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at com.google.android.exoplayer2.source.rtsp.-$$Lambda$RtspClient$MessageListener$9u5JvYWAdRxaQT3-zaI614vd2Qw.run(Unknown Source:4)
2022-03-14 15:38:40.675 13643-14091/com.ixlab.mapbox.wemap E/DEBUG:     at android.os.Handler.handleCallback(Handler.java:900)

wingkingbobo avatar Mar 14 '22 07:03 wingkingbobo

It is failing as intended: we don't play H264 content when the sprop-parameter-sets is empty. The parameter set contains sps/pps for the decoder. That being said, you can try removing the checks for sprop-parameter-sets and see if it plays.

claincly avatar Mar 16 '22 14:03 claincly

on my case, fmtpParameters is empty but is playing in vlc

lotaviods avatar Aug 04 '22 12:08 lotaviods

Again, you can try remove the assertion for sprop-parameter-sets and see if it plays.

claincly avatar Aug 04 '22 12:08 claincly

After removing the assertion, video does not play on exo player but does on vlc, i notice that after removing processH265FmtpAttribute, since has no atrr, codec fail on initCodec(codecInfo, crypto)

here is RTP DESCRIBE

v=0
o=- 1109162014219182 0 IN IP4 0.0.0.0
s=HIK Media Server V4.30.201
i=HIK Media Server Session Description : standard
e=NONE
c=IN IP4 0.0.0.0
t=0 0
a=control:*
b=AS:1034
a=range:npt=now-
m=video 0 RTP/AVP 96
i=Video Media
a=rtpmap:96 H265/90000
a=control:trackID=video
b=AS:1024
a=Media_header:MEDIAINFO=494D4B48020100000400050000000000000000000000000000000000000000000000000000000000;
a=appversion:1.0

lotaviods avatar Aug 05 '22 11:08 lotaviods

Hey Luiz - could you try streaming an H264 video with the HIK server?

Or maybe share your test stream? if you're unable to share it publicly, please send them to [email protected] using a subject in the format "Issue #10067". Please also update this issue to indicate you've done this.

claincly avatar Aug 22 '22 10:08 claincly

Hey @wingkingbobo. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Sep 09 '22 01:09 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@wingkingbobo if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Sep 20 '22 01:09 google-oss-bot