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

Add support for RTP input in srt-live-transmit #2848

Merged
merged 8 commits into from
Jan 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make RTP input only
davemevans committed Jan 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit e6c0687c5aee924460cf5ee5c0acd3b4d9f05029
5 changes: 5 additions & 0 deletions apps/transmitmedia.cpp
Original file line number Diff line number Diff line change
@@ -1205,6 +1205,11 @@ extern unique_ptr<Base> CreateMedium(const string& uri)
break;

case UriParser::RTP:
if (IsOutput<Base>())
{
cerr << "RTP not supported as an output\n";
throw invalid_argument("Invalid output protocol: RTP");
}
iport = atoi(u.port().c_str());
if ( iport < 1024 )
{
11 changes: 6 additions & 5 deletions docs/apps/srt-live-transmit.md
Original file line number Diff line number Diff line change
@@ -16,7 +16,8 @@ srt-live-transmit <input-uri> <output-uri> [options]
The following medium types are handled by `srt-live-transmit`:

- SRT - use SRT for reading or writing, in listener, caller or rendezvous mode, with possibly additional parameters
- UDP/RTP - read or write the given UDP address (also multicast)
- UDP - read or write the given UDP address (also multicast)
- RTP - read RTP over UDP from the given address (also multicast)
- Local file - read or store the stream into the file
- Process's pipeline - use the process's `stdin` and `stdout` standard streams

@@ -86,7 +87,7 @@ The applications supports the following schemes:

- `file` - for file or standard input and output
- `udp` - UDP output (unicast and multicast)
- `rtp` - RTP over UDP input or output (unicast and multicast)
- `rtp` - RTP over UDP input (unicast and multicast)
- `srt` - SRT connection

Note that this application doesn't support file as a medium, but this
@@ -186,11 +187,11 @@ manual pages, like `ip(7)` and on Microsoft docs pages under `IPPROTO_IP`.

### Medium: RTP

RTP over UDP is supported for both input and output.
RTP over UDP is supported for input only.

As an output, and as an input with no RTP-specific URI parameters, RTP medium functions identically to UDP medium as described above.
With no RTP-specific URI parameters, RTP medium functions identically to UDP medium as described above.

As an input, additional RTP-specific options are available through URI parameters. These options enable dropping of bytes from the head of the input buffer allowing, for example, the RTP header to be dropped for use cases where the receiving end cannot accept RTP.
Additional RTP-specific options are available through URI parameters. These options enable dropping of bytes from the head of the input buffer allowing, for example, the RTP header to be dropped for use cases where the receiving end cannot accept RTP.

- **droprtpheader**: (`bool` as defined in SRT section) - when true, drop the first 12 bytes of each received packet
- **rtpheadersize**: sets the number of bytes to drop from the beginning of each received packet. Ignored if **droprtpheader** is not truthy.