我有一个IP摄像头,它输出RTSP流,我试图用它在我的网站上显示一个实时提要。这是一个小网站,只有我的妻子和我会访问,所以我尝试使用免费的流媒体服务。因此,我决定尝试MistServer的开源选项。
目前,我已经下载了MistServer,并且没有在我的mac (sudo ./MistController)上安装就可以运行它。随着MistServer的运行,我已经设置了一个流并配置了默认协议。该流配置如下:
stream name: ipcam
source: push://配置页面为我提供了以下可推送到的源:
RTMP full url: rtmp://127.0.0.1/live/ipcam
RTMP url: rtmp://127.0.0.1/live/
RTMP stream key: ipcam在streams视图中,流的状态不可用,但我假设这是因为它没有接收到输入。我还无法通过文件证实这一点。
下面是我正在运行的FFMPEG命令和正在得到的错误:
ffmpeg -rtsp_transport tcp -i rtsp://<user>:@<camera_ip>:554/live0.264 -acodec copy -vcodec copy -f flv rtmp://127.0.0.1/live/ipcam
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://<user>:@<camera_ip>:554/live0.264':
Metadata:
title : Session Streamed by LIBZRTSP
comment : live0.264
Duration: N/A, start: 0.242000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1280x720, 25 fps, 24.83 tbr, 90k tbn, 50 tbc
Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
rtmp://127.0.0.1/live/ipcam: Input/output error我无法从这个错误中判断问题是FFMPEG命令还是我的MistServer配置。
发布于 2017-10-17 18:39:33
我联系了MistServer,他们建议在非osx机器上运行服务器。因此,我在我的raspberry pi上设置了所有东西,流现在使用上面的命令为我工作。我想OS没有在他们的端定期测试,所以它不那么稳定。
我和MistServer团队有过更多的通信,他们的电子邮件支持非常棒。尤其是我在使用他们的开源版本。
https://stackoverflow.com/questions/46474407
复制相似问题