ffmpeg使用版本
http://johnvansickle.com/ffmpeg/
ffmpeg-release-32bit-static.tar.xz

解tar
cd ffmpeg-2.8.3
編譯參數
./configure --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-libvpx --disable-yasm
make && make install

做軟聯結至/usr/bin or /usr/local/bin

ln -s /usr/local/ffmpeg-release-32bit-static/ffserver /usr/bin/ffserver
ln -s /usr/local/ffmpeg-release-32bit-static/ffmpeg /usr/bin/ffmpeg
建立啟動檔案
vi /etc/ffserver
 
Port 8090                      # Port to bind the server to

BindAddress 0.0.0.0

MaxHTTPConnections 2000

MaxClients 1000

MaxBandwidth 10000             # Maximum bandwidth per client

                                                     # set this high enough to exceed stream bitrate

CustomLog -

NoDaemon                       # Remove this if you want FFserver to daemonize after start

 

<Feed feed1.ffm>               # This is the input feed where FFmpeg will send

   File /tmp/feed1.ffm            # video stream.

   FileMaxSize 512M             # Maximum file size for buffering video

   ACL allow 104.155.x.x

   ACL allow 10.240.0.14

   ACL allow 127.0.0.1

</Feed>

 

#<Stream test.webm>              # Output stream URL definition

#   Feed feed1.ffm              # Feed from which to receive video

#   Format webm

#

#   # Audio settings

#   AudioCodec vorbis

#   AudioBitRate 64             # Audio bitrate

#

#   # Video settings

#   VideoCodec libvpx

#   VideoSize 720x576           # Video resolution

#   VideoFrameRate 25           # Video FPS

#   AVOptionVideo flags +global_header  # Parameters passed to encoder

#                                       # (same as ffmpeg command-line parameters)

#   AVOptionVideo cpu-used 0

#   AVOptionVideo qmin 10

#   AVOptionVideo qmax 42

#   AVOptionVideo quality good

#   AVOptionAudio flags +global_header

#   PreRoll 15

#   StartSendOnKey

#   VideoBitRate 400            # Video bitrate

#</Stream>

 

<Stream test.rm>

Feed feed1.ffm

Format rm

VideoSize 640x480

AudioBitRate 32

VideoBitRate 128

VideoFrameRate 25

VideoGopSize 25

NoAudio

</Stream>

 

<Feed input1.ffm>

  File /tmp/input1.ffm

  FileMaxSize 512M

  ACL allow 104.155.x.x

  ACL allow 10.240.0.14

  ACL allow 127.0.0.1

</Feed>

 

<Stream screen1.webm>

  Feed input1.ffm

  Format webm

  VideoCodec libvpx

  VideoFrameRate 20

  VideoBufferSize 8000

  VideoBitRate 150

  VideoQMin 1

  VideoQMax 5

  VideoSize 640x400

  PreRoll 0

  StartSendOnKey

  NoAudio

  AVOptionVideo flags +global_header

  AVOptionAudio flags +global_header

</Stream>

 

<Stream status.html>            # Server status URL

   Format status

   # Only allow local people to get the status

#   ACL allow localhost

   ACL allow 192.168.0.0 192.168.255.255

   ACL allow 125.x.x.x

</Stream>

 

<Redirect index.html>    # Just an URL redirect for index

   # Redirect index.html to the appropriate site

   URL http://www.ffmpeg.org/

</Redirect>
啟動ffserver
ffserver -f /etc/ffserver.conf
送出ffmpeg視訊至ffm檔案串流webm
ffmpeg -i rtmp://x.x.x.x/gw/steam1 -r 15 -b 300k "http://127.0.0.1:8090/input1.ffm"

web後台

 

Hits: 100

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料