mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug of core
This commit is contained in:
parent
6af0794bab
commit
2695e4d0c6
2 changed files with 134 additions and 133 deletions
|
@ -20,7 +20,7 @@ vhost __defaultVhost__ {
|
||||||
transcode {
|
transcode {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
engine ld{
|
engine ld {
|
||||||
enabled on;
|
enabled on;
|
||||||
vfilter {
|
vfilter {
|
||||||
vf 'drawtext=text=SimpleRtmpServer(SRS):x=10:y=10:fontcolor=#cccccc:fontfile=./doc/FreeSerifBold.ttf';
|
vf 'drawtext=text=SimpleRtmpServer(SRS):x=10:y=10:fontcolor=#cccccc:fontfile=./doc/FreeSerifBold.ttf';
|
||||||
|
@ -43,7 +43,7 @@ vhost __defaultVhost__ {
|
||||||
}
|
}
|
||||||
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
||||||
}
|
}
|
||||||
engine sd{
|
engine sd {
|
||||||
enabled on;
|
enabled on;
|
||||||
vfilter {
|
vfilter {
|
||||||
vf 'split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2';
|
vf 'split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2';
|
||||||
|
@ -76,11 +76,11 @@ vhost dev {
|
||||||
hls_path ./objs/nginx/html;
|
hls_path ./objs/nginx/html;
|
||||||
hls_fragment 5;
|
hls_fragment 5;
|
||||||
hls_window 30;
|
hls_window 30;
|
||||||
forward 127.0.0.1:19350?vhost=dev;
|
forward 127.0.0.1:19350;
|
||||||
transcode {
|
transcode {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
engine dev{
|
engine dev {
|
||||||
enabled on;
|
enabled on;
|
||||||
vfilter {
|
vfilter {
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ vhost mirror.transcode.vhost.com {
|
||||||
transcode {
|
transcode {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
engine mirror{
|
engine mirror {
|
||||||
enabled on;
|
enabled on;
|
||||||
vfilter {
|
vfilter {
|
||||||
vf 'split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2';
|
vf 'split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2';
|
||||||
|
@ -139,7 +139,7 @@ vhost drawtext.transcode.vhost.com {
|
||||||
transcode {
|
transcode {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
engine drawtext{
|
engine drawtext {
|
||||||
enabled on;
|
enabled on;
|
||||||
vfilter {
|
vfilter {
|
||||||
vf 'drawtext=text=SimpleRtmpServer(SRS):x=10:y=10:fontcolor=#cccccc:fontfile=./doc/FreeSerifBold.ttf';
|
vf 'drawtext=text=SimpleRtmpServer(SRS):x=10:y=10:fontcolor=#cccccc:fontfile=./doc/FreeSerifBold.ttf';
|
||||||
|
@ -169,7 +169,7 @@ vhost crop.transcode.vhost.com {
|
||||||
transcode {
|
transcode {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
engine crop{
|
engine crop {
|
||||||
enabled on;
|
enabled on;
|
||||||
vfilter {
|
vfilter {
|
||||||
vf 'crop=in_w-20:in_h-160:10:80';
|
vf 'crop=in_w-20:in_h-160:10:80';
|
||||||
|
@ -199,7 +199,7 @@ vhost logo.transcode.vhost.com {
|
||||||
transcode {
|
transcode {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
engine logo{
|
engine logo {
|
||||||
enabled on;
|
enabled on;
|
||||||
vfilter {
|
vfilter {
|
||||||
vf 'crop=200:100:10:10';
|
vf 'crop=200:100:10:10';
|
||||||
|
@ -237,7 +237,7 @@ vhost all.transcode.vhost.com {
|
||||||
# the transcode engine for matched stream.
|
# the transcode engine for matched stream.
|
||||||
# all matched stream will transcoded to the following stream.
|
# all matched stream will transcoded to the following stream.
|
||||||
# the transcode set name(ie. hd) is optional and not used.
|
# the transcode set name(ie. hd) is optional and not used.
|
||||||
engine ffsuper{
|
engine ffsuper {
|
||||||
# whether the engine is enabled
|
# whether the engine is enabled
|
||||||
# default: off.
|
# default: off.
|
||||||
enabled on;
|
enabled on;
|
||||||
|
@ -300,7 +300,7 @@ vhost all.transcode.vhost.com {
|
||||||
# [engine] the tanscode engine name.
|
# [engine] the tanscode engine name.
|
||||||
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
||||||
}
|
}
|
||||||
engine ffhd{
|
engine ffhd {
|
||||||
enabled on;
|
enabled on;
|
||||||
vcodec libx264;
|
vcodec libx264;
|
||||||
vbitrate 1200;
|
vbitrate 1200;
|
||||||
|
@ -318,9 +318,9 @@ vhost all.transcode.vhost.com {
|
||||||
achannels 2;
|
achannels 2;
|
||||||
aparams {
|
aparams {
|
||||||
}
|
}
|
||||||
output rtmp://[vhost]:[port]/[app]/[stream]_ffhd;
|
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
||||||
}
|
}
|
||||||
engine ffsd{
|
engine ffsd {
|
||||||
enabled on;
|
enabled on;
|
||||||
vcodec libx264;
|
vcodec libx264;
|
||||||
vbitrate 800;
|
vbitrate 800;
|
||||||
|
@ -338,9 +338,9 @@ vhost all.transcode.vhost.com {
|
||||||
achannels 2;
|
achannels 2;
|
||||||
aparams {
|
aparams {
|
||||||
}
|
}
|
||||||
output rtmp://[vhost]:[port]/[app]/[stream]_ffsd;
|
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
||||||
}
|
}
|
||||||
engine fffast{
|
engine fffast {
|
||||||
enabled on;
|
enabled on;
|
||||||
vcodec libx264;
|
vcodec libx264;
|
||||||
vbitrate 300;
|
vbitrate 300;
|
||||||
|
@ -358,7 +358,7 @@ vhost all.transcode.vhost.com {
|
||||||
achannels 2;
|
achannels 2;
|
||||||
aparams {
|
aparams {
|
||||||
}
|
}
|
||||||
output rtmp://[vhost]:[port]/[app]/[stream]_fffast;
|
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -367,7 +367,7 @@ vhost ffempty.transcode.vhost.com {
|
||||||
transcode {
|
transcode {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./research/ffempty/ffempty;
|
ffmpeg ./research/ffempty/ffempty;
|
||||||
engine empty{
|
engine empty {
|
||||||
enabled on;
|
enabled on;
|
||||||
vcodec libx264;
|
vcodec libx264;
|
||||||
vbitrate 300;
|
vbitrate 300;
|
||||||
|
@ -385,7 +385,7 @@ vhost ffempty.transcode.vhost.com {
|
||||||
achannels 2;
|
achannels 2;
|
||||||
aparams {
|
aparams {
|
||||||
}
|
}
|
||||||
output rtmp://[vhost]:[port]/[app]/[stream]_empty;
|
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -396,7 +396,7 @@ vhost app.transcode.vhost.com {
|
||||||
transcode live {
|
transcode live {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
engine fd{
|
engine {
|
||||||
enabled off;
|
enabled off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,13 +408,13 @@ vhost stream.transcode.vhost.com {
|
||||||
transcode live/livestream {
|
transcode live/livestream {
|
||||||
enabled on;
|
enabled on;
|
||||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
engine fd{
|
engine {
|
||||||
enabled off;
|
enabled off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# the vhost which forward publish streams.
|
# the vhost which forward publish streams.
|
||||||
vhost forward.vhost.com {
|
vhost same.vhost.forward.vhost.com {
|
||||||
# forward all publish stream to the specified server.
|
# forward all publish stream to the specified server.
|
||||||
# this used to split/forward the current stream for cluster active-standby,
|
# this used to split/forward the current stream for cluster active-standby,
|
||||||
# active-active for cdn to build high available fault tolerance system.
|
# active-active for cdn to build high available fault tolerance system.
|
||||||
|
@ -425,7 +425,7 @@ vhost forward.vhost.com {
|
||||||
forward 127.0.0.1:1936 127.0.0.1:1937;
|
forward 127.0.0.1:1936 127.0.0.1:1937;
|
||||||
}
|
}
|
||||||
# the vhost which forward publish streams to other vhosts.
|
# the vhost which forward publish streams to other vhosts.
|
||||||
vhost forward1.vhost.com {
|
vhost change.vhost.forward.vhost.com {
|
||||||
forward 127.0.0.1:1936?vhost=forward2.vhost.com 127.0.0.1:1937?vhost=forward3.vhost.com;
|
forward 127.0.0.1:1936?vhost=forward2.vhost.com 127.0.0.1:1937?vhost=forward3.vhost.com;
|
||||||
}
|
}
|
||||||
# the vhost disabled.
|
# the vhost disabled.
|
||||||
|
|
1
trunk/src/core/srs_core.cpp
Normal file → Executable file
1
trunk/src/core/srs_core.cpp
Normal file → Executable file
|
@ -92,6 +92,7 @@ void srs_vhost_resolve(std::string& vhost, std::string& app)
|
||||||
{
|
{
|
||||||
app = srs_replace(app, "...", "?");
|
app = srs_replace(app, "...", "?");
|
||||||
|
|
||||||
|
size_t pos = 0;
|
||||||
if ((pos = app.find("?")) == std::string::npos) {
|
if ((pos = app.find("?")) == std::string::npos) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue