砍敺 IT_man 2017-3-28 13:02 蝺刻摩 3 ?5 X: W; J7 N2 n! L: p
- C4 u/ [1 ]9 }: O6 Y* u$ r# J" ZFFmpeg臭甈曉撩憭抒閬閮蝺刻圾蝣澆極瘀臭誑憭折蝺函Ⅳ澆ffmpeg舫曉蝣潘汪inux撟喳唬潘銋臭誑典嗅雿璆剔頂蝏銝蝺刻陌瑁嚗WindowsMac OS X蝑) Q. l5 e4 ~: \1 G5 }
C' I) g' R8 E2 ~; K& J
寞銝:
! p0 I# B2 `+ v! R+ v0 T" {
7 u0 Q T! S* O; a[摰鋆]) P" ~1 y; W3 h6 I. {. v: A
[/usr/local]#tar -jxvf ffmpeg-2.5.3.tar.bz2
: C7 Y% i v3 {! }- n[/usr/local]#cd ffmpeg-2.5.3
: y3 D2 D: F( l& }/ }# w
5 f& y" K! v1 ^+ |/ _$ u7 z
+ T) Y4 j% o v& h! W) d摰鋆yasm; M% i& W& J1 ~. ^# P
ffmpeg蝺刻陌銝剔箔擃compile摨佗雿輻其舐楊隞歹鈭舫閬雿輻券撌亙瑯, k# }! n: Q v. h# `& |
[/usr/local/ffmpeg-2.5.3]#yum -y install yasm e x1 I8 c4 p/ D- d" d
璅雿輻冽蝣潭孵摰鋆嚗銝頛yasm皞隞蝣潘嗅雿輻./configuremake隞亙make istall脰摰鋆
/ B% k0 I, S+ h6 s4 c[/usr/local/ffmpeg-2.5.3]#./configure --enable-shared --prefix=/usr/local/ffmpeg
; \0 j; M: _* }- O/ A% f% r+ N6 J8 F嗡葉enable-shared銵函內Y亙澈嚗臭誑靘隞亙蝺函雿輻剁臬瑁蝔摨銋靘鞈湧鈭摨怒憒銝銝enable-shared賊雿輻券亦孵蝺刻陌嚗甇斗銝Y摨恬Yffmpeg蝑臬瑁瑼銋瘥頛憭改雿隞銝閬摨怠停臭誑湔亙瑁6 Z3 L4 e& m( R$ a, d2 _# F# ]+ t: _
prefix銵函內撌亙瑕鋆桅嚗鋆∟身/usr/local/ffmpeg
: ^9 k0 d/ ^$ h+ I[/usr/local/ffmpeg-2.5.3]#make 5 e6 D7 K6 }% ~+ D3 u- l/ |" Q" f
[/usr/local/ffmpeg-2.5.3]#make install * d+ _. U' g* ^$ Y" D! \: j
& n; T2 s5 j+ R! y3 F; V: R8 e M
, `' }/ T2 B3 i$ Z頝臬:摰鋆摰/usr/local/ffmpegY銝桅嚗 - bin嚗臬瑁瑼桅
- lib嚗亙澈桅
- include嚗蝺函典啁剜隞嗥桅
( r8 q1 L( G3 c, L) @! g 銝蝞⊥航帷ompile臬臬瑁蝔摨瑁賡閬靘鞈惻ib銝Y摨恬臭誑Yso隞嗆瑁/usr/lib銝嚗銋臭誑湔乩耨寥蝵格隞嗚亦/etc/ld.so.conf隞塚
' {5 _' Z% B6 @* O[/usr/local/ffmpeg-2.5.3]#vi /etc/ld.so.conf( _+ H4 F6 n7 E2 Q) l
include ld.so.conf.d/*.conf5 F" I5 G9 o( A9 q+ l
3 t5 E1 `! d! o" e* n1 `3 i
潭臬臭誑/etc/ld.so.conf.d/撱箔啁隞逵fmpeg.conf嚗啣銝銵嚗喟榻fmpeglib桅嚗 \# @- H5 Y- u1 }: o! V- g
/usr/local/ffmpeg/lib
$ w5 b1 k/ a% L/ M( Z: B瑁ldconfig嚗湔追d.so.cache嚗雿蹂耨寧When run ldconfig show error:1 p% Y/ l- B$ G6 S! j+ G5 u# S
ldconfig: /usr/lib64/libgd.so.2 銝臭蝚西交 ==>
- W" o; w- }) nll /usr/lib64/. `. \+ j1 a7 S% T2 X
-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2
) B( C' Y* B Q- k$ r- V-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2.0.08 }5 P9 ]4 N# l" K% ^' Z
So:
: h5 q3 A9 z$ h; z# ?) i3 Qln -s /usr/lib64/libgd.so.2.0.0 /usr/lib64/libgd.so.2 撠梯圾瘙% M% s) ? F5 [5 \2 B# H. c1 @
臭誑 vi /etc/ld.so.cache /usr/local/ffmpeg/lib 臬血歇 cache銝
( w6 z6 b* w" G* }5 U2 K! G$ c' d6 A# r6 z* Z5 I
箔其遙雿唳寡賢湔亦狄fmpeg瑁嚗銝其蝙典./ffmpeg /usr/local/ffmpeg/bin/ffmpeg孵瑁甇文極瘀臭誑臬瑁瑼獢銴鋆賢軔in桅銝嚗灸in桅銝撱箇頠蝯憿隡潔Windows銝瑕嚗憒臬瑁瑼獢鋡怠支嚗頠蝯銋銝賜匱蝥雿輻剁蝖祇蝯臭誑蝜潛雿輻具撱粹蝯賭誘憒銝嚗 9 Q* s! a. r; H3 h+ f- o
4 F' q! z% m) h8 x2 {/ P
sudo ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffmpeg .
' h% I, E1 C! j0 w/ o3 E4 @8 ^* Fsudo ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffprobe .
7 m' {& y" |9 nsudo ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffserver .
9 _/ e% _! k; o1 i% j2 e8 `. g2 J- s% h0 l7 ?* ?
血嚗憒閬剌fmpeg剜隞塚憟賢include桅銝ffmpeg銴鋆賢/usr/include銝准
' @. [* r c# O% D7 M曉典臭誑究hell銝剔湔亥撓卯fmpeg瑁嚗蝯憒銝嚗
: u7 o; p% Z, J" Y# F- I
' s1 E$ ]1 C7 O+ c3 y! p6 D8 G8 x6 ?9 p6 t! T
[root@CentOS6 bin]# ffmpeg2 g: }4 S5 p6 u% Z/ `
ffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers; m$ N4 X1 I+ R) Q2 e* ~3 l2 \' P0 L
built on Oct 9 2015 16:11:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)+ t) h! K- s( y% \8 g" f
configuration: --enable-shared --prefix=/usr/local/ffmpeg
# A- i! {7 Q6 c% \- U, N6 a libavutil 54. 7.100 / 54. 7.100% F# e/ w u- F
libavcodec 56. 1.100 / 56. 1.100
5 ~4 S; w6 p8 j z9 g% S libavformat 56. 4.100 / 56. 4.100# c2 r3 x# k9 M/ T* T2 O
libavdevice 56. 0.100 / 56. 0.100
" e0 r7 F- V( ^; I! p8 g libavfilter 5. 1.100 / 5. 1.100
7 N) t8 e9 v! Q, B1 |( D" y# k libswscale 3. 0.100 / 3. 0.100
8 r+ J" Q. I. y2 h) c libswresample 1. 1.100 / 1. 1.100
- E8 _& b/ I2 AHyper fast Audio and Video encoder
5 ]. P' W( F% u0 eusage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...# B6 U( K) I: T' I$ L! a; g3 D
Use -h to get full help or, even better, run 'man ffmpeg'8 y. }( ^+ o( ^
( N+ v( C4 p8 ?寞鈭:
7 r- E7 J# B6 f5 v/ |
) j% t& L, g# b隞 ffmpeginstaller 摰鋆 ffmpeg 賊憟隞:) o) d( z$ H2 o
. F9 j: Z8 X% m. m; n+ `) p9 M, B
http://ffmpeginstaller.com銝頛唳摰桅嚗靘憒嚗/tmp/! G& ~! x+ C+ E8 V
閫憯蝮格敺嚗Y銝 ffmpeginstaller+祈 桅嚗靘憒嚗銝頛閫敺桅
1 a4 |" _ v# G" c5 W/tmp/ffmpeginstaller.8.0/5 b# l4 M, V% }" }% u
脣餌桅敺嚗銝隞支誑瑁. B0 L! A! S" @1 M. s2 t
2 Z7 w$ }8 k8 F) |* w( O; B6 r. q0 m
[root]# ./install
9 Z/ g1 W9 \9 u% c2 s4 i3 D/ p; j; Z, z. F( p4 J4 M7 J3 t& q
摰鋆蝔撘撠望憪脰摰鋆嚗閬瘜芸楛銝蝬脣颱頛閬瑼獢' ~. L! I) _3 r+ |5 P
嗅祕摰鋆蝔撘撠望 yum install 單穿摰鋆蝔憭抒 1 撠
: F" M, v; ?7 i" F5 ~3 L, O! w0 g銝 ffmpeginstaller 摰鋆頝ffmpeg賊憟隞塚$ C) `9 H$ K1 r ]
0 B; ~& D& m; x
( x; O$ S5 o% H9 l
" G( b' q6 n" `" P& h/ P: http://oldgrayduck.blogspot.tw/2 ... staller-ffmpeg.html( Z, y0 I1 q1 t' ?+ r3 m* l
/ Z7 q& B) o8 b6 ?5 |! }
/ b- e2 Y' Z: i
, i( j! ~# ?, ]1 ? |
|