- To generate a testing SRT stream on port 1234 with:
ffmpeg -f lavfi -re -i testsrc=size=1280x720:rate=30 -f lavfi -re \
-i sine=frequency=1000:sample_rate=44100 -pix_fmt yuv420p \
-c:v libx264 -b:v 1000k -g 30 -keyint_min 120 -profile:v baseline -preset veryfast \
-c:a aac -f mpegts "srt://127.0.0.1:1234?mode=caller&pkt_size=1316"
gst-launch-1.0 -v \
videotestsrc ! clockoverlay ! video/x-raw, height=360, width=640 ! videoconvert ! x264enc tune=zerolatency ! video/x-h264, profile=constrained-baseline ! mux. \
audiotestsrc ! audio/x-raw, format=S16LE, channels=2, rate=44100 ! audioconvert ! voaacenc ! aacparse ! mux. \
mpegtsmux name=mux ! queue ! srtsink uri="srt://127.0.0.1:1234?mode=caller" wait-for-connection=false latency=0
- Our docker image (running in
listener
mode)
docker run --rm -p 1234:1234/udp eyevinntechnology/testsrc
- Note that when SRT stream is in caller mode, the player (listener) needs to run first.
- To play out an SRT stream on port 1234
ffplay "srt://127.0.0.1:1234?mode=listener"
gst-launch-1.0 playbin uri="srt://127.0.0.1:1234?mode=listener"
- File -> Open Network
- Type in URL:
srt://127.0.0.1:1234?mode=listener
- To run as caller, change mode from
listener
to caller