砍敺 IT_man 2017-3-28 13:02 蝺刻摩
7 o, l7 i* |* Y9 J+ N9 P+ d' v5 x3 P1 i
FFmpeg臭甈曉撩憭抒閬閮蝺刻圾蝣澆極瘀臭誑憭折蝺函Ⅳ澆ffmpeg舫曉蝣潘汪inux撟喳唬潘銋臭誑典嗅雿璆剔頂蝏銝蝺刻陌瑁嚗WindowsMac OS X蝑
1 `- T& | a. y- Y, h5 i2 B$ v! b; \: T; p
寞銝:
: P4 j# A6 j( v1 K, W
0 [! R: O, J, s! W6 s2 n7 y[摰鋆]
" p) f _, ^; v" T[/usr/local]#tar -jxvf ffmpeg-2.5.3.tar.bz2
2 e" D0 e% l. }1 `1 p% |" V[/usr/local]#cd ffmpeg-2.5.3
4 p( d- d7 _) Y: m5 q0 `
" B( a( [$ q* { e! a( c9 y
- P- L0 W# v% n2 r# E: K; C4 V摰鋆yasm
" a" E4 a' W, a. b/ W. hffmpeg蝺刻陌銝剔箔擃compile摨佗雿輻其舐楊隞歹鈭舫閬雿輻券撌亙瑯
0 l& m5 y( Q4 ]$ j% m[/usr/local/ffmpeg-2.5.3]#yum -y install yasm
3 J) O- T! h0 O2 n& |璅雿輻冽蝣潭孵摰鋆嚗銝頛yasm皞隞蝣潘嗅雿輻./configuremake隞亙make istall脰摰鋆6 P' D/ n- _8 a0 ~/ [" f7 n O
[/usr/local/ffmpeg-2.5.3]#./configure --enable-shared --prefix=/usr/local/ffmpeg2 Y5 N ]' o2 k2 \2 r3 c' ]
嗡葉enable-shared銵函內Y亙澈嚗臭誑靘隞亙蝺函雿輻剁臬瑁蝔摨銋靘鞈湧鈭摨怒憒銝銝enable-shared賊雿輻券亦孵蝺刻陌嚗甇斗銝Y摨恬Yffmpeg蝑臬瑁瑼銋瘥頛憭改雿隞銝閬摨怠停臭誑湔亙瑁
6 t% I8 S: F/ B' hprefix銵函內撌亙瑕鋆桅嚗鋆∟身/usr/local/ffmpeg
/ [7 Q0 u( {; f, t[/usr/local/ffmpeg-2.5.3]#make 1 r9 P0 G' Y; j4 B
[/usr/local/ffmpeg-2.5.3]#make install ( V6 e' `5 {5 s$ h4 j
9 l- N7 o& s1 A m9 [
7 p- q) E. q) h# \頝臬:摰鋆摰/usr/local/ffmpegY銝桅嚗 - bin嚗臬瑁瑼桅
- lib嚗亙澈桅
- include嚗蝺函典啁剜隞嗥桅
( ~, O6 B. X L6 E- P6 h 銝蝞⊥航帷ompile臬臬瑁蝔摨瑁賡閬靘鞈惻ib銝Y摨恬臭誑Yso隞嗆瑁/usr/lib銝嚗銋臭誑湔乩耨寥蝵格隞嗚亦/etc/ld.so.conf隞塚
1 k! Z- T& K/ w( H- Q, C, y4 d[/usr/local/ffmpeg-2.5.3]#vi /etc/ld.so.conf
; O$ m: Z1 A' G0 P) vinclude ld.so.conf.d/*.conf c X7 K$ K6 D
/ f; _1 A z Q/ }( T+ H) p! T4 Y: T
潭臬臭誑/etc/ld.so.conf.d/撱箔啁隞逵fmpeg.conf嚗啣銝銵嚗喟榻fmpeglib桅嚗0 [6 H) W$ j/ t' Z W7 X- r5 K
/usr/local/ffmpeg/lib+ [9 s3 {1 q u) i
瑁ldconfig嚗湔追d.so.cache嚗雿蹂耨寧When run ldconfig show error:) s9 m! A$ S' E) r0 T1 l
ldconfig: /usr/lib64/libgd.so.2 銝臭蝚西交 ==>8 U+ O5 l0 P/ P! i4 N: Y
ll /usr/lib64/4 Z* j8 \" _& \$ ~% c. L
-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.20 T3 R+ ~" n5 O" s1 O' [
-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2.0.0
4 v% e% ?9 i4 S8 P* VSo:
4 f$ G0 f; K `7 Z- L+ | oln -s /usr/lib64/libgd.so.2.0.0 /usr/lib64/libgd.so.2 撠梯圾瘙( l% h1 _4 a: G* ^" J$ {/ w
臭誑 vi /etc/ld.so.cache /usr/local/ffmpeg/lib 臬血歇 cache銝
+ ^0 P1 y( Y$ @4 |0 X
9 W3 @) a5 U8 t# l% F5 G+ N9 _箔其遙雿唳寡賢湔亦狄fmpeg瑁嚗銝其蝙典./ffmpeg /usr/local/ffmpeg/bin/ffmpeg孵瑁甇文極瘀臭誑臬瑁瑼獢銴鋆賢軔in桅銝嚗灸in桅銝撱箇頠蝯憿隡潔Windows銝瑕嚗憒臬瑁瑼獢鋡怠支嚗頠蝯銋銝賜匱蝥雿輻剁蝖祇蝯臭誑蝜潛雿輻具撱粹蝯賭誘憒銝嚗
9 p0 \: Y5 o8 V7 c( ~: w) S/ Z9 y. W* A
sudo ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffmpeg . 3 e$ L7 t9 b4 W7 s
sudo ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffprobe . ' H9 J, M1 g* I6 F# P
sudo ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffserver . - f' P: |$ t; e1 M) R0 `: [
+ Z5 x$ S& a. S z. X
血嚗憒閬剌fmpeg剜隞塚憟賢include桅銝ffmpeg銴鋆賢/usr/include銝准
X3 R* H3 C. |% G% }曉典臭誑究hell銝剔湔亥撓卯fmpeg瑁嚗蝯憒銝嚗
! J6 `: Z+ _0 S# i, v# r' F
% ]& K, t! o% I3 \$ N0 z; t: P K; q: ~: |9 I
[root@CentOS6 bin]# ffmpeg
5 E. ] F! H0 E% ?. c: W2 gffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers. j( a* A6 ]9 }; K
built on Oct 9 2015 16:11:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)7 M2 t+ R4 {5 D7 D) ^
configuration: --enable-shared --prefix=/usr/local/ffmpeg6 t- }) B) f: e4 E H
libavutil 54. 7.100 / 54. 7.1006 g, a. Q) g4 o* u
libavcodec 56. 1.100 / 56. 1.100
2 A: P2 L+ V( p' Z( n libavformat 56. 4.100 / 56. 4.100
- D2 ~3 y* ^" Q3 h: c" G libavdevice 56. 0.100 / 56. 0.100
8 ?! {5 C9 O% w+ } libavfilter 5. 1.100 / 5. 1.100& g6 y1 ^8 ]3 g. {& c p
libswscale 3. 0.100 / 3. 0.100
8 v9 e; g/ K$ h& ~ libswresample 1. 1.100 / 1. 1.100( F1 S- c0 ^% `3 B% q
Hyper fast Audio and Video encoder6 R: ?3 T2 ~4 v' t( y
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}..., ]" t% a- M) G, m; }* ?
Use -h to get full help or, even better, run 'man ffmpeg'
% C$ ^2 n8 t- u1 u( Y8 D5 @- l
- y5 z) S3 g F" H寞鈭:
$ M' S! n8 \& r3 k, X" T% M# H
3 S D2 Q2 ?% |/ B! f隞 ffmpeginstaller 摰鋆 ffmpeg 賊憟隞:% Q% y* H7 A6 z& l1 n
" `6 f2 L+ q& ]- a
http://ffmpeginstaller.com銝頛唳摰桅嚗靘憒嚗/tmp/
$ }7 o3 |8 C: x" F' H, Y閫憯蝮格敺嚗Y銝 ffmpeginstaller+祈 桅嚗靘憒嚗銝頛閫敺桅
' {. A6 X0 E8 Y' G9 c/tmp/ffmpeginstaller.8.0/
3 m4 \7 M- x! Q6 x! D! m脣餌桅敺嚗銝隞支誑瑁
6 i' j+ d$ r. O/ Q9 C, @! h! { k( |7 ~! }! t+ M
[root]# ./install( L& a+ G: ]- M% }7 A2 n, D8 r
* m6 X- @1 e! z1 P摰鋆蝔撘撠望憪脰摰鋆嚗閬瘜芸楛銝蝬脣颱頛閬瑼獢
" U' H' h F0 m8 a" f4 S嗅祕摰鋆蝔撘撠望 yum install 單穿摰鋆蝔憭抒 1 撠
; f) U7 j d' O* X! P5 e5 p9 K% l v銝 ffmpeginstaller 摰鋆頝ffmpeg賊憟隞塚% t2 L1 }- V! }: _8 N
7 J/ Y. B7 z6 F! B
9 n+ C$ T2 I0 q2 t" @
; J. V7 c9 g5 _# ~6 h: http://oldgrayduck.blogspot.tw/2 ... staller-ffmpeg.html
5 h$ ?& m2 b9 f% t3 s
8 z1 \$ `4 D4 {8 j7 J$ c
% o# t# D& F% M7 ?) u9 m
; V& A, O1 O! B; k |
|