Skip to content

RTSP streams causing "Fatal Exception" with AVProVideo #302

Closed

Description

@tangentlab

Media3 Version

ExoPlayer 2.18.2

Devices that reproduce the issue

Hi,

I'm using AVProVideo in Unity 2020.3.36 for Meta Quest video playback.

I seem to be hitting this Fatal Exception bug with some RTSP streams. I can't seem to narrow down what type of stream will cause it, but I can use a number of streams and won't get it but then will get it one that consistently crashes.

I can try to provide links that I'm hitting but I don't have a solid list.

image

I've been discussing over here
RenderHeads/UnityPlugin-AVProVideo#1505
and it possibly seems like a problem handling audio in ExoPlayer?

Devices that do not reproduce the issue

only testing on Quest 2

Reproducible in the demo app?

Not tested

Reproduction steps

  1. load RTSP stream in AVProVideo

Expected result

play stream and provide joy

Actual result

Quest app fully crashes

Media

I've been trying this test stream and it seems to be what crashes the app
rtsp://zephyr.rtsp.stream/pattern?streamKey=cf1c48e420d2777f0eaef03b9b9252cd

image

Bug Report

Activity

  1. Docteh commented on Apr 7, 2023

    @Docteh

    For the stream in question, I just want to comment that the particular streamKey linked might be invalidated, but a free account can be made at https://rtsp.stream/

    I suspect its taking issue with the response on the DESCRIBE command, particularly the audio portion.

    From the "pattern" stream

    m=audio 0 RTP/AVP 97
    a=control:rtsp://zephyr.rtsp.stream/pattern?streamKey=[redacted streamkey]/mediaUUID=9f310544-5799-4512-9c4c-6003c8e65bae
    a=rtpmap:97 MP4A-LATM/44100
    a=fmtp:97 config=40002410adca00; cpresent=0
    

    From the "movie" stream

    m=audio 0 RTP/AVP 97
    a=control:rtsp://zephyr.rtsp.stream/movie?streamKey=b4d79022901dc39d53fad135ca3915d0/mediaUUID=8d088b89-333b-469a-8cbf-67eaaeb18c01
    a=rtpmap:97 mpeg4-generic/48000/2
    a=fmtp:97 config=1190; indexdeltalength=3; indexlength=3; mode=AAC-hbr; profile-level-id=1; sizelength=13
    

    From my usual stream

    m=audio 0 RTP/AVP 96
    a=control:mediaUUID=5533ea8f-305c-4180-a3b8-d0fa34726146
    a=rtpmap:96 mpeg4-generic/48000/2
    a=fmtp:96 config=1190; indexdeltalength=3; indexlength=3; mode=AAC-hbr; profile-level-id=1; sizelength=13
    

    I suspect its the profile-level-id on the fmtp line that is being worried about.

  2. icbaker commented on Apr 11, 2023

    @icbaker
    Collaborator

    It looks like RtspMediaTrack requires the profile-level-id parameter but RFC 6416 section 7.3 seems to indicate this parameter is optional with a default value of 30.

    Over to @microkatz to see if I've understood the RTSP spec correctly.

  3. tangentlab commented on Apr 17, 2023

    @tangentlab
    Author

    Thanks for the response.

    For the stream in question, I just want to comment that the particular streamKey linked might be invalidated, but a free account can be made at https://rtsp.stream/

    I've been using the free account to test those streams.

    Does it seem like its possible that I should be able to gracefully handle this failure on my end or is this something that I can't protect against beyond from preventing users from providing rtsp streams?

  4. microkatz commented on Apr 19, 2023

    @microkatz
    Contributor

    Hi @tangentlab.

    I created a fix so that these mp4A-latm with missing profile-level-id attributes will use the default profile-level-id value. I'll update this page when that commit is entered into the main branch. This fix should allow your rtsp stream to be played.

    In addition, I noticed that you are running an older version of Exoplayer, v2.18.2? There was a fix that went into 2.18.4, google/ExoPlayer@89acf3c. This commit will alleviate the "Fatal Exception" that is crashing the player. However, you'll have to wait for the new code for the rtsp stream to be playable.

  5. microkatz commented on Apr 26, 2023

    @microkatz
    Contributor

    Hello @tangentlab.

    Thank you for reporting your issue!

    This fix that I mentioned has been entered into the androidx/media main branch. Here is the commit: 165f4f2. This fix should allow your rtsp stream to be played.

  6. tangentlab commented on Apr 26, 2023

    @tangentlab
    Author

    Great! Much appreciated. I'm excited to try it.

  7. locked and limited conversation to collaborators on Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions