Chinaunix首页 | 论坛 | 博客
  • 博客访问: 287784
  • 博文数量: 78
  • 博客积分: 3018
  • 博客等级: 少校
  • 技术积分: 950
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-07 02:33
文章分类

全部博文(78)

文章存档

2013年(1)

2012年(19)

2011年(45)

2008年(13)

分类: LINUX

2011-03-21 09:38:24

项目需求:把所有的视频都转换成flv文件,做成视频网站.

系统环境:
# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description:    CentOS release 5 (Final)
Release:        5
Codename:       Final

==============
软件需求:
wget
wget
wget
wget
wget
wget
wget
wget
wget

===============

yum -y install libogg               //support ogg format
yum -y install libogg-devel
yum -y install libvorbis             //support vorbis format
yum -y install libvorbis-devel
yum -y install libtheora-devel            

===============
1.yasm          
#wget
# tar -zxvf yasm-0.8.0.tar.gz |cd -
# cd yasm-0.8.0
# ./configure
# make && make install

2.H.264code
# wget
# tar -jxvf x264-snapshot-20090705-2245.tar.bz2
# cd x264-snapshot-20090705-2245
# ./configure --enable-shared
# make && make install                          //如果yasm版本太低,编译时会报错!

3.amrwb          
# wget
# tar -jxvf amrwb-7.0.0.3.tar.bz2
# cd amrwb-7.0.0.3
# ./configure && make && make install

4.amrnb
# wget
# tar -jxvf amrnb-7.0.0.2.tar.bz2
# cd amrnb-7.0.0.2
# ./configure && make && make install

5.FAAD2
# wget
# cd faad2-2.7
# ./configure --enable-shared
# make && make install

6.FAAC
# wget
# cd faac-1.28
# ./configure --enable-shared --with-mp4v2
# make && make install

7.XviD (DivX)
# wget
# tar -zxvf xvidcore-1.2.1.tar.gz
# cd xvidcore/build/generic/
# ./configure
# make && make install

8.libdts
# wget
#  tar jxvf libdca-0.0.5.tar.bz2
# cd libdca-0.0.5
# ./configure --enable-shared
# make && make install

9.LAME (MP3encoder)
#  wget
# tar zxvf lame-398-2.tar.gz
# cd lame-398-2
# ./configure --enable-shared
# make && make install

10.FFMPEG
# svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
# cd ffmpeg
# ./configure --enable-libamr-nb --enable-libamr-wb --enable-libmp3lame --enable-libtheora --enable-libfaad \
--enable-libfaadbin --enable-libfaac --enable-libx264 --enable-libvorbis --enable-libxvid \
--enable-gpl --disable-ffplay --disable-ffserver --disable-ipv6 --enable-nonfree  \
--enable-pthreads --extra-ldflags=-ldl      
# make
# make install

# ffmpeg
FFmpeg version SVN-r19346, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-libamr-nb --enable-libamr-wb --enable-libmp3lame --enable-libfaad --enable-libfaadbin --enable-libfaac --enable-libx264 --enable-libvorbis --enable-libxvid --enable-gpl --disable-ffplay --disable-ffserver --disable-ipv6 --enable-nonfree --extra-ldflags=-ldl
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.32. 0 / 52.32. 0
  libavformat   52.36. 0 / 52.36. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
  built on Jul  5 2009 13:57:55, gcc: 4.1.1 20070105 (Red Hat 4.1.1-52)
At least one output file must be specified

问题:格式转换时报错
Error while decoding stream #0.0
[libmp3lame @ 0x8c97b90]lame: output buffer too small (buffer index: 9195, free bytes: 597)
Audio encoding failed
给ffmpeg打补丁可以解决 lamemp3 编码结束时出现的这个错误
#wget
#cd /usr/local/src/ffmpeg/ffmpeg
#patch -p0 < ffmpeg-20080908-lame-flush-once.patch.txt
然后再重新编译回归正常。

参考文档:
            
阅读(2206) | 评论(0) | 转发(0) |
0

上一篇:freebsd初始配置

下一篇:pdo_mysql模块扩展

给主人留下些什么吧!~~