|
![]() |
⊙溢泰的旅遊休閒相簿⊙ - ⊙WaterGoGoGo旅遊趣⊙ - ⊙FB:WaterGoGoGoTravel⊙ |
|
|||
|
|||||
|
★★ CentOS 5.x 支援多媒體套件安裝 ★★ | 【回教學首頁】 |
◎.安裝 Priorities | ◎. 安裝 RPMforge 第三方套件庫 |
◎.安裝相關多媒體函示庫套件 | ◎.安裝 MPlayer 套件 |
◎.安裝 VLC 套件 | ◎.使用 Source Code 重新編譯 VLC Player |
◎. | ◎. |
◎.安裝編譯 FFMPEG 所需全部套件 |
◎.使用 YUM 安裝 FFMPEG | ◎.使用 Source Code 重新編譯 FFMPEG |
【安裝 Priorities】
參考:http://wiki.centos.org/zh-tw/PackageManagement/Yum/Priorities 解決MPlayer 或 VLC Player.....多媒體套件無法安裝的問題, 步驟一:安裝 Priorities 套件 [root@localhost ~]# yum install yum-plugin-priorities CentOS-5: [root@localhost ~]# yum install yum-priorities 步驟二:修改與檢查 priorities.conf
步驟三:新增 obsoletes 套件屬性(非必須)
當 priorities 套件被啟用後,你可以加入下面一行為套件庫增設優先次序:
步驟四:修改 CentOS-Base.repo
|
|||
安裝 RPMforge 第三方套件庫
安裝 RPMforge 套件 請先至 http://pkgs.repoforge.org/rpmforge-release/ 下載最新的 RPMforge 套件庫到你的電腦 [root@localhost ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm 安裝 DAG 的 GPG 金鑰 檢查你所下載的套件 安裝 步驟四:修改 rpmforge.repo
# vi /etc/yum.repos.d/rpmforge.repo 檢查更新
安裝 Macromedia 套件庫(提供 flash 支援如有安裝過就不用再安裝) |
|||
安裝相關多媒體函示庫套件
安裝 VideoLAN VLC Player
|
|||
使用 YUM 安裝 MPlayer
安裝 MPlayer
|
|||
使用 YUM 安裝 VLC Player
安裝 VideoLAN VLC Player 注意:VLC 不能用 ROOT 帳號執行 |
|||
使用 Source Code 重新編譯 VLC Player
最新版VLC:http://download.videolan.org/pub/videolan/vlc/last/ [root@localhost ~]# yum -y install glibc gcc gcc-c++ autoconf automake libtool [root@localhost ~]# wget -c
http://download.videolan.org/pub/videolan/vlc/0.9.9a/vlc-0.9.9a.tar.bz2 [root@localhost ~]# yum install libmpeg2-devel [root@localhost ~]# wget -c
http://download.videolan.org/pub/libdvbpsi/0.1.6/libdvbpsi5-0.1.6.tar.bz2 注意:VLC 不能用 ROOT 帳號執行 |
|||
安裝編譯 FFMPEG 所需全部套件
檢查是否安裝 Priorities 與 RPMforge 第三方套件與相關設定,請檢查本頁最上面步驟 確認系統是最新的更新 更新所有用到的套件包含 Codec 與編譯所需套件
安裝 x264 Library 解壓縮: 編譯前先確定 x264 沒有安裝過 編譯與安裝 x264 |
|||
使用 YUM 安裝 FFMPEG
[root@localhost ~]# yum -y install ffmpeg
|
|||
|
|||
使用 Source Code 重新編譯 FFMPEG
[root@localhost ~]# yum -y install ffmpeg |
|||
參考來源網址: http://wiki.centos.org/zh-tw/AdditionalResources/Repositories/RPMForge#head-3471c733c14056c58f8a274b2b22e7ac9f42bf4d 如何在 CentOS 5 設置多媒體 http://wiki.centos.org/zh-tw/TipsAndTricks/MultimediaOnCentOS http://actychen.blogspot.com/2009/06/centos4flash9-install.html 編譯 VLC 參考 http://www.wretch.cc/blog/chunglai/25941416 http://www.nginxs.com/linux/459.html ffmpeg 安裝參考 http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat http://hupuzhao.com/centos-5-ffmpeg-install 測試: ffmpeg -i boa1.mpg -s 480x270 -vcodec libx264 -acodec aac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 16:9 -strict experimental output2.mp4 HTTP Live Streaing.... http://gps3939889.blogspot.com/2010/09/http-streaming-server-for-iphone.html 編譯 segmenter # svn checkout http://httpsegmenter.googlecode.com/svn/trunk/ segmenter # gcc -Wall -g segmenter.c -o segmenter -lavformat -lavcodec -lavutil -std=c99 轉換為 Apple http live streaming 格式 ffmpeg -i Sa_DingDing_Alive_720x480H264_2Mh.mpg -acodec libmp3lame -ab 96k -ac 2 -vcodec libx264 -s 320x240 -b 300k -level 30 -vpre slow -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -f mpegts - | segmenter - 10 test test.m3u8 http://10.2.2.95/ ==OK== ffmpeg -i Artbeats_1280x720H264_2M.mp4 -f mpegts -s 320x240 -acodec libmp3lame -ar 48000 -ab 96k -vcodec libx264 -b 384k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bufsize 256k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -g 30 - | segmenter - 5 A5 A5.m3u8 http://10.2.2.94/ ffmpeg -i Jolin_Taiwan_Song_2010_320x240AVC.mp4 -f mpegts -acodec libmp3lame -ar 48000 -ab 128k -s 320*240 -vcodec libx264 -b 300k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 96k -maxrate 300k -bufsize 300k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 31 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 1 test.ts #!/bin/sh BR=800k echo ffmpeg -i $1 -f mpegts -acodec libmp3lame -ar 48000 -ab 64k -s 320*240 -vcodec libx264 -b $BR -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 96k -maxrate $BR -bufsize $BR -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 31 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 1 sample_$BR_pre.ts echo segmenter sample_$BR_pre.ts 30 test test.m3u8 http://10.2.2.95/ echo rm -f sample_$BR_pre.ts |
最後更新: 2011年11月25日 |