因為Ubuntu下的ffmpeg的package沒有將x264編譯進去,所以要重新編譯,步驟如下,備忘一下:
1 清理 ffmpeg 和x264相關的文件
sudo apt-get purge ffmpeg x264 libx264-dev
2.安裝一些庫文件
sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libx11-dev libxvidcore4-dev zlib1g-dev
3.安裝x264
cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" –default
4 安裝ffmpeg
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" –default
5做個試驗
ffmpeg -i movie.mpg -b 300000 -s 320×240 -vcodec mpeg4 -acodec aac movie.mp4
mp4creator -optimize movie.mp4
mp4creator -hint=1 movie.mp4
mp4creator -hint=2 movie.mp4
mp4creator -list movie.mp4
注意:在做mp4creator的時候會出現 一些類似報錯信息,可以跳過,繼續:
cri@cri-desktop:/usr/local/movies$ mp4creator -hint=1 03.m4a
MP4ERROR: MP4File::FindIntegerProperty: no such property - moov.trak[1].mdia.minf.stbl.stsd.*.esds.decConfigDescr.objectTypeId
cri@cri-desktop:/usr/local/movies$ mp4creator -hint=2 03.m4a
mp4creator: can't hint track type hint
mp4creator: error hinting track 2
cri@cri-desktop:/usr/local/movies$ mp4creator -list 03.m4a
Track Type Info
1 audio MPEG-4 AAC LC, 271.766 secs, 258 kbps, 44100 Hz
2 hint Payload mpeg4-generic for track 1
6 講處理過的文件放到DSS相關目錄下:
遠程打開, 如果沒有問題ok!
繼續研究
參考:
http://www.howtoforge.com/apples-darwin-streaming-server-on-centos-5.2-p2
没有评论:
发表评论