【问题标题】:how to make ffserver working well in real time如何让ffserver实时运行良好
【发布时间】:2016-05-25 17:01:17
【问题描述】:

我曾经使用 ffserver 流式传输我的网络摄像头,它运行良好,但是当我使用 VLC 或 ffplay 检索流时,注意到流不是实时的,也不是连续的。

  • ffserver.conf
  • 8090 端口
  • 绑定地址 0.0.0.0
  • MaxClients 4
  • 最大带宽 10000
  • NoDaemo
  • TSP 端口 7654
  • RTSPBindAddress 0.0.0.0
  • 文件 /tmp/webcam.ffm
  • 文件最大尺寸 5M
  • feed webcam.ffm
  • 格式化flv
  • 视频编解码器flv
  • 视频帧率 2
  • VideoBufferSize 20000
  • 视频比特率 200
  • 视频QMin 5
  • 视频QMax 10
  • 视频尺寸 qvga
  • PreRoll 0
  • 无音频

我使用了命令行

 ffmpeg -s 160x128 -f video4linux -i /dev/video0 -r 15
  http://localhost:8090/feed1.ffm

【问题讨论】:

    标签: ffserver


    【解决方案1】:

    可能会增加比特率和分辨率。

    我在我的 webm over HTML5 配置文件中使用了以下参数,没有视频

    <Stream test1.webm>            # Output stream URL definition
       Feed feed1.ffm              # Feed from which to receive video
       Format webm
    
       # Audio settings
       #AudioCodec vorbis
       #AudioBitRate 64             # Audio bitrate
       NoAudio
       # Video settings
       VideoCodec libvpx
       VideoBufferSize 4
       #VideoCodec libx264
       VideoSize  720x576          # Video resolution
       VideoGopSize 2  
       #VideoIntraOnly 
       VideoFrameRate 25           # Video FPS
       AVOptionVideo flags +global_header
       AVOptionVideo quality realtime
       AVOptionVideo min-q 2 
       AVOptionVideo max-q 56
       AVOptionVideo target-bitrate 1000
       AVOptionVideo undershoot-pct 90
       AVOptionVideo buf-sz 60
       AVOptionVideo buf-initial-sz 4
       AVOptionVideo buf-optimal-sz 50
       AVOptionVideo kf-max-dist 999999
       AVOptionVideo deadline realtime
       AVOptionVideo passes 1
    
       PreRoll 0
       StartSendOnKey
       VideoBitRate 1000            # Video bitrate
    </Stream>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-26
      相关资源
      最近更新 更多