ubuntu ffmpeg 2

来源:互联网 发布:淘宝中国制造可信吗 编辑:程序博客网 时间:2024/06/01 07:22

接上一篇:

License: nonfree and unredistributable
Creating config.mak and config.h...
root@ran-desktop:/home/ran/ffmpeg#

root@ran-desktop:/home/ran/ffmpeg# sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info |    grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no    --default

**********************************************************************

 Done. The new package has been installed and saved to

 /home/ran/ffmpeg/ffmpeg_4:SVN-r26308-1_i386.deb

 You can remove it from your system anytime using:

      dpkg -r ffmpeg

**********************************************************************

4、install qt-faststart

This is a useful tool included with FFmpeg that rearranges a file with H.264 video, "such that the moov atom is in front of the data, thus facilitating network streaming". Basically, it allows web movies to start playing before they are completely downloaded. Usage: qt-faststart input.foo output.foo.

root@ran-desktop:/home/ran/ffmpeg# make tools/qt-faststart
CC    tools/qt-faststart.o
LD    tools/qt-faststart
rm tools/qt-faststart.o

sudo checkinstall --pkgname=qt-faststart --pkgversion "4:SVN-r`LANG=C svn info | /

grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no /

--default install -D -m755 tools/qt-faststart /usr/local/bin/qt-faststart

 

测试:

ffmpeg -y -i input.avi -pass 1 -vcodec libx264 -vpre fastfirstpass -b 512k -bt 512k -threads 0 -f mp4 -an /dev/null && ffmpeg -i input.avi -pass 2 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -b 512k -bt 512k -threads 0 -f mp4 output.mp4

 

root@ran-desktop:/home/ran# ffmpeg -i test.avi -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22  -threads 0 output.mp4
FFmpeg version SVN-r26308, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jan 12 2011 12:08:54 with gcc 4.4.3
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 0 /  0.16. 0
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.92. 0 / 52.92. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.72. 0 /  1.72. 0
  libswscale     0.12. 0 /  0.12. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Input #0, avi, from 'test.avi':
  Duration: 00:00:30.33, start: 0.000000, bitrate: 930 kb/s
    Stream #0.0: Video: indeo3, yuv410p, 176x184, 15 tbr, 15 tbn, 15 tbc
File 'output.mp4' already exists. Overwrite ? [y/N] y
[buffer @ 0xa71e260] w:176 h:184 pixfmt:yuv410p
[ffsink @ 0xa71cfc0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0xa7169c0] w:176 h:184 fmt:yuv410p -> w:176 h:184 fmt:yuv420p flags:0xa0000004
[libx264 @ 0xa71b4b0] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0xa71b4b0] profile High, level 1.1
[libx264 @ 0xa71b4b0] 264 - core 112 r1867 22bfd31 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf52.92.0
    Stream #0.0: Video: libx264, yuv420p, 176x184, q=10-51, 200 kb/s, 15 tbn, 15 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=  455 fps= 33 q=-1.0 Lsize=    1335kB time=30.20 bitrate= 362.1kbits/s   
video:1327kB audio:0kB global headers:0kB muxing overhead 0.591817%
frame I:4     Avg QP:23.83  size:  7003
[libx264 @ 0xa71b4b0] frame P:139   Avg QP:26.05  size:  4171
[libx264 @ 0xa71b4b0] frame B:312   Avg QP:28.52  size:  2406
[libx264 @ 0xa71b4b0] consecutive B-frames:  3.5%  8.4% 20.4% 67.7%
[libx264 @ 0xa71b4b0] mb I  I16..4:  9.8% 32.2% 58.0%
[libx264 @ 0xa71b4b0] mb P  I16..4:  3.2% 19.1% 23.0%  P16..4: 19.6% 20.3% 11.6%  0.0%  0.0%    skip: 3.1%
[libx264 @ 0xa71b4b0] mb B  I16..4:  0.6%  3.5%  5.0%  B16..8: 32.6% 26.2% 12.2%  direct:11.0%  skip: 8.8%  L0:40.3% L1:39.6% BI:20.2%
[libx264 @ 0xa71b4b0] 8x8 transform intra:40.4% inter:33.8%
[libx264 @ 0xa71b4b0] direct mvs  spatial:99.7% temporal:0.3%
[libx264 @ 0xa71b4b0] coded y,uvDC,uvAC intra: 91.0% 87.5% 46.3% inter: 61.1% 53.1% 0.9%
[libx264 @ 0xa71b4b0] i16 v,h,dc,p: 29% 47%  9% 15%
[libx264 @ 0xa71b4b0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 22% 19%  6%  6%  5%  9%  7% 14%
[libx264 @ 0xa71b4b0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 14% 11%  7%  9%  8% 10%  9% 12%
[libx264 @ 0xa71b4b0] i8c dc,h,v,p: 41% 25% 21% 13%
[libx264 @ 0xa71b4b0] Weighted P-Frames: Y:17.3% UV:11.5%
[libx264 @ 0xa71b4b0] ref P L0: 45.0% 12.3% 20.3% 10.5%  8.3%  3.1%  0.3%
[libx264 @ 0xa71b4b0] ref B L0: 73.4% 17.7%  6.7%  2.2%
[libx264 @ 0xa71b4b0] ref B L1: 93.9%  6.1%
[libx264 @ 0xa71b4b0] kb/s:358.24
[indeo3 @ 0xa717dd0] Found 1 unreleased buffers!
root@ran-desktop:/home/ran# ls
ffmpeg         qt-creator-linux-x86-opensource-2.0.1.bin  x264                   视频
ffmpeg.tar.gz  record.txt                                 x264.tar.gz            图片
hfrk           Screenshot-2.png                           xvidcore-1.1.3         文档
opencv         test.avi                                   xvidcore-1.1.3.tar.gz  下载
output.mp4     timll                                      公共的                 音乐
qt4.5          workspace                                  模板                   桌面
root@ran-desktop:/home/ran#

 

原创粉丝点击