mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add build ffmpeg script
This commit is contained in:
parent
df53681a07
commit
14c2585cc3
3 changed files with 41 additions and 4 deletions
|
@ -15,7 +15,7 @@ step 1: build srs <br/>
|
|||
<pre>
|
||||
tar xf simple-rtmp-server-*.*.tar.gz
|
||||
cd simple-rtmp-server-*.*/trunk
|
||||
./configure --with-ssl --with-hls
|
||||
./configure --with-ssl --with-hls --with-ffmpeg
|
||||
make
|
||||
</pre>
|
||||
step 2: start srs <br/>
|
||||
|
@ -117,6 +117,7 @@ usr sys idl wai hiq siq| read writ| recv send| in out | int csw
|
|||
* nginx v1.5.0: 139524 lines <br/>
|
||||
|
||||
### History
|
||||
* v0.7, 2013-11-29, support --with/without -ffmpeg.
|
||||
* v0.7, 2013-11-29, add ffmpeg-2.1, x264-core138, lame-3.99.5, libaacplus-2.0.2.
|
||||
* v0.6, 2013-11-29, v0.6 released. 16094 lines.
|
||||
* v0.6, 2013-11-29, add performance summary, 1800 clients, 900Mbps, CPU 90.2%, 41MB.
|
||||
|
|
34
trunk/auto/depends.sh
Normal file → Executable file
34
trunk/auto/depends.sh
Normal file → Executable file
|
@ -47,20 +47,21 @@ if [[ ! -f ${SRS_OBJS}/http-parser-2.1/libhttp_parser.a ]]; then echo "build htt
|
|||
# nginx for HLS, nginx-1.5.0
|
||||
#####################################################################################
|
||||
if [ $SRS_HLS = YES ]; then
|
||||
if [[ -f ${SRS_OBJS}/nginx-1.5.7/_release/sbin/nginx ]]; then
|
||||
if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then
|
||||
echo "nginx-1.5.7 is ok.";
|
||||
else
|
||||
echo "build nginx-1.5.7";
|
||||
(
|
||||
pwd_dir=`pwd` &&
|
||||
rm -rf ${SRS_OBJS}/nginx-1.5.7 && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/nginx-1.5.7.zip && cd nginx-1.5.7 &&
|
||||
./configure --prefix=`pwd`/_release && make && make install &&
|
||||
ln -sf `pwd`/_release ../nginx
|
||||
ln -sf ${pwd_dir}/nginx-1.5.7/_release nginx
|
||||
)
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build nginx-1.5.7 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/nginx-1.5.7/_release/sbin/nginx ]; then echo "build nginx-1.5.7 failed."; exit -1; fi
|
||||
if [ ! -f ${SRS_OBJS}/nginx/sbin/nginx ]; then echo "build nginx-1.5.7 failed."; exit -1; fi
|
||||
|
||||
# use current user to config nginx,
|
||||
# srs will write ts/m3u8 file use current user,
|
||||
|
@ -83,3 +84,30 @@ if [ $SRS_SSL = YES ]; then
|
|||
else
|
||||
echo "#undef SRS_SSL" >> $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
# live transcoding, ffmpeg-2.1, x264-core138, lame-3.99.5, libaacplus-2.0.2.
|
||||
#####################################################################################
|
||||
if [ $SRS_FFMPEG = YES ]; then
|
||||
if [[ -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]]; then
|
||||
echo "ffmpeg-2.1 is ok.";
|
||||
else
|
||||
echo "build ffmpeg-2.1";
|
||||
(
|
||||
pwd_dir=`pwd` && exit 0;
|
||||
rm -rf ${SRS_OBJS}/nginx-1.5.7 && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/nginx-1.5.7.zip && cd nginx-1.5.7 &&
|
||||
./configure --prefix=`pwd`/_release && make && make install &&
|
||||
ln -sf ${pwd_dir}/nginx-1.5.7/_release nginx
|
||||
)
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build ffmpeg-2.1 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "build ffmpeg-2.1 failed."; exit -1; fi
|
||||
fi
|
||||
|
||||
if [ $SRS_FFMPEG = YES ]; then
|
||||
echo "#define SRS_FFMPEG" >> $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
echo "#undef SRS_FFMPEG" >> $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
|
|
@ -4,10 +4,12 @@ help=no
|
|||
|
||||
SRS_HLS=RESERVED
|
||||
SRS_SSL=RESERVED
|
||||
SRS_FFMPEG=RESERVED
|
||||
|
||||
# TODO: remove the default to yes.
|
||||
SRS_HLS=YES
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG=YES
|
||||
|
||||
opt=
|
||||
|
||||
|
@ -25,9 +27,11 @@ do
|
|||
|
||||
--with-ssl) SRS_SSL=YES ;;
|
||||
--with-hls) SRS_HLS=YES ;;
|
||||
--with-ffmpeg) SRS_FFMPEG=YES ;;
|
||||
|
||||
--without-ssl) SRS_SSL=NO ;;
|
||||
--without-hls) SRS_HLS=NO ;;
|
||||
--without-ffmpeg) SRS_FFMPEG=NO ;;
|
||||
|
||||
*)
|
||||
echo "$0: error: invalid option \"$option\""
|
||||
|
@ -65,6 +69,10 @@ if [ $SRS_HLS = RESERVED ]; then
|
|||
echo "you must specifies the hls, see: ./configure --help";
|
||||
__check_ok=NO
|
||||
fi
|
||||
if [ $SRS_FFMPEG = RESERVED ]; then
|
||||
echo "you must specifies the ffmpeg, see: ./configure --help";
|
||||
__check_ok=NO
|
||||
fi
|
||||
if [ $__check_ok = NO ]; then
|
||||
exit 1;
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue