zoukankan      html  css  js  c++  java
  • ffmpeg推流配置文件ffserver.conf

    学ffmpeg之际想看看推流,折腾了一天完全是配置的原因,现记录一下供以后查找。

    推流还有个live555,想了解可以去搜索下,当然方案不止这些。

    http://www.ffmpeg.org/ffserver.html

    # 注释以#开头
    Port 8090 BindAddress 0.0.0.0 MaxHTTPConnections 2000 MaxClients 1000 MaxBandwidth 1000000 CustomLog -
    <Feed video.ffm> File /tmp/video.ffm FileMaxSize 1024M ACL allow 127.0.0.1 </Feed> <Feed sound.ffm> File /tmp/sound.ffm FileMaxSize 100M ACL allow 127.0.0.1 </Feed> <Stream live.flv> Format flv Feed video.ffm VideoCodec libx264 VideoFrameRate 24 VideoBitRate 5120 VideoSize 1920x1080 AVOptionVideo crf 23 AVOptionVideo preset medium AVOptionVideo flags +global_header AudioCodec aac Strict -2 AudioBitRate 320 AudioChannels 2 AudioSampleRate 44100 AVOptionAudio flags +global_header </Stream> <Stream live.flac> Feed sound.ffm Title "Music Live" AudioBitRate 320 AudioChannels 2 AudioSampleRate 44100 NoVideo </Stream> <Stream stat.html> Format status ACL allow localhost ACL allow 192.168.0.0 192.168.255.255 </Stream> <Redirect index.html> URL http://www.ffmpeg.org/ </Redirect>

      将上述代码保存成文本文件,例如:ffserver.conf

      通过 ffserver -f ffserver.conf  启动ffserver

      使用 ffmpeg -i xx.mp4 http://ip:port/video.ffm  将xx.mp4转码到ffserver的视音频(sound.ffm转码到单独音频)

      播放 http://ip:port/live.flv  播放音视频(live.flac播放音频)

  • 相关阅读:
    picturebox 图片自适应
    C#中如何生成矢量图
    测试ODBC与OLE
    ODBC具体使用
    C#中的OLEDB连接2
    C#中的ODBC、OLEDB连接
    c#执行并行任务之Parallel与TaskFactory
    C# 4.0 新特性之并行运算(Parallel)
    app的下载中心
    第三方库列表
  • 原文地址:https://www.cnblogs.com/duacai/p/10347169.html
Copyright © 2011-2022 走看看