use*_*378 10 ffmpeg rtmp live-streaming
我想定期拍摄RTMP直播视频流的快照.我可以使用VLC看到rtmp视频流.这是rtmp网址:
rtmp://antena3fms35livefs.fplive.net/antena3fms35live-live/stream-antena3_1
Run Code Online (Sandbox Code Playgroud)
我使用下面的命令来捕获快照,根据官方的FFmpeg网站在这里:
ffmpeg -i rtmp://antena3fms35livefs.fplive.net/antena3fms35live-live/stream-antena3_1 -f image2 -vf fps=fps=1 out%d.png
Run Code Online (Sandbox Code Playgroud)
该命令产生以下输出:
ffmpeg version N-64667-gd595361 Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 14 2014 22:09:48 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzl
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amr
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --ena
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 47.100 / 55. 47.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 10.100 / 4. 10.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
HandShake: client signature does not match!
Closing connection: NetStream.Play.StreamNotFound
rtmp://antena3fms35livefs.fplive.net/antena3fms35live-live/stream-antena3_1: Unknown error occurred
Run Code Online (Sandbox Code Playgroud)
我已经尝试了另一个rmtp流,但我仍然得到完全相同的错误.
可能是什么问题呢?谢谢!
sus*_*004 14
我刚试过你的命令,它对我来说很好.也许这是关于你的FFMPEG安装的东西?我在Mac上使用2.4版本(tessus build).
我知道其他/旧版本使用"librtmp"进行rtmp连接,这需要在流URL后面有一些额外的选项.请参阅这里的 ffmpeg文档:关于librtmp的ffmpeg文档
和librtmp文档在这里: librtmp文档
对于未受保护的直播,您可能需要尝试引用流网址并在引号中附加"live = 1":
ffmpeg -i "rtmp://antena3fms35livefs.fplive.net/antena3fms35live-live/stream-antena3_1 live=1" -f image2 -vf fps=fps=1 out%d.png
Run Code Online (Sandbox Code Playgroud)