Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
02db70bd
authored
Jun 28, 2021
by
claincly
Committed by
Oliver Woodman
Jun 30, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Amend RTSP dev guide to match the current code status.
PiperOrigin-RevId: 381852972
parent
ffbec223
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
6 deletions
docs/_page_fragments/supported-formats-rtsp.md
docs/rtsp.md
docs/_page_fragments/supported-formats-rtsp.md
View file @
02db70bd
...
...
@@ -2,10 +2,13 @@ ExoPlayer supports both live and on demand RTSP. Supported formats and network
types are listed below.
**Supported formats**
*
H264
*
AAC (with ADTS bitstream)
*
AC3
*
H264. The SDP media description must include SPS/PPS data in the fmtp
attribute for decoder initialization.
*
AAC (with ADTS bitstream).
*
AC3.
**Supported network types**
*
RTP over UDP unicast (multicast is not supported)
*
Interleaved RTSP, RTP over RTSP using TCP
*
RTP over UDP unicast (multicast is not supported).
*
Interleaved RTSP, RTP over RTSP using TCP.
> Playback of RTP streams is not supported.
docs/rtsp.md
View file @
02db70bd
...
...
@@ -26,6 +26,13 @@ player.prepare();
{: .language-java}
### Play authentication-enabled RTSP content ###
ExoPlayer supports playback with RTSP BASIC and DIGEST authentication. To play
protected RTSP content, the
`MediaItem`
's URI must be configured with the
authtication info. Specifically, the URI should follow the format
`rtsp://<username>:<password>@<host address>`
.
## Using RtspMediaSource ##
For more customization options, you can create an
`RtspMediaSource`
and pass it
...
...
@@ -45,7 +52,7 @@ player.prepare();
~~~
{: .language-java}
## Using RTSP behind a NAT ##
## Using RTSP behind a NAT
(RTP/TCP support)
##
ExoPlayer uses UDP as the default protocol for RTP transport.
...
...
@@ -55,3 +62,19 @@ necessary UDP port mapping. If ExoPlayer detects there have not been incoming
RTP packets for a while and the playback has not started yet, ExoPlayer tears
down the current RTSP playback session, and retries playback using RTP-over-RTSP
(transmitting RTP packets using the TCP connection opened for RTSP).
The timeout for retrying with TCP can be customized by calling the method
`RtspMediaSource.Factory.setTimeoutMs()`
. For example, if the timeout is set to
four seconds, the player will retry with TCP after four seconds of UDP
inactivity.
> Setting the timeout also affects the end-of-stream detection logic. That is,
ExoPlayer will report the playback has ended if nothing is received for the
duration of the set timeout. Setting this value too small may lead to pre-mature
stream ending under poor network conditions.
### Force using RTP/TCP ###
ExoPlayer can also be configured to play with RTP/TCP by default. To do so,
use method
`RtspMediaSource.Factory.setForceUseRtpTcp()`
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment