一区二区三区日韩精品-日韩经典一区二区三区-五月激情综合丁香婷婷-欧美精品中文字幕专区

分享

使用ffmpeg推流到Wowza

 mediatv 2015-01-07



Step by step instructions for using FFmpeg as a live video/audio encoder with Wowza Media Server.

 

Updated for FFMpeg build r25705 (22 November 2010)

 

Note: Wowza Media Systems provides these instructions on as "AS-IS" basis. FFmpeg is not a Wowza Media Systems product. If you have problems getting FFmpeg to work properly it is best to contact the FFmpeg through their forums or wiki.

 

To get started, download and install FFmpeg for your platform on the same machine running Wowza Media Server. We will be re-streaming the sample filesample.mp4. The following tutorial is for Windows only. I used the most recent daily build of FFmpeg from this site:

 

http://ffmpeg./autobuilds/ (編譯好的windows版FFmpeg下載地址)

 

FFmpeg Setup (Windows)

  1. In the root the C: drive create the following directory structure:
    Code:
    C:/usr/local/share/ffmpeg
    Copy all the files from the presets folder of the FFmpeg package into this new directory.
  2. Open a command prompt and change directory to the FFmpeg bin folder.
  3. Enter the following FFmpeg command which will re-streaming the file sample.mp4 from the [install-dir]/content folder of the Wowza Media Server 2 installation:
    Code:
    ffmpeg -i "%WMSAPP_HOME%/content/sample.mp4" -re -vcodec libx264 -vpre default -vpre baseline -g 60 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

 

上面的代碼有誤,應(yīng)該為:

ffmpeg -i "%WMSAPP_HOME%/content/sample.mp4" -re -vcodec libx264 -fpre C:\usr\local\share\ffmpeg\libx264-ipod640.ffpreset  -g 60 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

 

使用ffmpeg實(shí)時(shí)轉(zhuǎn)碼mms直播流有問題,官方文檔使用mmst(mms over tcp)或者mmsh(mms over http),使用時(shí)均報(bào)錯(cuò)。待解決。

解決辦法:開啟wms的http功能,在根節(jié)點(diǎn)上開啟。使用播放地址:mmsh://220.189.247.171/yswh,mmst播放有問題。

 

Next, follow the instructions in the following tutorial article:

 

How to publish and play a live stream (MPEG-TS based encoder)

 

 

 

See Also:

FFmpeg website

FFmpeg Documentation

 

Note: The sample.mp4 file is about 6 minutes long. FFmpeg will stop when it hits the end of this file. So you may have to re-start FFmpeg several times during configuration and testing.

 

Note: The above FFmpeg command lines will produce a low bitrate, low complexity, low quality stream that should be playable on most playback devices and systems. The following is a higher quality version just to provide a glimpse of what VLC can do:

 

Code:

ffmpeg -i "%WMSAPP_HOME%/content/sample.mp4" -re -vcodec libx264 -vpre default -vpre main -g 60 -vb 500000 -strict experimental -acodec aac -ab 128000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

Note: FFmpeg can also be used to transcode a RTSP, native RTP or MPEG-TS stream. Simply change the first argument of each of the command lines (the path to the sample.mp4 file) to the desired source to be transcoded and remove the -re command line option. Here are a few examples:

 

Code:

RTSP/RTP camera:
ffmpeg -i "rtsp://192.168.1.22/mycamera" -vcodec libx264 -vpre default -vpre baseline -g 60 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

MPEG-TS stream:
ffmpeg -i "udp://localhost:1234" -vcodec libx264 -vpre default -vpre baseline -g 60 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

Native RTP stream:
ffmpeg -i "unicast.sdp" -vcodec libx264 -vpre default -vpre baseline -g 60 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

Note: If you would like to host FFmpeg on a different machine as the server hosting Wowza Media Server, you can modify any of the command lines above by changingudp://127.0.0.1:10000 to the IP address of the server running Wowza Media Server 2 and any destination UDP port. Be sure the specified UDP port is open on any routers or firewalls between the server running VLC and the server running Wowza Server.

 

Note: FFmpeg can publish stream using other outgoing protocols such as RTMP and RTSP/RTP (QuickTime ANNOUNCE).

 

To send a stream using RTMP, change the destination portion of the FFmpeg URL:

 

Code:

from:
-f mpegts udp://127.0.0.1:10000?pkt_size=1316

to:
-f flv rtmp://127.0.0.1/live/myStream

The format of the RTMP URL portion is:

 

Code:

rtmp://[wowza-ip-address]/[application]/[streamName]

To send a stream using RTSP/RTP, change the destination portion of the FFmpeg URL:

 

Code:

from:
-f mpegts udp://127.0.0.1:10000?pkt_size=1316

to:
-f rtsp rtsp://127.0.0.1:1935/live/myStream.sdp

The format of the RTMP URL portion is:

 

Code:

rtsp://[wowza-ip-address]:1935/[application]/[streamName]


    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多

    国产精品视频一区麻豆专区| 清纯少妇被捅到高潮免费观看| 亚洲清纯一区二区三区| 九九热视频网在线观看| 亚洲av熟女国产一区二区三区站| 黑丝袜美女老师的小逼逼| 熟女乱一区二区三区丝袜| 国产又粗又猛又长又黄视频| 好吊日在线视频免费观看| 扒开腿狂躁女人爽出白浆av| 欧洲日韩精品一区二区三区| 国产午夜福利在线观看精品| 中文字幕久久精品亚洲乱码| 日本大学生精油按摩在线观看| 亚洲黄香蕉视频免费看| 日韩一区二区三区嘿嘿| 久久这里只精品免费福利| 国产成人精品一区在线观看| 日韩人妻免费视频一专区| 国产综合一区二区三区av | 午夜精品久久久免费视频| 亚洲中文字幕人妻系列| 深夜日本福利在线观看| 欧美日韩成人在线一区| 国产日本欧美韩国在线| 少妇人妻无一区二区三区| 肥白女人日韩中文视频| 日韩国产亚洲欧美另类| 日本美国三级黄色aa| 激情亚洲一区国产精品久久| 亚洲一区二区三区av高清| 老司机精品福利视频在线播放| 日韩欧美精品一区二区三区| 免费精品一区二区三区| 久草视频在线视频在线观看| 国产超薄黑色肉色丝袜| 特黄大片性高水多欧美一级| 精品人妻一区二区三区四区久久| 精品人妻一区二区三区免费看 | 精品精品国产自在久久高清| 成人日韩视频中文字幕|