砍敺 IT_man 2017-3-28 13:02 蝺刻摩 ) L+ i6 o) m; r. m, M
: D' r7 ?. d$ P4 s2 B+ jFFmpeg臭甈曉撩憭抒閬閮蝺刻圾蝣澆極瘀臭誑憭折蝺函Ⅳ澆ffmpeg舫曉蝣潘汪inux撟喳唬潘銋臭誑典嗅雿璆剔頂蝏銝蝺刻陌瑁嚗WindowsMac OS X蝑- q* }4 d; y/ [0 h+ m0 n
9 X+ b2 \/ ^1 f; A
寞銝:
6 D9 |* s1 z% D* ?! y/ F1 |; l9 ?4 z! c
[摰鋆]9 O& o4 E4 H7 p2 q- u( ?' \" P
[/usr/local]#tar -jxvf ffmpeg-2.5.3.tar.bz2$ D: t+ j% Z& u& v2 j
[/usr/local]#cd ffmpeg-2.5.3
2 y \% I9 p2 _9 l! N% d" T- |0 V- T4 N+ U& y
' I; O1 ?# q' s4 ^0 `3 p. B摰鋆yasm8 B$ _' G i9 ]# N. \
ffmpeg蝺刻陌銝剔箔擃compile摨佗雿輻其舐楊隞歹鈭舫閬雿輻券撌亙瑯: l5 I3 ]% E2 a+ \1 T
[/usr/local/ffmpeg-2.5.3]#yum -y install yasm8 A! V1 s' f q. B( z
璅雿輻冽蝣潭孵摰鋆嚗銝頛yasm皞隞蝣潘嗅雿輻./configuremake隞亙make istall脰摰鋆0 H1 q/ q7 ]* l8 ?% i, z
[/usr/local/ffmpeg-2.5.3]#./configure --enable-shared --prefix=/usr/local/ffmpeg
: q, N A4 B0 G! w2 ]+ r y嗡葉enable-shared銵函內Y亙澈嚗臭誑靘隞亙蝺函雿輻剁臬瑁蝔摨銋靘鞈湧鈭摨怒憒銝銝enable-shared賊雿輻券亦孵蝺刻陌嚗甇斗銝Y摨恬Yffmpeg蝑臬瑁瑼銋瘥頛憭改雿隞銝閬摨怠停臭誑湔亙瑁
5 f" }4 C1 c+ U" a% e/ hprefix銵函內撌亙瑕鋆桅嚗鋆∟身/usr/local/ffmpeg$ m3 |1 Q! {/ I5 r' M
[/usr/local/ffmpeg-2.5.3]#make / P6 \; ^+ A: T% r+ Y. k" b
[/usr/local/ffmpeg-2.5.3]#make install , F9 N, H* o! `# H
B# y+ T$ ?3 @2 Z1 b7 S9 I' Z! ?
頝臬:摰鋆摰/usr/local/ffmpegY銝桅嚗 - bin嚗臬瑁瑼桅
- lib嚗亙澈桅
- include嚗蝺函典啁剜隞嗥桅
' h8 B7 m) V+ w9 k4 T6 V 銝蝞⊥航帷ompile臬臬瑁蝔摨瑁賡閬靘鞈惻ib銝Y摨恬臭誑Yso隞嗆瑁/usr/lib銝嚗銋臭誑湔乩耨寥蝵格隞嗚亦/etc/ld.so.conf隞塚" K$ w V# d; ^
[/usr/local/ffmpeg-2.5.3]#vi /etc/ld.so.conf
0 j. D7 Q2 ?$ W( d+ ], c1 ninclude ld.so.conf.d/*.conf
; ~! F1 l* U5 I" p7 I7 ~" F) k, P3 u( p( U
潭臬臭誑/etc/ld.so.conf.d/撱箔啁隞逵fmpeg.conf嚗啣銝銵嚗喟榻fmpeglib桅嚗5 t! E$ z9 B, F, @ v% D
/usr/local/ffmpeg/lib n& }2 g. {& }4 X, M+ l
瑁ldconfig嚗湔追d.so.cache嚗雿蹂耨寧When run ldconfig show error:! w4 \. O9 y( h5 r; l2 W4 K. N
ldconfig: /usr/lib64/libgd.so.2 銝臭蝚西交 ==>
; O; o6 T4 t; v) zll /usr/lib64/
' x1 e( l2 _8 V* m-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.21 A5 c/ s; V3 @8 ]$ j3 N, C
-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2.0.04 E$ M. g8 X% k9 E9 M
So:8 h) ]! v5 ~9 j& T! N* o
ln -s /usr/lib64/libgd.so.2.0.0 /usr/lib64/libgd.so.2 撠梯圾瘙4 o" u' h2 N& a8 r9 l5 C/ y
臭誑 vi /etc/ld.so.cache /usr/local/ffmpeg/lib 臬血歇 cache銝
# X, w; N& l0 @- y% t$ ~& z$ o7 `
箔其遙雿唳寡賢湔亦狄fmpeg瑁嚗銝其蝙典./ffmpeg /usr/local/ffmpeg/bin/ffmpeg孵瑁甇文極瘀臭誑臬瑁瑼獢銴鋆賢軔in桅銝嚗灸in桅銝撱箇頠蝯憿隡潔Windows銝瑕嚗憒臬瑁瑼獢鋡怠支嚗頠蝯銋銝賜匱蝥雿輻剁蝖祇蝯臭誑蝜潛雿輻具撱粹蝯賭誘憒銝嚗 , b. L1 A* @9 T$ M5 U9 _
2 p2 L% _) a" w$ ~' N9 l% Z
sudo ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffmpeg .
# X. }; g8 n6 K+ o asudo ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffprobe .
% y$ Y: V: L5 t+ X" D. z& asudo ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffserver . 7 g+ f2 U7 Q* B i: Y
% S) Y8 ~- o' C5 y血嚗憒閬剌fmpeg剜隞塚憟賢include桅銝ffmpeg銴鋆賢/usr/include銝准
4 z% O; m8 k& B1 {, c曉典臭誑究hell銝剔湔亥撓卯fmpeg瑁嚗蝯憒銝嚗
" O, ?; I. [+ ^' }! ^7 s9 h0 O/ ~0 B8 k) G/ E% m: C' }
1 P& q8 t/ l- }( I7 a[root@CentOS6 bin]# ffmpeg0 V/ r0 c* W' l. x) `( l
ffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers
( d H& k* {/ z built on Oct 9 2015 16:11:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
9 c7 X6 u% t5 J) T' y/ b- L: Y3 L% G, W configuration: --enable-shared --prefix=/usr/local/ffmpeg$ _$ n# L6 X8 W: Q9 x4 g( K
libavutil 54. 7.100 / 54. 7.100- p( |) a+ K$ U* U
libavcodec 56. 1.100 / 56. 1.100
4 \5 `, S: Q- q# ~% w; I' \ libavformat 56. 4.100 / 56. 4.1002 e7 i# F6 w0 s9 p+ K* d
libavdevice 56. 0.100 / 56. 0.100. @% K) Z; p. t
libavfilter 5. 1.100 / 5. 1.100" I7 [! A; {: r6 F6 |2 E2 n5 k
libswscale 3. 0.100 / 3. 0.1009 w" C# J# h& c1 d, B
libswresample 1. 1.100 / 1. 1.1001 h% X, y5 f$ D8 W# P
Hyper fast Audio and Video encoder- l9 g: W6 V5 ~* o: Q: Y$ `" Q- R
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
" w- P4 P) z1 nUse -h to get full help or, even better, run 'man ffmpeg'" G9 ?+ D8 ^% u# ^ S' m
6 k9 _% q# x* f0 O寞鈭:
6 K$ x5 I3 f; i0 g: s
5 j7 |* `( I! s+ Q1 H `0 ~5 U隞 ffmpeginstaller 摰鋆 ffmpeg 賊憟隞:
( ]8 D/ S. f9 R# A1 D- e/ V/ m" l* @% H$ S; u) `; u2 l# v
http://ffmpeginstaller.com銝頛唳摰桅嚗靘憒嚗/tmp/" D* H/ ^7 c" j
閫憯蝮格敺嚗Y銝 ffmpeginstaller+祈 桅嚗靘憒嚗銝頛閫敺桅
6 o# k3 g) S/ \+ c7 \+ w# F/tmp/ffmpeginstaller.8.0/- P* B, `# q9 o$ ?
脣餌桅敺嚗銝隞支誑瑁
* R/ W) b1 A! B& \4 S* w
1 _5 o: d% N6 F) k! D[root]# ./install
& a0 M% X$ k' }& f/ g/ \) u% j2 i$ s9 {) ]3 x
摰鋆蝔撘撠望憪脰摰鋆嚗閬瘜芸楛銝蝬脣颱頛閬瑼獢+ b5 K1 t; H" m0 ]! u+ F
嗅祕摰鋆蝔撘撠望 yum install 單穿摰鋆蝔憭抒 1 撠
( f$ [4 L% j" | d銝 ffmpeginstaller 摰鋆頝ffmpeg賊憟隞塚
6 C; c9 g. x6 `; ?5 H3 c8 D6 g9 {' w# Q! d4 o
9 j: l" U1 M: w; K, | B- n+ r; N
m V' z, U+ U: http://oldgrayduck.blogspot.tw/2 ... staller-ffmpeg.html
* r' q2 Z } k4 a0 C% I9 ?- m7 m n" C0 f; t9 e d
6 i0 v0 s+ O8 m
4 m7 _' ~6 c5 [/ I& T8 I3 J: a' p2 U
|
|