Skip to content
Xavi Artigas edited this page Oct 22, 2015 · 11 revisions

Deployment

In order to deploy and use liveMediaStreamer, it is necessary to use Live Media Streamer WebGUI.

Moreover, UDP kernel buffers MUST be modified in order to support high bit rate data (for example Full HD video).

sudo sysctl -w net.core.rmem_max=2097152
sudo sysctl -w net.core.rmem_default=2097152  
sudo sysctl -w net.core.wmem_max=2097152 
sudo sysctl -w net.core.wmem_default=2097152 

Testing

In order to test liveMediaStreamer use testtransocder. This tests configures liveMediaStreamer to work as a AV transcoder, receiving one video and/or one audio streams via RTP, transcoding them and creating an RTSP session.

In order to execute it, first of all it is necessary to stream the sources using FFMPEG:

ffmpeg -re -i test.mp4 -map 0:0 -vcodec libx264 -bf 0 -f rtp rtp://localhost:5004 -map 0:1 -acodec libopus -ar 48000 -ac 2 -f rtp rtp://localhost:5006

Note that -map flag depends on the file, so check it using ffprobe. The output of ffprobe ./test.mp4 is:

Duration: 00:12:14.17, start: 0.000000, bitrate: 6361 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], 6162 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
Metadata:
  handler_name    : DataHandler
  encoder         : libx264
Stream #0:1(eng): Audio: mp3 (.mp3 / 0x33706D2E), 44100 Hz, stereo, s16p, 191 kb/s (default)
Metadata:
  handler_name    : DataHandler

As we can see, Stream 0:0 is video and Stream 0:1 is audio.

Once we are streaming the sources, we can execute testtranscoder.

./testtranscoder -v 5004 -a 5006  

Output URIs (the test creates two identical sessions) can be seen in stdout. In order to play them, use ffplay or vlc

Clone this wiki locally