简体   繁体   中英

SRT protocol not found - Raspbery Pi 4 via ffmpeg

We tried to stream from a rasp Pi 4 via SRT, but we got a error: "protocol not found". Our command line is:

ffplay srt://127.0.0.1:9500?mode=listener&latency=20000

We tried the following guides: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu how to compile ffmpeg with enabling libsrt https://www.undergroundnews.dk/index.php/item/107-rtmp-eller-srt-streaming

Those guides worked so far and compiled but we still got the error message.

Do you have any ideas how to get the srt protocol working on a pi via ffmpeg?

try this instead: ffplay "srt://127.0.0.1:9500?mode=caller&latency=20000"

If you want to watch an srt stream with ffplay , you need to use the "caller" mode, as shown in the answer by @imyw.

But you may also need to compile ffplay yourself. I have not found a Linux binary of ffplay which supports srt. You can check with ffplay -version | grep libsrt ffplay -version | grep libsrt .

If you want to stream over srt, you have to use ffmpeg . But your ffmpeg binary may also not have libsrt enabled. Check with ffmpeg -version | grep libsrt ffmpeg -version | grep libsrt .

If it isn't enabled in your version of ffmpeg, you can get a static build from https://johnvansickle.com/ffmpeg/ which has libsrt enabled. Then you can use ffmpeg to stream (from port 9500 as in your example) with a command like this:

ffmpeg -re -i "$YourVideo" -f mpegts "srt://0.0.0.0:9500?mode=listener"

Or you could try OBS Studio which also supports the srt protocol.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM