tms
tms(toy media server) is a toy media server for myself learning media develop.
Feature
- publish media by rtmp
- publish media by webrtc
- publish media by srt
- plya media by rtmp
- play media by http-flv
- play media by http-hls
- play media by webrtc
- play media by srt
- media demux/remux, like rtmp(flv) to webrtc(rtp)
- transcode
- MCU
- media server forward, current tms is only a single server node
Todo
- sdp generater and sdp parser, instead of hardcode xxx.sdp
- WebRTC adapt to different version of chrome
- WebRTC adapt to different video encoder
- friendly API
Bugs
There are many bugs in WebRTC, because the complexity.
Usage
Step 0: build-tools
sudo apt-get install tcl
this is for srt install.
Step 1: get source code
git clone https://github.com/HuyaJohn/tms.git
cd tms
Step 2: fetch depend
chmod +x depend.sh
vim depend.sh on line 38, change rapidjson-1.1.0g to rapidjson.
mkdir obj
cd obj
git clone git@github.com:Tencent/rapidjson.git
./depend.sh
Step 3: build
cd ../src
make
Step 4: run
./tms -server_ip xxx.xxx.xxx.xxx
Example
1. publish rtmp using obs, play flv/hls/rtmp using vlc
publish rtmp using obs, I use host "hw.com" to hide my server ip for safety.
play http-flv using vlc
play hls using vlc
play rtmp using vlc
2. publish using chrome(WebRTC), play using chrome(WebRTC)
chrome publish vp9, I use host "hw.com" to hide my server ip for safety, and it's hardcode in sdp.
chrome play vp9