如何将RTSP流转换为flv/swf流(w.ffmpeg)?

如何将RTSP流转换为flv/swf流(w.ffmpeg)?,ffmpeg,webcam,rtsp,streaming-flv-video,Ffmpeg,Webcam,Rtsp,Streaming Flv Video,我想嵌入一个网络摄像头流(从geovision视频服务器)到一个网站。不幸的是,只有rtsp流可以直接访问视频数据 我尝试了一系列不同的变体。使用此版本,我没有收到任何错误: openRTSP -b 50000 -w 352 -h 288 -f 5 -v -c -u admin password rtsp://xxxxxx.dyndns.org:8554/CH001.sdp | \ ffmpeg -r 5 -b 256000 -f mp4 -i - http://127.0.0.1:8090/f

我想嵌入一个网络摄像头流(从geovision视频服务器)到一个网站。不幸的是,只有rtsp流可以直接访问视频数据

我尝试了一系列不同的变体。使用此版本,我没有收到任何错误:

openRTSP -b 50000 -w 352 -h 288 -f 5 -v -c -u admin password rtsp://xxxxxx.dyndns.org:8554/CH001.sdp | \
ffmpeg -r 5 -b 256000 -f mp4 -i - http://127.0.0.1:8090/feed1.ffm
不幸的是,我没有视频。有时我会看到一帧网络摄像头,但并没有直播

这是我的ffserver.conf

Port 8090
BindAddress 0.0.0.0
MaxClients 200
MaxBandwidth 20000
CustomLog /var/log/flvserver/access.log

NoDaemon

# Server Status
<Stream stat.html>
Format status
</Stream>

<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 200K
ACL allow 127.0.0.1
</Feed>

# SWF output - great for testing
<Stream test.swf>
 # the source feed
 Feed feed1.ffm
 # the output stream format - SWF = flash
 Format swf
 #VideoCodec flv
 # this must match the ffmpeg -r argument
 VideoFrameRate 5
 # another quality tweak
 VideoBitRate 256K
 # quality ranges - 1-31 (1 = best, 31 = worst)
 VideoQMin 1
 VideoQMax 3
 VideoSize 352x288
 # wecams don't have audio
 NoAudio
</Stream>
端口8090
BindAddress 0.0.0.0
MaxClients 200
最大带宽20000
CustomLog/var/log/flvserver/access.log
诺达蒙
#服务器状态
格式状态
文件/tmp/feed1.ffm
FileMaxSize 200K
ACL允许127.0.0.1
#SWF输出-非常适合测试
#源提要
饲料1.ffm
#输出流格式-SWF=闪存
格式swf
#视频编解码器
#这必须与ffmpeg-r参数匹配
视频帧率5
#另一个质量调整
视频比特率256K
#质量范围-1-31(1=最佳,31=最差)
VideoQMin 1
VideoQMax 3
视频大小352x288
#网络摄像头没有音频
诺奥迪奥

我做错了什么?test.swf似乎永远都在加载…

vlc
尝试了类似的方法,它对我很有效

vlc.exe -I http -vv camURL :sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:http{mux=ffmpeg{mux=flv},dst=addr:availablePort}
camurl是相机的url

addr是希望将
httpstream
发送到的地址


availablePort是您希望将
httpstream
发送到的端口

您需要以正确的方式插入引号:

cvlc rtsp://192.168.13.162:554/ :sout='#transcode{vcodec=FLV1,vb=2048,fps=25,scale=1,acodec=none,deinterlace}:http{mime=video/x-flv,mux=ffmpeg{mux=flv},dst=0.0.0.0:5555/}' :no-sout-standard-sap :ttl=5 :sout-keep :no-audio --rtsp-caching 10200 --video --no-sout-audio --udp-caching=30000 --http-caching=5000

当我运行命令时,它显示:output debug:using sout chain=
transcodemamplerate=44100:httpdst=0.0.0:9000'main stream output debug:stream=
9000'main stream out debug:looking sout stream module:0候选者main stream out debug:no sout stream module匹配的“9000”main stream out debug:TIMER module\u need():0.155 ms-总计0.155 ms/1 intvls(平均0.155 ms)主流输出调试:正在销毁链。。。(name=(null))主流输出调试:销毁链完成主流输出错误:“TranscodeAmplerate=44100:httpdst=0.0.0.0:9000”的流链失败