Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTSP streams causing "Fatal Exception" with AVProVideo #302

Closed
1 task
tangentlab opened this issue Apr 6, 2023 · 6 comments
Closed
1 task

RTSP streams causing "Fatal Exception" with AVProVideo #302

tangentlab opened this issue Apr 6, 2023 · 6 comments
Assignees
Labels

Comments

@tangentlab
Copy link

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

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.
@Docteh
Copy link

Docteh commented Apr 7, 2023

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.

@icbaker
Copy link
Collaborator

icbaker commented Apr 11, 2023

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.

@tangentlab
Copy link
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?

@microkatz
Copy link
Contributor

microkatz commented Apr 19, 2023

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.

@microkatz
Copy link
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.

@tangentlab
Copy link
Author

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

@androidx androidx locked and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants