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播放音频)

  • 相关阅读:
    Notification的使用
    Spring面向切面之AOP深入探讨
    使用注解配置Spring框架自动代理通知
    回顾Spring框架
    Spring利器之包扫描器
    Spring 核心概念以及入门教程
    Struts 2之动态方法调用,不会的赶紧来
    Struts2之过滤器和拦截器的区别
    Struts 2开讲了!!!
    Mybatis开篇以及配置教程
  • 原文地址:https://www.cnblogs.com/duacai/p/10347169.html
Copyright © 2011-2022 走看看