Eyevinn / toolbox

A set of Docker containers with Streaming tools
Other
235 stars 47 forks source link

Minimal streaming example #5

Closed Schizo closed 4 years ago

Schizo commented 4 years ago

I was reading your article and pardon me if I'm not too familiar with the terminology, but I have hard times understanding how to create a minimal streaming example with SRT?

My current setup that I want to switch to SRT is described as follows: Sender: ffmpeg -f avfoundation -i "1:0" -an -r 30 -vf scale=1280:720 -vcodec libx264 -crf 12 -preset ultrafast -tune zerolatency -threads 8 -thread_type slice -f mpegts udp://192.168.1.5:1234

Receiver: The receiver was using a Player like VLC or MX Player by opening udp://@192.168.1.5:1234.

How would I come up with a similar situation with SRT

Appreciate your help.

birme commented 4 years ago

Given that you have compiled ffmpeg with the SRT SDK you should be able to do this:

ffmpeg -f avfoundation -i "1:0" -an -r 30 -vf scale=1280:720 -vcodec libx264 -crf 12 -preset ultrafast -tune zerolatency -threads 8 -thread_type slice -f mpegts srt://192.168.1.5:1234?mode=listener

And in VLC

srt://@192.168.1.5:1234