[英]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".我们尝试通过 SRT 从 rasp Pi 4 执行 stream,但出现错误:“找不到协议”。 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 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 流媒体
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?你知道如何通过 ffmpeg 让 srt 协议在 pi 上工作吗?
try this instead: ffplay "srt://127.0.0.1:9500?mode=caller&latency=20000"
试试这个
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.如果您想观看带有 ffplay 的 srt
ffplay
,则需要使用“呼叫者”模式,如@imyw的回答所示。
But you may also need to compile ffplay yourself.但是你可能还需要自己编译 ffplay。 I have not found a Linux binary of ffplay which supports srt.
我还没有找到支持 srt 的 ffplay 的 Linux 二进制文件。 You can check with
ffplay -version | grep libsrt
您可以检查
ffplay -version | grep libsrt
ffplay -version | grep libsrt
. ffplay -version | grep libsrt
。
If you want to stream over srt, you have to use ffmpeg
.如果你想stream超过 srt,你必须使用
ffmpeg
。 But your ffmpeg binary may also not have libsrt enabled.但是您的 ffmpeg 二进制文件也可能没有启用 libsrt。 Check with
ffmpeg -version | grep libsrt
检查
ffmpeg -version | grep libsrt
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.如果在您的 ffmpeg 版本中未启用它,您可以从https://johnvansickle.com/ffmpeg/获得 static 构建。 Then you can use ffmpeg to stream (from port 9500 as in your example) with a command like this:
然后你可以使用 ffmpeg 到 stream (从你的例子中的端口 9500 )使用如下命令:
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.或者您可以尝试也支持 srt 协议的OBS Studio 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.