砍敺 IT_man 2017-3-28 13:02 蝺刻摩
1 d& `8 S+ h, [# X4 }) I/ ^; h6 n
& [( B+ P1 q2 S& ^* Z- D" c' ?FFmpeg臭甈曉撩憭抒閬閮蝺刻圾蝣澆極瘀臭誑憭折蝺函Ⅳ澆ffmpeg舫曉蝣潘汪inux撟喳唬潘銋臭誑典嗅雿璆剔頂蝏銝蝺刻陌瑁嚗WindowsMac OS X蝑4 F! ]+ a$ }' |( Y( G( O
( x) k$ p" Q8 _9 D7 R寞銝:7 q, }. \' {' M4 h
6 n6 U4 A4 ^% Y) B- J% w
[摰鋆]/ P6 Q% E* F# j6 r7 _! X
[/usr/local]#tar -jxvf ffmpeg-2.5.3.tar.bz25 g! `8 m. p3 q+ X/ }9 |
[/usr/local]#cd ffmpeg-2.5.38 h8 O b% l; X
" H D2 x3 h- o; H
# Y8 p) Z& t' e0 B# B. p6 g' m
摰鋆yasm: s. E: P7 ~% f! B# P3 A4 D
ffmpeg蝺刻陌銝剔箔擃compile摨佗雿輻其舐楊隞歹鈭舫閬雿輻券撌亙瑯) Y% X4 @5 `9 g: ?" H4 @
[/usr/local/ffmpeg-2.5.3]#yum -y install yasm
3 I7 O7 D/ m+ N" r! [2 g璅雿輻冽蝣潭孵摰鋆嚗銝頛yasm皞隞蝣潘嗅雿輻./configuremake隞亙make istall脰摰鋆
; x, k! t6 P- j/ V' g% o[/usr/local/ffmpeg-2.5.3]#./configure --enable-shared --prefix=/usr/local/ffmpeg0 S+ R. I+ C3 w" Z) g: B, q+ c
嗡葉enable-shared銵函內Y亙澈嚗臭誑靘隞亙蝺函雿輻剁臬瑁蝔摨銋靘鞈湧鈭摨怒憒銝銝enable-shared賊雿輻券亦孵蝺刻陌嚗甇斗銝Y摨恬Yffmpeg蝑臬瑁瑼銋瘥頛憭改雿隞銝閬摨怠停臭誑湔亙瑁
1 Z; l5 [5 S0 n% Q8 R5 Uprefix銵函內撌亙瑕鋆桅嚗鋆∟身/usr/local/ffmpeg
6 o, c( q5 _2 t, Z8 a" y[/usr/local/ffmpeg-2.5.3]#make ! U5 I7 _3 _" H& j2 S6 h
[/usr/local/ffmpeg-2.5.3]#make install - E" S1 o' e4 B) g% t
1 o, y5 ` @8 n7 B
8 \3 o+ a7 S& B% u
頝臬:摰鋆摰/usr/local/ffmpegY銝桅嚗 - bin嚗臬瑁瑼桅
- lib嚗亙澈桅
- include嚗蝺函典啁剜隞嗥桅
9 D7 f6 u8 w2 n3 t+ H w 銝蝞⊥航帷ompile臬臬瑁蝔摨瑁賡閬靘鞈惻ib銝Y摨恬臭誑Yso隞嗆瑁/usr/lib銝嚗銋臭誑湔乩耨寥蝵格隞嗚亦/etc/ld.so.conf隞塚
" K5 C9 S2 ^7 P) }# e[/usr/local/ffmpeg-2.5.3]#vi /etc/ld.so.conf$ |0 Q& r- M; ?+ V4 ]
include ld.so.conf.d/*.conf. g. Q* }/ E) a- F! x$ j4 c& {
2 [7 s# e }% K! K, ?1 [
潭臬臭誑/etc/ld.so.conf.d/撱箔啁隞逵fmpeg.conf嚗啣銝銵嚗喟榻fmpeglib桅嚗
2 U3 U4 ]% a+ m/usr/local/ffmpeg/lib
$ Z! q+ B/ ^4 e d& @4 ~1 [% Z瑁ldconfig嚗湔追d.so.cache嚗雿蹂耨寧When run ldconfig show error:! X2 j" e6 t% X
ldconfig: /usr/lib64/libgd.so.2 銝臭蝚西交 ==>
3 ]; C4 n% v; D. A( ~- ~ll /usr/lib64/
' W; g& T' @) q-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2
) E- N4 J0 a0 N* Z- `8 `- _-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2.0.0
: t! p l/ Q) {0 }0 LSo:. w6 D/ n& U+ L2 \/ i
ln -s /usr/lib64/libgd.so.2.0.0 /usr/lib64/libgd.so.2 撠梯圾瘙
/ @" A0 U; J: S( J' v1 h1 G S臭誑 vi /etc/ld.so.cache /usr/local/ffmpeg/lib 臬血歇 cache銝- @3 O+ W; Y% I- @
; v1 a' p! k) z! [; _/ M* V* J箔其遙雿唳寡賢湔亦狄fmpeg瑁嚗銝其蝙典./ffmpeg /usr/local/ffmpeg/bin/ffmpeg孵瑁甇文極瘀臭誑臬瑁瑼獢銴鋆賢軔in桅銝嚗灸in桅銝撱箇頠蝯憿隡潔Windows銝瑕嚗憒臬瑁瑼獢鋡怠支嚗頠蝯銋銝賜匱蝥雿輻剁蝖祇蝯臭誑蝜潛雿輻具撱粹蝯賭誘憒銝嚗 6 g) B2 K! m; J3 @% g
2 V8 ^( ?: x/ [. o3 K! |. }
sudo ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffmpeg .
( g& b4 B$ }% O% @( A' W1 bsudo ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffprobe .
6 a7 C4 |- T. B. }- Usudo ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffserver . 0 f, r6 c! H/ `2 |$ P9 ~
2 j9 r. _- ?; p血嚗憒閬剌fmpeg剜隞塚憟賢include桅銝ffmpeg銴鋆賢/usr/include銝准5 Q! T" }9 e2 I1 T! s: t+ S* \( G
曉典臭誑究hell銝剔湔亥撓卯fmpeg瑁嚗蝯憒銝嚗
4 Z% m- H8 c- j/ j6 r6 D3 B' l5 f# F4 D8 B
% n6 ^* ], M @; Y+ y7 m3 O$ Q[root@CentOS6 bin]# ffmpeg$ Z# L0 G& F: {- u) K9 K4 Q# c
ffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers
) \" g. @' J. N+ {; l% I( [1 m: X built on Oct 9 2015 16:11:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
+ }0 x0 c. |& r- c configuration: --enable-shared --prefix=/usr/local/ffmpeg+ W' q5 \. y( `
libavutil 54. 7.100 / 54. 7.100
# t& j2 V0 E0 a" r( r" l7 R libavcodec 56. 1.100 / 56. 1.100; J$ m# V* ?) F& `% I& }
libavformat 56. 4.100 / 56. 4.100
( ?( a) c, h8 y' V" n$ H libavdevice 56. 0.100 / 56. 0.1000 h& @) P, a Z* X# Y/ X" ^
libavfilter 5. 1.100 / 5. 1.100: _/ Q! |0 N" d/ }7 D" d. z
libswscale 3. 0.100 / 3. 0.100 E4 n9 \1 h/ ]+ |0 D0 f& l
libswresample 1. 1.100 / 1. 1.100
. k& C6 G" f4 X5 [Hyper fast Audio and Video encoder
5 V: Z: X2 i% |' z; Xusage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
2 K5 r: w0 U% eUse -h to get full help or, even better, run 'man ffmpeg'
% W, t. @. r, n, C+ s9 o* S
0 b" i7 D0 r7 U寞鈭:
, n$ U' V3 ^5 f/ n. \1 g
t5 Z/ ]) Y' X t6 Z隞 ffmpeginstaller 摰鋆 ffmpeg 賊憟隞:" `2 G+ T S2 n4 A
8 s! @% k/ [+ Q y, e+ P% \
http://ffmpeginstaller.com銝頛唳摰桅嚗靘憒嚗/tmp/' O# @& A" X+ R0 `; n
閫憯蝮格敺嚗Y銝 ffmpeginstaller+祈 桅嚗靘憒嚗銝頛閫敺桅1 {, L; l9 {, J1 Z8 t% n" V* V+ [6 J& r
/tmp/ffmpeginstaller.8.0/1 i, X7 X! N8 Y3 ~" K
脣餌桅敺嚗銝隞支誑瑁
* [5 E$ d" M, x
N8 F2 E' I! e5 \# N: O; _[root]# ./install: a7 o! |7 Z! i R- P5 F
! N |" J0 ?$ l/ c
摰鋆蝔撘撠望憪脰摰鋆嚗閬瘜芸楛銝蝬脣颱頛閬瑼獢. P4 \# S- y0 d! s$ Y3 X
嗅祕摰鋆蝔撘撠望 yum install 單穿摰鋆蝔憭抒 1 撠1 c. Y2 f. W0 P8 N
銝 ffmpeginstaller 摰鋆頝ffmpeg賊憟隞塚
9 Q, ]1 \- ~+ `+ y
# i, { z- v, w+ m
( x( |5 [1 W. ^+ [; ^: ]
6 ~- A3 L5 P7 Y6 L% J$ I
: http://oldgrayduck.blogspot.tw/2 ... staller-ffmpeg.html
8 V* a; M& ~; c( l: W, W- m9 q8 D' d
# J# ?8 x# l# Q5 ~/ m- G' S: Z4 g' Z+ |
7 U j9 m) u/ }- E/ |5 I |
|