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
8 years ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4709d0214cc03f53832aa7c62d1c18746bc60f51
4709d021
1 parent
35cd4c40
for #711, support prefile for transcode. 3.0.12
隐藏空白字符变更
内嵌
并排对比
正在显示
8 个修改的文件
包含
84 行增加
和
28 行删除
README.md
trunk/.gitignore
trunk/conf/full.conf
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_config.hpp
trunk/src/app/srs_app_ffmpeg.cpp
trunk/src/app/srs_app_ffmpeg.hpp
trunk/src/core/srs_core.hpp
README.md
查看文件 @
4709d02
...
...
@@ -174,6 +174,7 @@ Please select your language:
-
[
x
]
[
experiment
]
Support push POST FLV over HTTP, please read
[
wiki
](
[CN][v2_CN_Streamer2],
[
EN
][
v2_EN_Streamer2
]
).
-
[
x
]
[
experiment
]
Support multiple processes by
[
dolphin
][
srs-dolphin
]
or
[
oryx
][
oryx
]
.
-
[
x
]
[
experiment
]
Support
[
mgmt console
][
console
]
, please read
[
srs-ngb
][
srs-ngb
]
.
-
[
]
Enhanced HLS audio-only use aac instead of ts.
-
[
]
Enhanced forward with vhost and url variables.
-
[
]
Support source or idle stream cleanup.
-
[
]
Support origin cluster, please read
[
#464
][
bug #464
]
,
[
RTMP 302
][
bug #92
]
.
...
...
@@ -183,6 +184,7 @@ Please select your language:
### V3 changes
*
v3.0, 2017-01-06, for
[
#711
][
bug #711
]
support perfile for transcode. 3.0.12
*
v3.0, 2017-01-05, patch ST for valgrind and ARM. 3.0.11
*
v3.0, 2017-01-05, for
[
#324
][
bug #324
]
, always enable hstrs. 3.0.10
*
v3.0, 2016-12-15, fix
[
#717
][
bug #717
]
,
[
#691
][
bug #691
]
, http api/static/stream support cors. 3.0.9
...
...
@@ -1304,6 +1306,7 @@ Winlin
[
bug #511
]:
https://github.com/ossrs/srs/issues/511
[
bug #717
]:
https://github.com/ossrs/srs/issues/717
[
bug #691
]:
https://github.com/ossrs/srs/issues/691
[
bug #711
]:
https://github.com/ossrs/srs/issues/711
[
bug #xxxxxxxxxx
]:
https://github.com/ossrs/srs/issues/xxxxxxxxxx
[
exo #828
]:
https://github.com/google/ExoPlayer/pull/828
...
...
trunk/.gitignore
查看文件 @
4709d02
console*.conf
doc/frozen.2Mbps.1644x1028.flv
doc/frozen.500Kbps.766x480.flv
doc/kungfupanda3-tlr1_h1080p.200kbps.flv
doc/kungfupanda3-tlr1_h1080p.300kbps.flv
doc/kungfupanda3-tlr1_h1080p.400kbps.flv
doc/kungfupanda3-tlr1_h1080p.500kbps.flv
doc/kungfupanda3-tlr1_h1080p.600kbps.flv
doc/kungfupanda3-tlr1_h1080p.700kbps.flv
doc/kungfupanda3-tlr1_h1080p.800kbps.flv
doc/kungfupanda3-tlr1_h1080p.8mbps.flv
doc/kungfupanda3-tlr1_h1080p.900kbps.flv
doc/time.300kbps.flv
edge.conf
*.conf
doc/frozen*.flv
doc/kungfupanda*.flv
doc/time*.flv
html
ide/srs_xcode/srs_xcode.xcodeproj/project.xcworkspace/xcshareddata/
ide/srs_xcode/srs_xcode.xcodeproj/project.xcworkspace/xcuserdata/
ide/srs_xcode/srs_xcode.xcodeproj/xcuserdata/
ingest.conf
origin.conf
research/aac/
research/api-server/
.idea/
.idea/
research/api-server/static-dir/mse
research/bat/
research/big/
...
...
@@ -33,10 +21,8 @@ research/golang/temp.flv
research/librtmp/720p.h264.raw
research/librtmp/test.h264
research/licenser/
research/players/.idea/
research/players/fls_player/
research/players/mic/
research/players/srs_player/.idea/
research/proxy/
research/redis-ocluster/
research/rtmfp/
...
...
trunk/conf/full.conf
查看文件 @
4709d02
...
...
@@ -1277,14 +1277,29 @@ vhost example.transcode.srs.com {
# the transcode engine for matched stream.
# all matched stream will transcoded to the following stream.
# the transcode set name(ie. hd) is optional and not used.
# we will build the parameters to fork ffmpeg:
# ffmpeg <perfile>
# -i <iformat>
# <vfilter>
# -vcodec <vcodec> -b:v <vbitrate> -r <vfps> -s <vwidth>x<vheight> -profile:v <vprofile> -preset <vpreset>
# <vparams>
# -acodec <acodec> -b:a <abitrate> -ar <asample_rate> -ac <achannels>
# <aparams>
# -f <oformat>
# -y <output>
engine
example
{
# whether the engine is enabled
# default: off.
enabled
on
;
# input format, "ffmpeg -i", can be:
# off, do not specifies the format, ffmpeg will guess it.
# flv, for flv or RTMP stream.
# other format, for example, mp4/aac whatever.
# pre-file options, before "-i"
perfile
{
re
;
rtsp_transport
tcp
;
}
# input format "-i", can be:
# off, do not specifies the format, ffmpeg will guess it.
# flv, for flv or RTMP stream.
# other format, for example, mp4/aac whatever.
# default: flv
iformat
flv
;
# ffmpeg filters, between "-i" and "-vcodec"
...
...
trunk/src/app/srs_app_config.cpp
查看文件 @
4709d02
...
...
@@ -3982,7 +3982,7 @@ int SrsConfig::check_config()
&&
e
!=
"vbitrate"
&&
e
!=
"vfps"
&&
e
!=
"vwidth"
&&
e
!=
"vheight"
&&
e
!=
"vthreads"
&&
e
!=
"vprofile"
&&
e
!=
"vpreset"
&&
e
!=
"vparams"
&&
e
!=
"acodec"
&&
e
!=
"abitrate"
&&
e
!=
"asample_rate"
&&
e
!=
"achannels"
&&
e
!=
"aparams"
&&
e
!=
"output"
&&
e
!=
"aparams"
&&
e
!=
"output"
&&
e
!=
"perfile"
&&
e
!=
"iformat"
&&
e
!=
"oformat"
)
{
ret
=
ERROR_SYSTEM_CONFIG_INVALID
;
...
...
@@ -5377,6 +5377,41 @@ bool SrsConfig::get_engine_enabled(SrsConfDirective* conf)
return
SRS_CONF_PERFER_FALSE
(
conf
->
arg0
());
}
string
srs_prefix_underscores_ifno
(
string
name
)
{
if
(
srs_string_starts_with
(
name
,
"-"
))
{
return
name
;
}
else
{
return
"-"
+
name
;
}
}
vector
<
string
>
SrsConfig
::
get_engine_perfile
(
SrsConfDirective
*
conf
)
{
vector
<
string
>
perfile
;
if
(
!
conf
)
{
return
perfile
;
}
conf
=
conf
->
get
(
"perfile"
);
if
(
!
conf
)
{
return
perfile
;
}
for
(
int
i
=
0
;
i
<
(
int
)
conf
->
directives
.
size
();
i
++
)
{
SrsConfDirective
*
option
=
conf
->
directives
[
i
];
if
(
!
option
)
{
continue
;
}
perfile
.
push_back
(
srs_prefix_underscores_ifno
(
option
->
name
));
perfile
.
push_back
(
option
->
arg0
());
}
return
perfile
;
}
string
SrsConfig
::
get_engine_iformat
(
SrsConfDirective
*
conf
)
{
static
string
DEFAULT
=
"flv"
;
...
...
@@ -5412,7 +5447,7 @@ vector<string> SrsConfig::get_engine_vfilter(SrsConfDirective* conf)
continue
;
}
vfilter
.
push_back
(
"-"
+
filter
->
name
);
vfilter
.
push_back
(
srs_prefix_underscores_ifno
(
filter
->
name
)
);
vfilter
.
push_back
(
filter
->
arg0
());
}
...
...
@@ -5566,7 +5601,7 @@ vector<string> SrsConfig::get_engine_vparams(SrsConfDirective* conf)
continue
;
}
vparams
.
push_back
(
"-"
+
filter
->
name
);
vparams
.
push_back
(
srs_prefix_underscores_ifno
(
filter
->
name
)
);
vparams
.
push_back
(
filter
->
arg0
());
}
...
...
@@ -5656,7 +5691,7 @@ vector<string> SrsConfig::get_engine_aparams(SrsConfDirective* conf)
continue
;
}
aparams
.
push_back
(
"-"
+
filter
->
name
);
aparams
.
push_back
(
srs_prefix_underscores_ifno
(
filter
->
name
)
);
aparams
.
push_back
(
filter
->
arg0
());
}
...
...
trunk/src/app/srs_app_config.hpp
查看文件 @
4709d02
...
...
@@ -977,6 +977,10 @@ public:
*/
virtual
bool
get_engine_enabled
(
SrsConfDirective
*
conf
);
/**
* get the perfile of engine
*/
virtual
std
::
vector
<
std
::
string
>
get_engine_perfile
(
SrsConfDirective
*
conf
);
/**
* get the iformat of engine
*/
virtual
std
::
string
get_engine_iformat
(
SrsConfDirective
*
conf
);
...
...
trunk/src/app/srs_app_ffmpeg.cpp
查看文件 @
4709d02
...
...
@@ -112,6 +112,7 @@ int SrsFFMPEG::initialize_transcode(SrsConfDirective* engine)
{
int
ret
=
ERROR_SUCCESS
;
perfile
=
_srs_config
->
get_engine_perfile
(
engine
);
iformat
=
_srs_config
->
get_engine_iformat
(
engine
);
vfilter
=
_srs_config
->
get_engine_vfilter
(
engine
);
vcodec
=
_srs_config
->
get_engine_vcodec
(
engine
);
...
...
@@ -264,6 +265,17 @@ int SrsFFMPEG::start()
params
.
push_back
(
_iparams
);
}
// build the perfile
if
(
!
perfile
.
empty
())
{
std
::
vector
<
std
::
string
>::
iterator
it
;
for
(
it
=
perfile
.
begin
();
it
!=
perfile
.
end
();
++
it
)
{
std
::
string
p
=
*
it
;
if
(
!
p
.
empty
())
{
params
.
push_back
(
p
);
}
}
}
// input.
if
(
iformat
!=
"off"
&&
!
iformat
.
empty
())
{
params
.
push_back
(
"-f"
);
...
...
trunk/src/app/srs_app_ffmpeg.hpp
查看文件 @
4709d02
...
...
@@ -51,6 +51,7 @@ private:
private
:
std
::
string
ffmpeg
;
std
::
string
_iparams
;
std
::
vector
<
std
::
string
>
perfile
;
std
::
string
iformat
;
std
::
string
input
;
std
::
vector
<
std
::
string
>
vfilter
;
...
...
trunk/src/core/srs_core.hpp
查看文件 @
4709d02
...
...
@@ -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 1
1
#define VERSION_REVISION 1
2
// generated by configure, only macros.
#include <srs_auto_headers.hpp>
...
...
请
注册
或
登录
后发表评论