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

Android (ExoPlayer) cannot force TCP for RTSP #1619

Closed
machenmusik opened this issue Aug 17, 2023 · 7 comments
Closed

Android (ExoPlayer) cannot force TCP for RTSP #1619

machenmusik opened this issue Aug 17, 2023 · 7 comments
Labels
Android Android platform enhancement 🚀 New feature or request Fixed A fix will be in the next release
Milestone

Comments

@machenmusik
Copy link

For Android playback, ExoPlayer supports forcing TCP for RTSP setForceUseRtpTcp(true)

However, there does not seem to be a way to do that via AVPro,
and ExoPlayer does not correctly fall back to TCP when UDP is unavailable.

This combination causes playback for RTSP/TCP-only sources to fail.

Ideallly, the ability to force TCP would be exposed as an Android-only setting, similar to ExoPlayer buffer sizes.

@Chris-RH Chris-RH added the Android Android platform label Aug 18, 2023
@Ste-RH
Copy link
Collaborator

Ste-RH commented Aug 25, 2023

We can look into exposing this in some way. Do you have a stream URL you can share that we can test against? If you wish to keep it private, you can email it over to unitysupport@renderheads.com with the subject 'Issue 1619'.

@machenmusik
Copy link
Author

machenmusik commented Aug 25, 2023

Easiest thing is to set up a RTSP server that will show you which protocol is being used to connect.

For example, see https://github.com/bluenviron/mediamtx
Console messages will tell you, e.g.

2023/08/25 12:54:41 INF [RTSP] [session 6e9474be] created by 10.0.0.4:55246
2023/08/25 12:54:41 INF [RTSP] [session 6e9474be] is reading from path 'test', with TCP, 1 track (H265)

@machenmusik
Copy link
Author

The changes are pretty straightforward to do this, in the exoplayer java bridge, let me know if you'd like to discuss in detail.

@Ste-RH Ste-RH added the enhancement 🚀 New feature or request label Aug 31, 2023
@Ste-RH
Copy link
Collaborator

Ste-RH commented Aug 31, 2023

We have added this into the next release of AVPro Video v2.8.5. This should hopefully be released today. To action it, there is an option in the Android platform properties of the MediaPlayer component.

@Ste-RH Ste-RH added this to the 0 - Next Release milestone Aug 31, 2023
@Ste-RH
Copy link
Collaborator

Ste-RH commented Aug 31, 2023

v2.8.5 has been released @machenmusik. Do let us know if the change does what you require.

@Ste-RH Ste-RH modified the milestones: 0 - Next Release, 2.8.5 Aug 31, 2023
@machenmusik
Copy link
Author

Works thank you!

Question, can / does AVPro use ExoPlayer's async mode (no longer experimental) ? https://stackoverflow.com/questions/75947834/android-exoplayer-cannot-see-new-method-of-operation-mode-in-defaultrenderersfac

@Ste-RH
Copy link
Collaborator

Ste-RH commented Sep 1, 2023

Works thank you!

Question, can / does AVPro use ExoPlayer's async mode (no longer experimental) ? https://stackoverflow.com/questions/75947834/android-exoplayer-cannot-see-new-method-of-operation-mode-in-defaultrenderersfac

No. We had it enabled for a period of time in our local testing environments when it was experimental, but it was too risky to release enabled. Now that it is officially stable though, we will look to add an option to force it enabled in the next release.

@Ste-RH Ste-RH closed this as completed Sep 1, 2023
@Ste-RH Ste-RH added the Fixed A fix will be in the next release label Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android platform enhancement 🚀 New feature or request Fixed A fix will be in the next release
Projects
None yet
Development

No branches or pull requests

3 participants