Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2013-11-30 11:59:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
14c2585cc387ebbb6f19a3fa0db3e24ca61c985d
14c2585c
1 parent
df53681a
add build ffmpeg script
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
41 行增加
和
4 行删除
README.md
trunk/auto/depends.sh
trunk/auto/options.sh
README.md
查看文件 @
14c2585
...
...
@@ -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.
...
...
trunk/auto/depends.sh
100644 → 100755
查看文件 @
14c2585
...
...
@@ -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
...
...
trunk/auto/options.sh
查看文件 @
14c2585
...
...
@@ -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
\ No newline at end of file
...
...
请
注册
或
登录
后发表评论