[<<][protocol][>>][..]
Fri Jul 14 19:45:01 EDT 2017

RTP/RSTP

RTSP: signaling
RTP: streaming

To get started with this, focus on playing back an RTP raw audio
stream.

https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol
https://en.wikipedia.org/wiki/Real-time_Transport_Protocol

http://www.cs.columbia.edu/~hgs/rtp/faq.html

What can be used as a source?
Asterisk.


(/ (* 48000 2) 1492)  64 p/s


Some useful payloads:
http://www.networksorcery.com/enp/protocol/rtp.htm
https://en.wikipedia.org/wiki/RTP_audio_video_profile
PT=10 : stereo 44100 16-bit

00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 
VER-- P- X- CC--------- M- PT------------------ SequenceNumber---------------------------------
Timestamp--------------------------------------------------------------------------------------
SSRC-------------------------------------------------------------------------------------------
CSRC [0..15]

For just stero audio:
VER=2
P=0 (no padding)
X=0 (no header extension)
CC=0 (number of CSRC identifiers)
M=0 (marker?)
PT=10 (L16 linear PCM 44100Hz, 2 channels)
SequenceNumber (increment for each packet sent)
Timestamp (increment per data sample)
SSRC (random?, fixed for stream)
CSRC (contributing source, don't include)

So it seems quite straightforward.

MTU=1500,
max UDP payload 1492
max RTP payload 1480

network fields are big-endian
L16 data is signed, network order, left first.

Next: make a small C program that performs the encoding.
Can socat do this actually?

http://www.dest-unreach.org/socat/doc/socat-multicast.html

Maybe a good excuse to try Rust.
No, let's keep it simple.  See pool/src/rtp_L16.c

EDIT: Wireshark can decode it, but I have nothing to play it.
Maybe this needs some RTSP to set up a stream?

This works:
$ cat /dev/urandom | pv -L 176400 | ./rtp_L16.elf 10.1.3.21 10.1.3.2 12345
$ cvlc -v rtp://@:12345

And fairly well.  Doesn't accumulate delay.
Delay is large though (about a second) but that might be due to throttling.

Bottom line: low delay, use dedicated analog or digital wire.  Don't
use Ethernet.

EDIT: seems to work fine on wifi as well with a similar 1-second delay.





[Reply][About]
[<<][protocol][>>][..]