【发布时间】:2017-02-04 21:23:30
【问题描述】:
我在 AWS 上设置了 Wowza 流引擎,应用程序名称为“live”。我已经为 AWS 上的 Wowza 打开了所有必要的端口来接收和重新传输视频流。
我正在从 LAN 中的 NVR 获取流,并使用 FFMPEG 将来自 Ubuntu 机器的视频流发布到 Wowza 服务器。
ffmpeg -v debug -i "rtsp://888888:888888@192.168.1.5:554/cam/realmonitor?channel=1&subtype=1" -acodec copy -vcodec copy -sn -f flv "rtmp://xx.xx.xx.xx:1935/live/channel1 live=true pubUser=un pubPasswd=pw"
在终端上大约 60 秒后,它给了我以下错误。
Successfully parsed a group of options.
Opening an output file: rtmp://xx.xx.xx.xx:1935/live/channel1 live=true pubUser=un pubPasswd=pw.
Parsing...
Parsed protocol: 0
Parsed host : xx.xx.xx.xx
Parsed app : live
RTMP_Connect0, failed to connect socket. 110 (Connection timed out)
rtmp://xx.xx.xx.xx:1935/live/channel1 live=true pubUser=un pubPasswd=pw: Unknown error occurred
所以,我检查了 Wowza 服务器日志是否有任何线索,我发现了这一点。
2016-09-27 08:22:31 UTC comment server INFO 200 - MediaCasterStreamValidator.init[live/_definst_]: Started
2016-09-27 08:22:31 UTC comment server INFO 200 - ModuleCoreSecurity.onAppStart[live/_definst_]: Publish: AllowedEncoders: securityPublishValidEncoders:Wirecast/|FME/|FMLE/|Wowza GoCoder*|Lavf/|UA Teradek/|KulaByte/|VidBlaster/|XSplit/|PESA
2016-09-27 08:22:31 UTC comment server INFO 200 - ModuleCoreSecurity.onAppStart[live/_definst_]: Publish: block duplicate stream names : false
2016-09-27 08:22:31 UTC comment server INFO 200 - ModuleCoreSecurity.onAppStart[live/_definst_]: Publish: RTMP Authorization: password file:/usr/local/WowzaStreamingEngine/conf/publish.password
2016-09-27 08:22:31 UTC comment server INFO 200 - ModuleCoreSecurity.onAppStart[live/_definst_]: Play: SecureConnection: securityPlayRequireSecureConnection:false
2016-09-27 08:22:31 UTC comment server INFO 200 - ModuleCoreSecurity.onAppStart[live/_definst_]: Play: securitySecureTokenVersion property is missing, using SecureToken Version 1, play security enabled for RTMP only
2016-09-27 08:22:31 UTC app-start application INFO 200 _definst_ live/_definst_
2016-09-27 08:22:31 UTC connect-pending session INFO 100 <incomming IP> - _defaultVHost_ live _definst_ 2.975 [any] 1935 rtmp://xx.xx.xx.xx:1935/live <incomming IP>` rtmp - unknown 1873157588 3178 3073 - - - - - - - - - - - - - rtmp://xx.xx.xx.xx:1935/live -
2016-09-27 08:22:31 UTC connect session INFO 200 <incomming IP> - _defaultVHost_ live _definst_ 2.975 [any] 1935 rtmp://xx.xx.xx.xx:1935/live <incomming IP> rtmp - unknown 1873157588 3178 3073 - - - - - - - - - - - - - rtmp://xx.xx.xx.xx:1935/live -
2016-09-27 08:22:32 UTC create stream INFO 200 - - _defaultVHost_ live _definst_ 0.0 [any] 1935 rtmp://xx.xx.xx.xx:1935/live <incomming IP> rtmp - unknown 1873157588 3297 3565 1 0 0 0 - - - - - - rtmp://xx.xx.xx.xx:1935/live rtmp://xx.xx.xx.xx:1935/live - rtmp://xx.xx.xx.xx:1935/live -
2016-09-27 08:22:33 UTC destroy stream INFO 200 - - _defaultVHost_ live _definst_ 1.644 [any] 1935 rtmp://xx.xx.xx.xx:1935/live <incomming IP> rtmp - unknown 1873157588 3347 3796 1 0 0 0 - - - - - - rtmp://xx.xx.xx.xx:1935/live rtmp://xx.xx.xx.xx:1935/live - rtmp://xx.xx.xx.xx:1935/live -
2016-09-27 08:22:33 UTC disconnect session INFO 200 1873157588 - _defaultVHost_ live _definst_ 5.198 [any] 1935 rtmp://xx.xx.xx.xx:1935/live <incomming IP> rtmp - unknown 1873157588 3347 3796 - - - - - - - - - - - - - rtmp://xx.xx.xx.xx:1935/live -
2016-09-27 08:23:34 UTC app-stop application INFO 200 _definst_ live/_definst_
所以基本上服务器身份验证是正确的,但服务器启动流并立即停止。
谁能给我一些指针来寻找这个错误?
【问题讨论】:
-
我不记得这是否适用于 Wowza,但请尝试使用
-f flv rtmp://[username:password@]server[:port][/app][/instance][/playpath]。 -
@aergistal,我已经尝试过这种方法,但它返回了 RTMP_0 数据包丢失错误。因此,我更改了命令并为他们提供了
pubUser=un pubPasswd=pw。
标签: ubuntu ffmpeg stream wowza