砍敺 IT_man 2017-3-28 13:02 蝺刻摩 # m' v7 f3 P0 d F m% Y
" n+ U7 a, E2 ~
FFmpeg臭甈曉撩憭抒閬閮蝺刻圾蝣澆極瘀臭誑憭折蝺函Ⅳ澆ffmpeg舫曉蝣潘汪inux撟喳唬潘銋臭誑典嗅雿璆剔頂蝏銝蝺刻陌瑁嚗WindowsMac OS X蝑/ E. I* j4 l" p9 B% E8 Z
: v# h( ?, n! o寞銝:! I/ q1 {6 Q8 @
f" d; ?( ~0 R5 H/ J, ][摰鋆]* Y- O9 p& T+ e% _
[/usr/local]#tar -jxvf ffmpeg-2.5.3.tar.bz21 M# ~) f9 P7 D9 U6 U9 w
[/usr/local]#cd ffmpeg-2.5.34 X" W* S* m. j
i! v2 M9 ~ K, Y- _& o9 Q* K/ G
; Y K3 f8 }+ u. p. }摰鋆yasm
5 t* E- B5 k0 jffmpeg蝺刻陌銝剔箔擃compile摨佗雿輻其舐楊隞歹鈭舫閬雿輻券撌亙瑯
& v1 Q3 k3 }7 a% ^# n[/usr/local/ffmpeg-2.5.3]#yum -y install yasm
. c( A( F) g0 Q; e璅雿輻冽蝣潭孵摰鋆嚗銝頛yasm皞隞蝣潘嗅雿輻./configuremake隞亙make istall脰摰鋆
2 L! E/ H5 K/ ^6 u* K! u$ z8 h[/usr/local/ffmpeg-2.5.3]#./configure --enable-shared --prefix=/usr/local/ffmpeg2 _6 d1 _7 Y% _1 v# B) z0 q9 m1 n
嗡葉enable-shared銵函內Y亙澈嚗臭誑靘隞亙蝺函雿輻剁臬瑁蝔摨銋靘鞈湧鈭摨怒憒銝銝enable-shared賊雿輻券亦孵蝺刻陌嚗甇斗銝Y摨恬Yffmpeg蝑臬瑁瑼銋瘥頛憭改雿隞銝閬摨怠停臭誑湔亙瑁% W$ t& |0 f4 K, Q3 `0 l+ Y
prefix銵函內撌亙瑕鋆桅嚗鋆∟身/usr/local/ffmpeg6 K. n4 X1 @. K* V& f- Z! K
[/usr/local/ffmpeg-2.5.3]#make ) |3 i1 g, ?/ T+ q2 u" }
[/usr/local/ffmpeg-2.5.3]#make install & _) e7 V' Z& H
7 J9 S( w' O; f
8 k- m9 B0 ~+ @- D u8 E頝臬:摰鋆摰/usr/local/ffmpegY銝桅嚗 - bin嚗臬瑁瑼桅
- lib嚗亙澈桅
- include嚗蝺函典啁剜隞嗥桅
/ E+ Q. M7 ~* i& b: D! \ 銝蝞⊥航帷ompile臬臬瑁蝔摨瑁賡閬靘鞈惻ib銝Y摨恬臭誑Yso隞嗆瑁/usr/lib銝嚗銋臭誑湔乩耨寥蝵格隞嗚亦/etc/ld.so.conf隞塚
2 H+ R t5 s$ c3 R) y5 s[/usr/local/ffmpeg-2.5.3]#vi /etc/ld.so.conf! P" z {6 @2 y6 |/ S3 h' l( j
include ld.so.conf.d/*.conf
6 ]& ^$ x) M R. p: Q6 p! Y6 h. s2 ~6 d1 [: C7 Y. B b
潭臬臭誑/etc/ld.so.conf.d/撱箔啁隞逵fmpeg.conf嚗啣銝銵嚗喟榻fmpeglib桅嚗7 F/ O% _" I1 B z/ T
/usr/local/ffmpeg/lib
8 d/ `6 n8 F* W' \, i1 [6 E$ H% @4 t瑁ldconfig嚗湔追d.so.cache嚗雿蹂耨寧When run ldconfig show error:
. o! z# ?, q! k5 h0 m$ V$ r6 ]; Q2 Xldconfig: /usr/lib64/libgd.so.2 銝臭蝚西交 ==>
( j. I" g2 K8 L1 [; d6 ]# j0 _ll /usr/lib64/
( ~! l/ D8 ?. {-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2 f" k1 m* w$ ~$ `
-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2.0.0- E% k0 e! V% b! F' `. t
So:
0 ? N1 N, }1 K1 Tln -s /usr/lib64/libgd.so.2.0.0 /usr/lib64/libgd.so.2 撠梯圾瘙
1 L* H- B; _5 p臭誑 vi /etc/ld.so.cache /usr/local/ffmpeg/lib 臬血歇 cache銝
; D7 |3 i3 Q! B, M" f' u4 l. M7 i: ~& R
箔其遙雿唳寡賢湔亦狄fmpeg瑁嚗銝其蝙典./ffmpeg /usr/local/ffmpeg/bin/ffmpeg孵瑁甇文極瘀臭誑臬瑁瑼獢銴鋆賢軔in桅銝嚗灸in桅銝撱箇頠蝯憿隡潔Windows銝瑕嚗憒臬瑁瑼獢鋡怠支嚗頠蝯銋銝賜匱蝥雿輻剁蝖祇蝯臭誑蝜潛雿輻具撱粹蝯賭誘憒銝嚗 + {$ O3 I4 w) s7 |2 {2 T
) e L' b2 E/ t( p0 ~+ rsudo ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffmpeg . . G1 g+ w7 l) f& e* w; [+ u
sudo ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffprobe . : E2 L6 B2 U4 c% z4 R0 l
sudo ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffserver . 3 L5 f, }' D' e% F* N. k+ q
# B$ b. e8 s- M& o
血嚗憒閬剌fmpeg剜隞塚憟賢include桅銝ffmpeg銴鋆賢/usr/include銝准
" K3 c& l; r! {2 l! b曉典臭誑究hell銝剔湔亥撓卯fmpeg瑁嚗蝯憒銝嚗: O' h8 |( } d3 h
9 T2 h" p8 ~1 i. _$ |
2 _! J; H1 g/ D$ W9 `
[root@CentOS6 bin]# ffmpeg
$ @# h, U) I0 b, Pffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers) }1 }$ U* X5 M% }( c- `; J
built on Oct 9 2015 16:11:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)6 z0 B- O! G) R. P3 @- i: |
configuration: --enable-shared --prefix=/usr/local/ffmpeg7 I, i; k$ f6 q+ n/ m: O: r0 x" R
libavutil 54. 7.100 / 54. 7.100
: v3 W+ J, [3 r! X; Z; } libavcodec 56. 1.100 / 56. 1.100
% W ?. ^& E {4 @ libavformat 56. 4.100 / 56. 4.100
7 F8 V+ c1 i. Y) h8 j libavdevice 56. 0.100 / 56. 0.100
# z$ @, S+ g0 @7 V, Z libavfilter 5. 1.100 / 5. 1.100
# s8 B3 X- Z9 T; t& C& D libswscale 3. 0.100 / 3. 0.1009 ` X* o6 i& e/ P4 R9 v& z2 Z
libswresample 1. 1.100 / 1. 1.100
9 }) a+ [3 `9 r3 }6 E" }Hyper fast Audio and Video encoder& G; ?% D: a, X' g3 B7 o
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...0 k. H0 Z4 t- l0 C, X, @
Use -h to get full help or, even better, run 'man ffmpeg'
4 C# C6 y! Z9 Z$ c: j- K: \8 }
2 |0 X( d3 X+ v, ~( x) k( h! u寞鈭:
; }, M% c4 }( J4 s2 w. Q
- A8 ?$ z% p- P0 j. b7 B隞 ffmpeginstaller 摰鋆 ffmpeg 賊憟隞:, i2 L% Y! e' W
4 h6 i& m: D" Uhttp://ffmpeginstaller.com銝頛唳摰桅嚗靘憒嚗/tmp/3 a3 n, h! S' N# C7 W" a- B% R
閫憯蝮格敺嚗Y銝 ffmpeginstaller+祈 桅嚗靘憒嚗銝頛閫敺桅
7 K& T4 a% z6 h) E# c/tmp/ffmpeginstaller.8.0/: F% G7 ~, {7 y) S$ D2 k1 d
脣餌桅敺嚗銝隞支誑瑁
: @" d Y2 c5 D8 u6 K
) e P- s+ N" e[root]# ./install
, q3 }2 L. s) w J: M; K( ^
7 X* x) R+ i C- H% F摰鋆蝔撘撠望憪脰摰鋆嚗閬瘜芸楛銝蝬脣颱頛閬瑼獢- X$ l% a" G- h y
嗅祕摰鋆蝔撘撠望 yum install 單穿摰鋆蝔憭抒 1 撠6 H* G+ ^" t- s P; R# U
銝 ffmpeginstaller 摰鋆頝ffmpeg賊憟隞塚
) K- S' R' P$ z$ w* q+ Z9 w# @5 z( P/ Q; l
' Q. m/ R* i! T. W7 `. j0 h" m( D
: http://oldgrayduck.blogspot.tw/2 ... staller-ffmpeg.html
2 }2 [' r, s& q- d' m! X2 ~, e9 U7 L8 Q3 `( M
2 h1 z& [ }. {0 [. {6 x5 }
6 c. k9 E1 r/ ^! l
|
|