Network and other protocols Entry: SCTP Date: Wed Jul 31 15:06:36 EDT 2013 Reliable datagram protocol[1]. Python bindings[2]. [1] http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol [2] http://epx.com.br/pysctp/ Entry: RTP/RSTP Date: Fri Jul 14 19:45:01 EDT 2017 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. Entry: Other uses Date: Sat Jul 15 19:15:18 EDT 2017 IP camera? Maybe playback JPEG stream? This requires RTSP. Mabye get this set up as part of exo. Yeah this is not low hanging fruit.. What about mp3? Is there a specific requirement for framing? http://www.rfc-editor.org/rfc/rfc3119.txt Entry: Simple decoders Date: Sat Jul 15 19:36:59 EDT 2017 The benefit here is that this does not require a TCP stack. So it could use a simple uC with ethernet.