砍敺 IT_man 2017-3-28 13:02 蝺刻摩
% i& e# u' _; h) }5 S: ~6 ]% [0 T$ l( n" x; S5 s
FFmpeg臭甈曉撩憭抒閬閮蝺刻圾蝣澆極瘀臭誑憭折蝺函Ⅳ澆ffmpeg舫曉蝣潘汪inux撟喳唬潘銋臭誑典嗅雿璆剔頂蝏銝蝺刻陌瑁嚗WindowsMac OS X蝑
5 O/ ^. q& ^) h3 z5 h! ~% v$ d; O* W/ H; I/ o
寞銝:9 c' a% ~1 M* V9 d! }
. _1 G5 H& N; o" C/ Z7 @% T
[摰鋆]
+ N* k. M- J- d[/usr/local]#tar -jxvf ffmpeg-2.5.3.tar.bz21 `. D) X. u- s% X' f' t$ W
[/usr/local]#cd ffmpeg-2.5.3- w/ z2 Q; T0 g7 f7 j0 F1 F
) i# \" W1 [$ a& h( h! o
, M' Z+ D* \6 W5 ], j$ C& \$ u E$ M# d0 _摰鋆yasm5 n. {3 N& ~0 {+ j
ffmpeg蝺刻陌銝剔箔擃compile摨佗雿輻其舐楊隞歹鈭舫閬雿輻券撌亙瑯4 U$ e9 a; H) s0 o/ N5 V
[/usr/local/ffmpeg-2.5.3]#yum -y install yasm- c5 g( ]- b4 L0 P; ]& P! A' ]; c
璅雿輻冽蝣潭孵摰鋆嚗銝頛yasm皞隞蝣潘嗅雿輻./configuremake隞亙make istall脰摰鋆0 I$ p- c8 S4 y. a
[/usr/local/ffmpeg-2.5.3]#./configure --enable-shared --prefix=/usr/local/ffmpeg1 e9 _6 q( c. w5 T
嗡葉enable-shared銵函內Y亙澈嚗臭誑靘隞亙蝺函雿輻剁臬瑁蝔摨銋靘鞈湧鈭摨怒憒銝銝enable-shared賊雿輻券亦孵蝺刻陌嚗甇斗銝Y摨恬Yffmpeg蝑臬瑁瑼銋瘥頛憭改雿隞銝閬摨怠停臭誑湔亙瑁' G: q8 C+ P# a) r- T) t7 u
prefix銵函內撌亙瑕鋆桅嚗鋆∟身/usr/local/ffmpeg/ b1 z* a; _4 _: q" E
[/usr/local/ffmpeg-2.5.3]#make
9 G' u0 C% r" ~[/usr/local/ffmpeg-2.5.3]#make install 2 r( w0 U3 y- J' r- z- `1 {
: N% G. ?! g/ S |" `& j4 x1 r
3 j: J+ W4 a6 f9 \" E% m4 d
頝臬:摰鋆摰/usr/local/ffmpegY銝桅嚗 - bin嚗臬瑁瑼桅
- lib嚗亙澈桅
- include嚗蝺函典啁剜隞嗥桅
5 a+ c, J$ k$ G6 X; L( a 銝蝞⊥航帷ompile臬臬瑁蝔摨瑁賡閬靘鞈惻ib銝Y摨恬臭誑Yso隞嗆瑁/usr/lib銝嚗銋臭誑湔乩耨寥蝵格隞嗚亦/etc/ld.so.conf隞塚5 n" V" X9 o4 B7 O
[/usr/local/ffmpeg-2.5.3]#vi /etc/ld.so.conf/ w( x# G, z0 T: k# z7 T& `
include ld.so.conf.d/*.conf
- I% v2 r5 i% W
0 ~6 |8 O: ^! I1 v/ t潭臬臭誑/etc/ld.so.conf.d/撱箔啁隞逵fmpeg.conf嚗啣銝銵嚗喟榻fmpeglib桅嚗/ N; j. M" z/ I5 m+ k3 D
/usr/local/ffmpeg/lib
6 {( Y8 i" I8 Z4 H$ @5 `瑁ldconfig嚗湔追d.so.cache嚗雿蹂耨寧When run ldconfig show error:4 C- u3 B3 O7 _- @4 }
ldconfig: /usr/lib64/libgd.so.2 銝臭蝚西交 ==>4 M" d) J/ C& }" Y0 ?4 f" L
ll /usr/lib64/$ o: L9 q. ?; [ l& l
-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.29 y& t5 r! I6 b( S, b4 ]& ?; Z
-rwxr-xr-x 1 root root 275328 2015-01-11 08:03 /usr/lib64/libgd.so.2.0.0
9 Y" O3 F9 [5 \* OSo:
0 v) n9 }# i# _( a8 Z0 z8 Iln -s /usr/lib64/libgd.so.2.0.0 /usr/lib64/libgd.so.2 撠梯圾瘙
) z, P. }0 F8 ?5 b臭誑 vi /etc/ld.so.cache /usr/local/ffmpeg/lib 臬血歇 cache銝. E& Q$ ~9 `, W
, k' a6 j9 k4 } q% G; C* T箔其遙雿唳寡賢湔亦狄fmpeg瑁嚗銝其蝙典./ffmpeg /usr/local/ffmpeg/bin/ffmpeg孵瑁甇文極瘀臭誑臬瑁瑼獢銴鋆賢軔in桅銝嚗灸in桅銝撱箇頠蝯憿隡潔Windows銝瑕嚗憒臬瑁瑼獢鋡怠支嚗頠蝯銋銝賜匱蝥雿輻剁蝖祇蝯臭誑蝜潛雿輻具撱粹蝯賭誘憒銝嚗
& N0 A' x" t* g- \1 F4 }$ M
: x( q' i2 b- y1 Ysudo ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffmpeg .
, Z5 ~6 y# m- B5 g" L6 y+ lsudo ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffprobe .
4 K3 Y f" w/ Y8 w# A- usudo ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/ or [/usr/local/bin]# sudo ln -s /usr/local/ffmpeg/bin/ffserver .
- B. i& e3 C; D1 E
& v4 L, b+ q5 ?血嚗憒閬剌fmpeg剜隞塚憟賢include桅銝ffmpeg銴鋆賢/usr/include銝准% Y+ J" N N6 }# J
曉典臭誑究hell銝剔湔亥撓卯fmpeg瑁嚗蝯憒銝嚗0 e% _; ]$ G* Q3 r6 N5 {
( u6 ~) t4 d# ~8 b. L( K
* J" N: y c$ E% y* i% T
[root@CentOS6 bin]# ffmpeg
+ Y, U2 b/ o |2 o S$ q$ `ffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers6 j _! Y3 I8 `- E' l+ \
built on Oct 9 2015 16:11:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
+ T! [7 P, k9 Y6 Z- V, S- O# R configuration: --enable-shared --prefix=/usr/local/ffmpeg# L4 O0 f3 I4 e$ W
libavutil 54. 7.100 / 54. 7.100
( M, M* ]2 r0 V4 k+ { t" n' ~ libavcodec 56. 1.100 / 56. 1.100" Q( H4 d. ]8 f; Z A( V. E( N
libavformat 56. 4.100 / 56. 4.100/ o: J2 i5 k7 M* n) n# x2 E* m
libavdevice 56. 0.100 / 56. 0.100
) r* Q2 x7 J9 y4 X7 U% I5 L$ d libavfilter 5. 1.100 / 5. 1.1006 \4 E4 R) t4 \5 ~% Z
libswscale 3. 0.100 / 3. 0.100
+ _- U5 K8 M" R+ J# W. ] libswresample 1. 1.100 / 1. 1.100! c- ^3 u8 A. r: d
Hyper fast Audio and Video encoder+ H/ f6 U: K0 B( U; I
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}.../ m" |- L' S4 ]
Use -h to get full help or, even better, run 'man ffmpeg'
. n% i# D" u! L
$ Z7 P g4 K% `寞鈭:
4 x1 {! O) J) W1 J: x: u$ K! [5 r6 }3 T" E- D, s
隞 ffmpeginstaller 摰鋆 ffmpeg 賊憟隞:0 W1 z6 X6 m4 o1 ?; K
9 s3 K' V0 _2 mhttp://ffmpeginstaller.com銝頛唳摰桅嚗靘憒嚗/tmp/
# g* M! U' I7 F/ d- h4 k閫憯蝮格敺嚗Y銝 ffmpeginstaller+祈 桅嚗靘憒嚗銝頛閫敺桅- F+ f+ ~! F, W/ b# G
/tmp/ffmpeginstaller.8.0/2 ]# L* W |% b$ v
脣餌桅敺嚗銝隞支誑瑁1 r x+ N+ t+ i# \" b5 r2 P O
; o" n0 ?3 V: T: y/ V3 i/ P[root]# ./install
3 a a, p; B% F7 q( \
' k( O" T5 }2 h7 n( E1 k% E+ O摰鋆蝔撘撠望憪脰摰鋆嚗閬瘜芸楛銝蝬脣颱頛閬瑼獢
* ]% g4 _3 m( q嗅祕摰鋆蝔撘撠望 yum install 單穿摰鋆蝔憭抒 1 撠
! R" Y( x( ?: m! \) ]銝 ffmpeginstaller 摰鋆頝ffmpeg賊憟隞塚
4 V/ T# i' @. b) f3 g1 A
4 o& ?0 x' q# ?+ ~: j O
) W$ e/ E* p7 K! T% p+ c+ G! s/ }4 U! B
: http://oldgrayduck.blogspot.tw/2 ... staller-ffmpeg.html: `( e! B; p: v0 _* V% A
( }; k9 n' h6 s
6 O/ v: G7 S. j& U0 q
) q6 c: T" L" T( M; D
|
|