砍敺 IT_man 2017-3-28 13:02 蝺刻摩 1 H$ a3 o# X; `; Z# \
, I3 e0 t- a4 R: x% i6 ~FFmpeg臭甈曉撩憭抒閬閮蝺刻圾蝣澆極瘀臭誑憭折蝺函Ⅳ澆ffmpeg舫曉蝣潘汪inux撟喳唬潘銋臭誑典嗅雿璆剔頂蝏銝蝺刻陌瑁嚗WindowsMac OS X蝑
: S3 G8 E) H: p+ \: @+ I
; T( P$ a2 j0 F Z' s9 N G9 L寞銝:$ o! V+ R+ k6 T Q9 w
) C9 _" Y) h! L+ S0 s
[摰鋆]% m, I( Y$ ^; U3 S3 N+ Q
[/usr/local]#tar -jxvf ffmpeg-2.5.3.tar.bz29 p4 Z+ E( s% r4 d+ K1 U
[/usr/local]#cd ffmpeg-2.5.3* v: s2 g( r1 v- `' Q: U+ V- g; x# w
; N9 }3 d* p. ]2 m( N' m( q1 j( F5 b% O C4 M7 {
摰鋆yasm
, G1 p2 C( F3 h! q/ t' [" V/ O3 i9 Lffmpeg蝺刻陌銝剔箔擃compile摨佗雿輻其舐楊隞歹鈭舫閬雿輻券撌亙瑯# w& `& ] ~% P+ N) a
[/usr/local/ffmpeg-2.5.3]#yum -y install yasm
: \; d: w' {& l# i4 I# T璅雿輻冽蝣潭孵摰鋆嚗銝頛yasm皞隞蝣潘嗅雿輻./configuremake隞亙make istall脰摰鋆2 G3 O, e$ I4 n3 h
[/usr/local/ffmpeg-2.5.3]#./configure --enable-shared --prefix=/usr/local/ffmpeg
0 n' X3 u0 K" @ Y$ R; H2 i嗡葉enable-shared銵函內Y亙澈嚗臭誑靘隞亙蝺函雿輻剁臬瑁蝔摨銋靘鞈湧鈭摨怒憒銝銝enable-shared賊雿輻券亦孵蝺刻陌嚗甇斗銝Y摨恬Yffmpeg蝑臬瑁瑼銋瘥頛憭改雿隞銝閬摨怠停臭誑湔亙瑁5 K2 E+ Y# m5 |
prefix銵函內撌亙瑕鋆桅嚗鋆∟身/usr/local/ffmpeg% Z# V' u" I8 V- v/ Q3 Z+ n9 z- W( G
[/usr/local/ffmpeg-2.5.3]#make + ]; P* I, p2 C" E
[/usr/local/ffmpeg-2.5.3]#make install
0 q& ^/ g, S% D& e- X* n; a! D" d8 u! P& b1 U5 k4 q
5 @0 Z7 ~) t" y- j/ n/ F
頝臬:摰鋆摰/usr/local/ffmpegY銝桅嚗 - bin嚗臬瑁瑼桅
- lib嚗亙澈桅
- include嚗蝺函典啁剜隞嗥桅& h+ E- _" l* z% s0 }* A
銝蝞⊥航帷ompile臬臬瑁蝔摨瑁賡閬靘鞈惻ib銝Y摨恬臭誑Yso隞嗆瑁/usr/lib銝嚗銋臭誑湔乩耨寥蝵格隞嗚亦/etc/ld.so.conf隞塚
9 u; r$ R: i* R3 y- e' p[/usr/local/ffmpeg-2.5.3]#vi /etc/ld.so.conf, i3 G. l' i8 n' I* N$ @( V
include ld.so.conf.d/*.conf
. X8 z7 J, _3 v
( H W% }+ o n) \& l潭臬臭誑/etc/ld.so.conf.d/撱箔啁隞逵fmpeg.conf嚗啣銝銵嚗喟榻fmpeglib桅嚗/ u7 U2 L$ K: U! x9 J y: k& D6 o
/usr/local/ffmpeg/lib
7 }0 {. o6 F9 k; }瑁ldconfig嚗湔追d.so.cache嚗雿蹂耨寧When run ldconfig show error:
. I) \' D; K; W2 Pldconfig: /usr/lib64/libgd.so.2 銝臭蝚西交 ==>
% f' u. F3 }; Z: @8 j4 Z$ all /usr/lib64/
, u( u7 `8 p& s! e7 x; B-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2
. ]$ G# T% U2 U* P1 j1 q5 F% s* u-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2.0.0
0 @$ k7 @- t# D' Z# C" fSo:
4 u1 V2 m+ }" S( Yln -s /usr/lib64/libgd.so.2.0.0 /usr/lib64/libgd.so.2 撠梯圾瘙
3 h* A0 w. m% G0 j+ i+ E. j1 l臭誑 vi /etc/ld.so.cache /usr/local/ffmpeg/lib 臬血歇 cache銝' B% p3 N" L9 t; {
+ f9 v+ f8 J. P
箔其遙雿唳寡賢湔亦狄fmpeg瑁嚗銝其蝙典./ffmpeg /usr/local/ffmpeg/bin/ffmpeg孵瑁甇文極瘀臭誑臬瑁瑼獢銴鋆賢軔in桅銝嚗灸in桅銝撱箇頠蝯憿隡潔Windows銝瑕嚗憒臬瑁瑼獢鋡怠支嚗頠蝯銋銝賜匱蝥雿輻剁蝖祇蝯臭誑蝜潛雿輻具撱粹蝯賭誘憒銝嚗
9 _! {' j& `# b5 t, ], X. [8 K" a9 |9 ^
sudo ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffmpeg .
- n% u& N# S3 F4 R, w$ {" x- n9 o8 _sudo ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffprobe .
5 Q- X" K8 v/ R5 {0 U0 ysudo ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffserver .
0 {0 y$ |+ s( H4 J( G* m9 A8 w G, p4 j, D
血嚗憒閬剌fmpeg剜隞塚憟賢include桅銝ffmpeg銴鋆賢/usr/include銝准
) r3 B7 R7 K! q& @6 D, C/ H曉典臭誑究hell銝剔湔亥撓卯fmpeg瑁嚗蝯憒銝嚗
+ P5 h: \8 p: _$ X1 Y
8 {8 }) `* R+ w7 E0 ^; e1 O- i8 X& }
[root@CentOS6 bin]# ffmpeg
! e; S, ^9 W; Fffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers
5 U2 J6 s/ c6 a; C/ r. d, x: o built on Oct 9 2015 16:11:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)* Z/ o, f7 H. i
configuration: --enable-shared --prefix=/usr/local/ffmpeg
% G& a' ]6 }; _ libavutil 54. 7.100 / 54. 7.100$ T8 U; u8 Q E: V
libavcodec 56. 1.100 / 56. 1.100
6 B2 u+ M U, ] libavformat 56. 4.100 / 56. 4.100
' I% \# x; L4 B" Q y/ C: W# @# g2 ^1 F libavdevice 56. 0.100 / 56. 0.100
3 q0 d. }" ~9 s libavfilter 5. 1.100 / 5. 1.100, S, x ]: \) s
libswscale 3. 0.100 / 3. 0.100. l. t6 f2 x- u7 m) p
libswresample 1. 1.100 / 1. 1.1009 p1 c. W8 `1 p/ W" d7 p* B
Hyper fast Audio and Video encoder2 C1 @5 {' H4 B% g+ {
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...1 w1 _1 ^, ^: v. m
Use -h to get full help or, even better, run 'man ffmpeg'
5 q0 q+ C3 p! N3 d) n& b5 Y& y' P& f8 C5 }5 b
寞鈭:' z+ ?7 t2 p5 t3 z
% J" w I1 N1 E$ E- L隞 ffmpeginstaller 摰鋆 ffmpeg 賊憟隞: R% q( b0 {/ ]( z9 |
- J/ h% P4 H, z2 z# P8 w
http://ffmpeginstaller.com銝頛唳摰桅嚗靘憒嚗/tmp/
1 X3 v7 f7 D4 X- C4 ~! [5 B. h閫憯蝮格敺嚗Y銝 ffmpeginstaller+祈 桅嚗靘憒嚗銝頛閫敺桅4 o7 S4 V* a2 W" a$ A
/tmp/ffmpeginstaller.8.0/
% C$ j: k7 X/ e$ O4 q/ ]3 A脣餌桅敺嚗銝隞支誑瑁 p1 L% W: Y& p4 r( }. K: b- A
$ V: _+ E5 h* u
[root]# ./install1 `+ _' k9 A \; C1 @
$ P% G& g; k" i5 g: ]摰鋆蝔撘撠望憪脰摰鋆嚗閬瘜芸楛銝蝬脣颱頛閬瑼獢
0 u7 d: M5 F& o9 o嗅祕摰鋆蝔撘撠望 yum install 單穿摰鋆蝔憭抒 1 撠
; _9 w! y# w( B0 t: _銝 ffmpeginstaller 摰鋆頝ffmpeg賊憟隞塚
4 h# X, w$ g' h4 A0 n2 M
. W1 ~& |6 {$ Q$ j
( @8 Y5 k8 y6 a- Q. \9 s
; P9 ]: X2 o( s6 l$ H
: http://oldgrayduck.blogspot.tw/2 ... staller-ffmpeg.html2 W$ \- U5 b. P3 X/ ^( m0 U
, u* z5 D6 E4 \( g8 |; e& x
1 V$ X7 @$ m- q6 h" M
! A" ]. }" r& y4 f; p |
|