砍敺 IT_man 2017-3-28 13:02 蝺刻摩
( P7 N) @( {! V4 U, X" n# d# M; t1 O; O* R) c8 }6 v
FFmpeg臭甈曉撩憭抒閬閮蝺刻圾蝣澆極瘀臭誑憭折蝺函Ⅳ澆ffmpeg舫曉蝣潘汪inux撟喳唬潘銋臭誑典嗅雿璆剔頂蝏銝蝺刻陌瑁嚗WindowsMac OS X蝑2 ?2 n1 |$ I) T
! ~( z# k8 b8 n" ]. l0 Z
寞銝:
+ Z7 Q4 f% D; [1 {* a% ?+ ?: o$ z, |# {( }! i c$ w$ H% ?' F
[摰鋆]
7 R4 E U. w/ T6 p[/usr/local]#tar -jxvf ffmpeg-2.5.3.tar.bz2
& @ }: W. q% o0 D( m[/usr/local]#cd ffmpeg-2.5.3 ^( V, H, Z. H
( z# G& j/ g1 R) n& E/ Z
! _9 p2 f0 N, p/ B7 G- D) g摰鋆yasm/ g5 R1 z" r" s# I* ~
ffmpeg蝺刻陌銝剔箔擃compile摨佗雿輻其舐楊隞歹鈭舫閬雿輻券撌亙瑯( ?6 I" v! `+ u9 N1 K
[/usr/local/ffmpeg-2.5.3]#yum -y install yasm8 @. B5 o$ {6 T, n
璅雿輻冽蝣潭孵摰鋆嚗銝頛yasm皞隞蝣潘嗅雿輻./configuremake隞亙make istall脰摰鋆9 i& W8 Y/ w2 g4 p
[/usr/local/ffmpeg-2.5.3]#./configure --enable-shared --prefix=/usr/local/ffmpeg C) A8 b9 N) p2 x9 R) y! J' s/ u7 y
嗡葉enable-shared銵函內Y亙澈嚗臭誑靘隞亙蝺函雿輻剁臬瑁蝔摨銋靘鞈湧鈭摨怒憒銝銝enable-shared賊雿輻券亦孵蝺刻陌嚗甇斗銝Y摨恬Yffmpeg蝑臬瑁瑼銋瘥頛憭改雿隞銝閬摨怠停臭誑湔亙瑁' w g1 H% L* s5 E; i- [2 `
prefix銵函內撌亙瑕鋆桅嚗鋆∟身/usr/local/ffmpeg/ Q+ i" R0 i1 u, w) H1 l% ~
[/usr/local/ffmpeg-2.5.3]#make
6 d, i, p/ z7 { h% |$ d[/usr/local/ffmpeg-2.5.3]#make install + M4 ^: a M& v _3 u k9 f
E/ l$ i$ q% Z/ e7 w
4 L7 |. w* x2 Y. i5 [頝臬:摰鋆摰/usr/local/ffmpegY銝桅嚗 - bin嚗臬瑁瑼桅
- lib嚗亙澈桅
- include嚗蝺函典啁剜隞嗥桅& ^; G$ a3 r$ \0 U5 z
銝蝞⊥航帷ompile臬臬瑁蝔摨瑁賡閬靘鞈惻ib銝Y摨恬臭誑Yso隞嗆瑁/usr/lib銝嚗銋臭誑湔乩耨寥蝵格隞嗚亦/etc/ld.so.conf隞塚0 J; x% ]% [6 b- c% b$ K/ w9 t* G
[/usr/local/ffmpeg-2.5.3]#vi /etc/ld.so.conf
4 ]9 h" B: Z0 y5 Winclude ld.so.conf.d/*.conf
1 D! a- O: m- l& S
9 F2 K. ?# v* L" M) ?潭臬臭誑/etc/ld.so.conf.d/撱箔啁隞逵fmpeg.conf嚗啣銝銵嚗喟榻fmpeglib桅嚗. b5 T0 X# Y7 g
/usr/local/ffmpeg/lib. H: n2 ^+ |5 A9 j4 |
瑁ldconfig嚗湔追d.so.cache嚗雿蹂耨寧When run ldconfig show error:6 |3 o2 ?* H/ d/ D$ s' G
ldconfig: /usr/lib64/libgd.so.2 銝臭蝚西交 ==>
- J, Z2 s1 I( Y# Hll /usr/lib64/
7 I* B8 p F( s& K2 Y9 t2 b: S-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2
/ J1 ^9 _; w5 R" I9 g-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2.0.02 `( p9 C+ g1 h3 Q) f- D% G% m
So:* P. a7 Z# G& x( C5 H4 M
ln -s /usr/lib64/libgd.so.2.0.0 /usr/lib64/libgd.so.2 撠梯圾瘙
+ Y( V5 Q2 c3 ^8 b8 M ` H臭誑 vi /etc/ld.so.cache /usr/local/ffmpeg/lib 臬血歇 cache銝/ P8 G0 P' u5 w3 E/ a6 e
7 P8 ^7 [$ C' f. B5 O; B+ I箔其遙雿唳寡賢湔亦狄fmpeg瑁嚗銝其蝙典./ffmpeg /usr/local/ffmpeg/bin/ffmpeg孵瑁甇文極瘀臭誑臬瑁瑼獢銴鋆賢軔in桅銝嚗灸in桅銝撱箇頠蝯憿隡潔Windows銝瑕嚗憒臬瑁瑼獢鋡怠支嚗頠蝯銋銝賜匱蝥雿輻剁蝖祇蝯臭誑蝜潛雿輻具撱粹蝯賭誘憒銝嚗 * W! B8 A) r2 ?* t' q
8 K2 r: H' g6 X2 Z* p8 v: Q
sudo ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffmpeg .
+ _7 G. m( [5 Bsudo ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffprobe . + V: A" N9 N- J" c* ^. t
sudo ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffserver . . Z! I* h6 {" G* z5 a9 A0 v% M
- Z7 u" ? N* e
血嚗憒閬剌fmpeg剜隞塚憟賢include桅銝ffmpeg銴鋆賢/usr/include銝准
( L* j& B1 q' \' ?5 H* H. d2 D7 I曉典臭誑究hell銝剔湔亥撓卯fmpeg瑁嚗蝯憒銝嚗
+ L0 l; ~+ V, u3 p6 G! w" w9 u% b# r8 z' b: ~1 P3 M
- [) m: u2 i( q. E- ?) B( V6 `
[root@CentOS6 bin]# ffmpeg
) Q$ R9 T& h' {1 mffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers
/ r% G Q) s( ? a& G! t4 B built on Oct 9 2015 16:11:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
5 \' M J0 \0 h6 b$ { configuration: --enable-shared --prefix=/usr/local/ffmpeg7 T- S0 Z. b+ T' e$ F
libavutil 54. 7.100 / 54. 7.100/ @& i, U' G9 \8 s
libavcodec 56. 1.100 / 56. 1.100, R( F% A* u r" |6 K6 {
libavformat 56. 4.100 / 56. 4.100! A% S! R; v! X' E7 N
libavdevice 56. 0.100 / 56. 0.1001 g% {( _( w3 }. K: y8 S9 h2 d' V. x
libavfilter 5. 1.100 / 5. 1.1007 o9 W4 o4 x7 ~+ W; g2 N% G
libswscale 3. 0.100 / 3. 0.100
9 c3 t% B7 ~: P8 o* c: N% M0 n1 @ libswresample 1. 1.100 / 1. 1.100. L* C8 C3 |) d! G9 E
Hyper fast Audio and Video encoder
7 {2 P' l& Z- Y! X9 ~+ Q4 eusage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}..." R% j+ ?* k2 J ~
Use -h to get full help or, even better, run 'man ffmpeg'
- [" u: }" \& \) K6 {
) l( e+ ?6 x/ v6 A& [: j8 \& T( u寞鈭:
# ]4 B. |( v0 }" n* G1 ^$ r1 N1 T |7 Z1 W! Q
隞 ffmpeginstaller 摰鋆 ffmpeg 賊憟隞:- t" d- o& {3 h( z
8 Z! H( K7 G( p( Jhttp://ffmpeginstaller.com銝頛唳摰桅嚗靘憒嚗/tmp/) t- S. ? P: l2 |9 S& [& T/ f
閫憯蝮格敺嚗Y銝 ffmpeginstaller+祈 桅嚗靘憒嚗銝頛閫敺桅5 b- k1 \; t; z( [7 u8 e1 h
/tmp/ffmpeginstaller.8.0/9 j* \& [- Z0 o' L' X9 A
脣餌桅敺嚗銝隞支誑瑁5 d. J3 |+ j! }
6 b2 k0 f' E1 a K; M% L1 W n
[root]# ./install
U3 R% y+ [& y) O( C% E( Z: W9 Y8 V% ^# q4 g! H+ ^: M1 i. t
摰鋆蝔撘撠望憪脰摰鋆嚗閬瘜芸楛銝蝬脣颱頛閬瑼獢% x" E2 s9 Z _- }& i/ Y5 e# ^
嗅祕摰鋆蝔撘撠望 yum install 單穿摰鋆蝔憭抒 1 撠2 E6 b9 {0 l5 C/ l: \; }3 J& \4 M; t
銝 ffmpeginstaller 摰鋆頝ffmpeg賊憟隞塚
8 y- M, S! u2 i% T. m8 L7 `# G6 X* Q8 R
1 D2 ^1 d; [7 o
8 ?% v- T0 K3 G. g4 t6 ]
: http://oldgrayduck.blogspot.tw/2 ... staller-ffmpeg.html
* {* {# j7 ]+ {! `. G h3 F
9 N% u# R3 g) V3 Q; r% k$ b5 A0 ^8 A6 v: H0 o
- Z) e' v" ]" O& X" G, W* q! i. o |
|