砍敺 IT_man 2017-3-28 13:02 蝺刻摩 0 o: m$ Z" ~& R4 a* Y5 V
; ?; g1 l5 L2 m c d
FFmpeg臭甈曉撩憭抒閬閮蝺刻圾蝣澆極瘀臭誑憭折蝺函Ⅳ澆ffmpeg舫曉蝣潘汪inux撟喳唬潘銋臭誑典嗅雿璆剔頂蝏銝蝺刻陌瑁嚗WindowsMac OS X蝑
$ `. F5 l) Z* H! |4 W0 `! z( K9 i; `5 m! r2 ^; |2 T
寞銝:6 {7 T$ u `4 Q0 ], B* V7 S; ^ b, ?4 `
; T1 @. p2 ]* S( T5 q( `
[摰鋆]7 N3 g1 K, e; ]5 s" ~ k) n
[/usr/local]#tar -jxvf ffmpeg-2.5.3.tar.bz2
% i) U! O5 ?( U8 G; O[/usr/local]#cd ffmpeg-2.5.3- h, G$ X) D6 v: q4 e6 V
- z5 E8 I: a- D6 ]9 K! }! {$ {5 K# n' P1 g
摰鋆yasm
: ]/ M/ W' V7 T" q, d Cffmpeg蝺刻陌銝剔箔擃compile摨佗雿輻其舐楊隞歹鈭舫閬雿輻券撌亙瑯9 R1 q4 L" K& F
[/usr/local/ffmpeg-2.5.3]#yum -y install yasm
# m0 i, K/ O/ E. J* U0 q J璅雿輻冽蝣潭孵摰鋆嚗銝頛yasm皞隞蝣潘嗅雿輻./configuremake隞亙make istall脰摰鋆$ [! i4 m! Q' N0 H# L1 m. C6 M
[/usr/local/ffmpeg-2.5.3]#./configure --enable-shared --prefix=/usr/local/ffmpeg3 t: J) h2 o' g/ d7 b7 S$ s
嗡葉enable-shared銵函內Y亙澈嚗臭誑靘隞亙蝺函雿輻剁臬瑁蝔摨銋靘鞈湧鈭摨怒憒銝銝enable-shared賊雿輻券亦孵蝺刻陌嚗甇斗銝Y摨恬Yffmpeg蝑臬瑁瑼銋瘥頛憭改雿隞銝閬摨怠停臭誑湔亙瑁4 L# R$ p0 p6 |3 `) E8 N
prefix銵函內撌亙瑕鋆桅嚗鋆∟身/usr/local/ffmpeg
1 {4 h* h W. P- q[/usr/local/ffmpeg-2.5.3]#make
2 \6 A* w! n3 N% \+ z9 h7 \! U( v[/usr/local/ffmpeg-2.5.3]#make install 7 D7 y/ `9 E# L; T
( @: Z9 \& t. A; N' X4 c
J( b5 L: z8 r* c1 n, K頝臬:摰鋆摰/usr/local/ffmpegY銝桅嚗 - bin嚗臬瑁瑼桅
- lib嚗亙澈桅
- include嚗蝺函典啁剜隞嗥桅
% B% I. \( Q2 V- b7 u- X/ A 銝蝞⊥航帷ompile臬臬瑁蝔摨瑁賡閬靘鞈惻ib銝Y摨恬臭誑Yso隞嗆瑁/usr/lib銝嚗銋臭誑湔乩耨寥蝵格隞嗚亦/etc/ld.so.conf隞塚
$ h& [5 S6 B/ N F# N" k' A[/usr/local/ffmpeg-2.5.3]#vi /etc/ld.so.conf
! w( {' {% k& q% s$ B5 g6 y0 jinclude ld.so.conf.d/*.conf" K5 o) v, l! F$ p& |
, X# P( u' o2 |6 y: ?8 P$ I
潭臬臭誑/etc/ld.so.conf.d/撱箔啁隞逵fmpeg.conf嚗啣銝銵嚗喟榻fmpeglib桅嚗
) U% d( Y0 j+ W8 c1 s+ K& r/usr/local/ffmpeg/lib
, [1 j6 D$ L( R, S# h% M/ U2 D瑁ldconfig嚗湔追d.so.cache嚗雿蹂耨寧When run ldconfig show error:# e( a6 S9 s# r9 f% {! d5 t3 \$ X
ldconfig: /usr/lib64/libgd.so.2 銝臭蝚西交 ==>
! i* n, G* E4 d0 X5 x4 Gll /usr/lib64/
( v$ [3 p$ _1 G! r* Y-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2+ p; X* x" M" F( D, o
-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2.0.0/ y5 W2 j( a& ^. k" X
So:" `0 m& }2 y& r! j$ I3 q4 G
ln -s /usr/lib64/libgd.so.2.0.0 /usr/lib64/libgd.so.2 撠梯圾瘙
/ `5 W% X0 Q& [6 s3 [臭誑 vi /etc/ld.so.cache /usr/local/ffmpeg/lib 臬血歇 cache銝
7 Z8 x7 n |& d' s0 N" v4 y
* p+ K8 c2 @0 {+ c7 B箔其遙雿唳寡賢湔亦狄fmpeg瑁嚗銝其蝙典./ffmpeg /usr/local/ffmpeg/bin/ffmpeg孵瑁甇文極瘀臭誑臬瑁瑼獢銴鋆賢軔in桅銝嚗灸in桅銝撱箇頠蝯憿隡潔Windows銝瑕嚗憒臬瑁瑼獢鋡怠支嚗頠蝯銋銝賜匱蝥雿輻剁蝖祇蝯臭誑蝜潛雿輻具撱粹蝯賭誘憒銝嚗
6 Y0 I& v7 J7 P: m5 }8 |: y% h' w+ W% i7 B4 y
sudo ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffmpeg .
& D4 {1 f. x' V1 I! Vsudo ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffprobe .
- j( @ d: ]; Y: E( tsudo ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffserver .
. G* Q/ p% f, H& s8 u2 Y4 [; X2 i0 K- s- H' d
血嚗憒閬剌fmpeg剜隞塚憟賢include桅銝ffmpeg銴鋆賢/usr/include銝准
9 A* B: H) t6 a+ V+ I3 i+ ]1 z& E曉典臭誑究hell銝剔湔亥撓卯fmpeg瑁嚗蝯憒銝嚗, f5 C* l/ O5 T4 U0 Q8 t6 Y4 ~
8 ^% H1 |, m5 I4 R' U0 n& E% @9 G+ } ~5 F- f( G
[root@CentOS6 bin]# ffmpeg
( G, s) K+ |8 Mffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers$ E. w4 c5 m, C) W) b0 J5 H
built on Oct 9 2015 16:11:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
0 D" }# z6 K! F configuration: --enable-shared --prefix=/usr/local/ffmpeg
- R8 f/ C, y5 ]5 ]* c' a& A) w" K libavutil 54. 7.100 / 54. 7.100; N7 G' k7 S3 y- I
libavcodec 56. 1.100 / 56. 1.100
; ]' I0 K d0 z) ^ libavformat 56. 4.100 / 56. 4.100
6 @8 k3 B9 K9 _' x3 S8 r/ d9 V! h libavdevice 56. 0.100 / 56. 0.100
* P; r" } T/ a( M( R: x @: g* O# N libavfilter 5. 1.100 / 5. 1.100
# U* J/ v- k: a% U" n7 g8 U libswscale 3. 0.100 / 3. 0.1008 F7 b6 {. I1 m, N3 m% Y# A, m# h
libswresample 1. 1.100 / 1. 1.100
7 E1 z0 t# Z1 w* C9 mHyper fast Audio and Video encoder9 g# w7 i7 y1 |
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
* s4 A: K8 L$ I/ ?Use -h to get full help or, even better, run 'man ffmpeg'
8 p# Q8 `; x9 ]! A& L
) M _2 X) i( A) }+ ~' s1 k寞鈭:0 e2 Z H/ f! U1 G# t
* w( {- k1 W) Z& |) D* X
隞 ffmpeginstaller 摰鋆 ffmpeg 賊憟隞:8 L7 g U' c* q8 |: Q8 H
& J8 S/ T y+ N. E
http://ffmpeginstaller.com銝頛唳摰桅嚗靘憒嚗/tmp/
0 I8 N. J4 r; `閫憯蝮格敺嚗Y銝 ffmpeginstaller+祈 桅嚗靘憒嚗銝頛閫敺桅
( I& R2 x3 o, o% C7 n0 s/ Y2 Y1 e7 d. P/tmp/ffmpeginstaller.8.0/4 n8 q3 a X$ r* R% S, _: |3 {
脣餌桅敺嚗銝隞支誑瑁
1 F7 b X2 A# ^/ i3 r3 h$ k6 F9 I* R7 x, D& }: o1 U
[root]# ./install
* o& [8 z5 f; ^
" u2 j+ n* O4 O; D$ b$ e+ m+ {摰鋆蝔撘撠望憪脰摰鋆嚗閬瘜芸楛銝蝬脣颱頛閬瑼獢
; ]/ b& j" u5 D4 d( T: |嗅祕摰鋆蝔撘撠望 yum install 單穿摰鋆蝔憭抒 1 撠) q: s; G+ W4 ]% V n4 f
銝 ffmpeginstaller 摰鋆頝ffmpeg賊憟隞塚
& t% o! Q% ~( _1 | w' h- v$ X& ?
6 I7 ~( P5 G. g
1 K, {7 R6 _& X: y4 @& Y2 U9 A7 j8 s; Z. ]0 F" \+ Q6 W
: http://oldgrayduck.blogspot.tw/2 ... staller-ffmpeg.html
7 H& H7 j( ]! X6 T" [( T8 R5 Z8 G" A
- r" U( _2 `6 R$ S# f( U" V9 \7 o1 q9 |
4 W' S) U, `: a% c9 N9 U- V |
|