【问题标题】:How to convert RTSP stream into flv/swf Stream (w. ffmpeg)?如何将 RTSP 流转换为 flv/swf 流 (w. ffmpeg)?
【发布时间】:2011-01-18 18:59:34
【问题描述】:

我想将网络摄像头流(来自 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>

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

【问题讨论】:

    标签: ffmpeg webcam rtsp streaming-flv-video


    【解决方案1】:

    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 发送到的端口

    【讨论】:

    • 当我运行命令时,它说:输出调试:使用 sout 链 =transcodesamplerate=44100:httpdst=0.0.0.0:9000' main stream output debug: stream=9000' 主流输出调试:寻找 sout 流模块:0 个候选主流输出调试:没有 sout 流模块匹配“9000”主流输出调试:TIMER module_need():0.155 ms - 总计 0.155 ms / 1 intvls(平均 0.155 ms)主流输出调试:破坏链...(名称 =(null))主流输出调试:销毁链完成主流输出错误:流链失败,因为`transcodesamplerate=44100:httpdst=0.0.0.0:9000'
    【解决方案2】:

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

    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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-17
      • 2014-04-26
      • 1970-01-01
      • 2011-04-29
      • 1970-01-01
      • 2011-10-31
      • 2019-10-09
      • 2017-06-09
      相关资源
      最近更新 更多