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
2015-10-20 14:52:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
29122b6e70ce8bb0e63334bc29734614ae525352
29122b6e
1 parent
2bae6e09
fix #502, transcoder support snapshot.
隐藏空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
28 行增加
和
18 行删除
README.md
trunk/conf/full.conf
trunk/src/app/srs_app_encoder.cpp
trunk/src/app/srs_app_ffmpeg.cpp
trunk/src/app/srs_app_process.cpp
trunk/src/core/srs_core.hpp
README.md
查看文件 @
29122b6
...
...
@@ -386,6 +386,7 @@ Remark:
### History
*
v3.0, 2015-10-20, fix
[
#502
][
bug #502
]
, support snapshot with http-callback or transcoder. 3.0.5
*
v3.0, 2015-09-19, support amf0 and json to convert with each other.
*
v3.0, 2015-09-19, json objects support dumps to string.
*
v3.0, 2015-09-14, fix
[
#459
][
bug #459
]
, support dvr raw api. 3.0.4
...
...
@@ -1277,6 +1278,7 @@ Winlin
[
bug #299
]:
https://github.com/simple-rtmp-server/srs/issues/299
[
bug #466
]:
https://github.com/simple-rtmp-server/srs/issues/466
[
bug #468
]:
https://github.com/simple-rtmp-server/srs/issues/468
[
bug #502
]:
https://github.com/simple-rtmp-server/srs/issues/502
[
bug #xxxxxxx
]:
https://github.com/simple-rtmp-server/srs/issues/xxxxxxx
[
r2.0a2
]:
https://github.com/simple-rtmp-server/srs/releases/tag/2.0a2
...
...
trunk/conf/full.conf
查看文件 @
29122b6
...
...
@@ -1281,6 +1281,7 @@ vhost example.transcode.srs.com {
# video encoder name, "ffmpeg -vcodec"
# can be:
# libx264: use h.264(libx264) video encoder.
# png: use png to snapshot thumbnail.
# copy: donot encoder the video stream, copy it.
# vn: disable video output.
vcodec
libx264
;
...
...
@@ -1354,6 +1355,7 @@ vhost example.transcode.srs.com {
# output format, "ffmpeg -f" can be:
# off, do not specifies the format, ffmpeg will guess it.
# flv, for flv or RTMP stream.
# image2, for vcodec png to snapshot thumbnail.
# other format, for example, mp4/aac whatever.
# default: flv
oformat
flv
;
...
...
trunk/src/app/srs_app_encoder.cpp
查看文件 @
29122b6
...
...
@@ -262,7 +262,7 @@ int SrsEncoder::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsRequest* req, SrsConfDir
input
=
"rtmp://"
;
input
+=
SRS_CONSTS_LOCALHOST
;
input
+=
":"
;
input
+=
req
->
port
;
input
+=
srs_int2str
(
req
->
port
)
;
input
+=
"/"
;
input
+=
req
->
app
;
input
+=
"?vhost="
;
...
...
trunk/src/app/srs_app_ffmpeg.cpp
查看文件 @
29122b6
...
...
@@ -47,16 +47,17 @@ using namespace std;
#ifdef SRS_AUTO_FFMPEG_STUB
#define SRS_RTMP_ENCODER_COPY "copy"
#define SRS_RTMP_ENCODER_NO_VIDEO "vn"
#define SRS_RTMP_ENCODER_NO_AUDIO "an"
#define SRS_RTMP_ENCODER_COPY "copy"
#define SRS_RTMP_ENCODER_NO_VIDEO "vn"
#define SRS_RTMP_ENCODER_NO_AUDIO "an"
// only support libx264 encoder.
#define SRS_RTMP_ENCODER_VCODEC "libx264"
#define SRS_RTMP_ENCODER_VCODEC_LIBX264 "libx264"
#define SRS_RTMP_ENCODER_VCODEC_PNG "png"
// any aac encoder is ok which contains the aac,
// for example, libaacplus, aac, fdkaac
#define SRS_RTMP_ENCODER_ACODEC "aac"
#define SRS_RTMP_ENCODER_LIBAACPLUS "libaacplus"
#define SRS_RTMP_ENCODER_LIBFDKAAC "libfdk_aac"
#define SRS_RTMP_ENCODER_ACODEC "aac"
#define SRS_RTMP_ENCODER_LIBAACPLUS "libaacplus"
#define SRS_RTMP_ENCODER_LIBFDKAAC "libfdk_aac"
SrsFFMPEG
::
SrsFFMPEG
(
std
::
string
ffmpeg_bin
)
{
...
...
@@ -139,11 +140,11 @@ int SrsFFMPEG::initialize_transcode(SrsConfDirective* engine)
return
ret
;
}
if
(
vcodec
!=
SRS_RTMP_ENCODER_COPY
&&
vcodec
!=
SRS_RTMP_ENCODER_NO_VIDEO
)
{
if
(
vcodec
!=
SRS_RTMP_ENCODER_VCODEC
)
{
if
(
vcodec
!=
SRS_RTMP_ENCODER_COPY
&&
vcodec
!=
SRS_RTMP_ENCODER_NO_VIDEO
&&
vcodec
!=
SRS_RTMP_ENCODER_VCODEC_PNG
)
{
if
(
vcodec
!=
SRS_RTMP_ENCODER_VCODEC_LIBX264
)
{
ret
=
ERROR_ENCODER_VCODEC
;
srs_error
(
"invalid vcodec, must be %s, actual %s, ret=%d"
,
SRS_RTMP_ENCODER_VCODEC
,
vcodec
.
c_str
(),
ret
);
SRS_RTMP_ENCODER_VCODEC
_LIBX264
,
vcodec
.
c_str
(),
ret
);
return
ret
;
}
if
(
vbitrate
<
0
)
{
...
...
@@ -319,11 +320,15 @@ int SrsFFMPEG::start()
params
.
push_back
(
srs_int2str
(
vthreads
));
}
params
.
push_back
(
"-profile:v"
);
params
.
push_back
(
vprofile
);
if
(
!
vprofile
.
empty
())
{
params
.
push_back
(
"-profile:v"
);
params
.
push_back
(
vprofile
);
}
params
.
push_back
(
"-preset"
);
params
.
push_back
(
vpreset
);
if
(
!
vpreset
.
empty
())
{
params
.
push_back
(
"-preset"
);
params
.
push_back
(
vpreset
);
}
// vparams
if
(
!
vparams
.
empty
())
{
...
...
trunk/src/app/srs_app_process.cpp
查看文件 @
29122b6
...
...
@@ -76,15 +76,16 @@ int SrsProcess::initialize(string binary, vector<string> argv)
for
(
int
i
=
0
;
i
<
(
int
)
argv
.
size
();
i
++
)
{
std
::
string
ffp
=
argv
[
i
];
std
::
string
nffp
=
(
i
<
(
int
)
argv
.
size
()
-
1
)
?
argv
[
i
+
1
]
:
""
;
// remove the stdout and stderr.
if
(
ffp
==
"1"
)
{
if
(
ffp
==
"1"
&&
nffp
==
">"
)
{
if
(
i
+
2
<
(
int
)
argv
.
size
())
{
stdout_file
=
argv
[
i
+
2
];
i
+=
2
;
}
continue
;
}
else
if
(
ffp
==
"2"
)
{
}
else
if
(
ffp
==
"2"
&&
nffp
==
">"
)
{
if
(
i
+
2
<
(
int
)
argv
.
size
())
{
stderr_file
=
argv
[
i
+
2
];
i
+=
2
;
...
...
trunk/src/core/srs_core.hpp
查看文件 @
29122b6
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 3
#define VERSION_MINOR 0
#define VERSION_REVISION
4
#define VERSION_REVISION
5
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论