Peerstreamer Ng

P2P real-time streaming platform
Alternatives To Peerstreamer Ng
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Srs21,692
3 days ago93September 16, 2022215mitC++
SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
Hls.js12,8903814393 hours ago1,685September 21, 2022188otherTypeScript
HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
Rabbitmq Server10,71511113a day ago148September 21, 2022279otherStarlark
Open source RabbitMQ: core server and tier 1 (built-in) plugins
Nuclear10,170
13 days ago164agpl-3.0TypeScript
Streaming music player that finds free music for you
Streamlink8,669301518 hours ago53May 30, 202253bsd-2-clausePython
Streamlink is a CLI utility which pipes video streams from various services into a video player
Owncast7,347
5 hours ago74July 07, 2022160mitTypeScript
Take control over your live stream video by running it yourself. Streaming + chat out of the box.
Peerflix5,534347383 years ago143June 09, 2018130mitJavaScript
Streaming torrent client for node.js
Ksql5,509
15 hours ago1,271otherJava
The database purpose-built for stream processing applications.
Examples4,294
a year ago14JavaScript
Example Koa apps
Twit4,1135,6893822 years ago64June 30, 2018161JavaScript
Twitter API Client for node (REST & Streaming API)
Alternatives To Peerstreamer Ng
Select To Compare


Alternative Project Comparisons
Readme

PeerStreamer-ng

PeerStreamer-ng [1] is P2P real-time streaming platform. It is specifically designed for mesh networks and it is meant to be purely decentralized.

Documentation

You can find documentation on usage and development on the official wiki: https://ans.disi.unitn.it/redmine/projects/peerstreamer-ng/wiki

Compilation

You need to install Janus dependencies, on ubuntu:

sudo apt install libmicrohttpd-dev libjansson-dev libnice-dev \
	libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
	libopus-dev libogg-dev libcurl4-openssl-dev pkg-config gengetopt \
	libtool automake

After that, you can get the executable by running: $> make

To turn on all the debugging features, set the DEBUG environment variable: $> DEBUG=1 make

Test

PeerStreamer-ng comes with a unit test suite. It does require valgrind installed to run. In the "test" folder are stored the test files. To run them and check code consistency run: $> make tests

Besides implementation test suite, it is also possible to test against the HTTP interface. $> DEBUG=1 make $> valgrind --leak-check=full ./peerstreamer-ng $> Test/http_test.sh

Tutorial: Stream a web camera with WebRTC

Tested on Ubuntu 17.10

In this tutorial we are creating a streaming source first,

  • Acquiring a media content from a local (usb) camera;
  • Encapsulating it in a RTP stream;
  • Creating a pstreamer P2P overlay;
  • Injecting the RTP stream in the overlay.

Then, we will launch PeerStreamer-ng to serve the P2P stream to the user through a browser supporting WebRTC.

The source

The following script captures a usb camera (/dev/video0) with FFmpeg which is used to stream it locally through RTP. It is important to note, to be able to serve the stream through WebRTC, FFmpeg must transcode the video with VP8. It also launches a source instance of pstreamer that takes such stream in input and use P2P mechanism to distribute it to the attaching peers.

Overall, this script creates a PeerStreamer-ng channel at IP address 127.0.0.1 on port 6000 and it saves its description on a local channel list file called channels.csv which we will use to feed PeerStreamer-ng with.

NAME="My Channel"
VIDEO=/dev/video0
SDPFILE="file://${PWD}/channel.sdp"
SOURCE_PEER_PORT=6000
RTP_BASE_PORT=5002
HOST_EXT_IP=127.0.0.1

echo "$NAME,$HOST_EXT_IP,$SOURCE_PEER_PORT,QUALITY,http://$HOST_EXT_IP:8000/channel.sdp" > channels.csv

ffmpeg -re -i ${VIDEO} -vcodec libvpx -deadline realtime -an -f rtp rtp://127.0.0.1:$((RTP_BASE_PORT+2))\
	-sdp_file $SDPFILE &
FFMPEG_PID=$!

Libs/pstreamer/pstreamer -p 0 -c "iface=lo,port=$SOURCE_PEER_PORT,chunkiser=rtp,audio=$RTP_BASE_PORT,\
	video=$((RTP_BASE_PORT+2)),addr=127.0.0.1,max_delay_ms=50" 
SOURCE_PEER_PID=$!

trap "kill $SOURCE_PEER_PID $FFMPEG_PID" SIGINT SIGTERM EXIT

You can download the script above from the project site.

PeerStreamer-ng

The following command executes PeerStreamer-ng and it start the HTTP interfaces. Pages are now served on port 3000 (overridable through the flags, see the command line help).

./peerstreamer-ng -c channel.csv

References

[1] https://ans.disi.unitn.it/redmine/projects/peerstreamer-ng

Popular Streaming Projects
Popular Stream Projects
Popular Networking Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C
Testing
Stream
Camera
Real Time
Streaming
Ffmpeg
Webrtc
P2p
Rtp