mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
For #1634, refactor output with datetime for ingest/encoder/exec. 3.0.125
This commit is contained in:
parent
0290009b4e
commit
c61c2a939f
5 changed files with 35 additions and 1 deletions
|
@ -146,6 +146,7 @@ For previous versions, please read:
|
|||
|
||||
## V3 changes
|
||||
|
||||
* v3.0, 2020-03-11, For [#1634][bug #1634], refactor output with datetime for ingest/encoder/exec. 3.0.125
|
||||
* v3.0, 2020-03-11, For [#1634][bug #1634], fix quit by accident SIGTERM while killing FFMPEG. 3.0.124
|
||||
* <strong>v3.0, 2020-03-05, [3.0 beta2(3.0.123)][r3.0b2] released. 122170 lines.</strong>
|
||||
* v3.0, 2020-02-21, For [#1598][bug #1598], support SLB health checking by TCP. 3.0.123
|
||||
|
|
|
@ -978,6 +978,16 @@ vhost exec.srs.com {
|
|||
# [tcUrl] the client request tcUrl.
|
||||
# [swfUrl] the client request swfUrl.
|
||||
# [pageUrl] the client request pageUrl.
|
||||
# we also support datetime variables.
|
||||
# [2006], replace this const to current year.
|
||||
# [01], replace this const to current month.
|
||||
# [02], replace this const to current date.
|
||||
# [15], replace this const to current hour.
|
||||
# [04], replace this const to current minute.
|
||||
# [05], replace this const to current second.
|
||||
# [999], replace this const to current millisecond.
|
||||
# [timestamp],replace this const to current UNIX timestamp in ms.
|
||||
# @remark we use golang time format "2006-01-02 15:04:05.999" as "[2006]-[01]-[02]_[15].[04].[05]_[999]"
|
||||
# @remark empty to ignore this exec.
|
||||
publish ./objs/ffmpeg/bin/ffmpeg -f flv -i [url] -c copy -y ./[stream].flv;
|
||||
}
|
||||
|
@ -1331,6 +1341,16 @@ vhost ingest.srs.com {
|
|||
# output stream. variables:
|
||||
# [vhost] current vhost which start the ingest.
|
||||
# [port] system RTMP stream port.
|
||||
# we also support datetime variables.
|
||||
# [2006], replace this const to current year.
|
||||
# [01], replace this const to current month.
|
||||
# [02], replace this const to current date.
|
||||
# [15], replace this const to current hour.
|
||||
# [04], replace this const to current minute.
|
||||
# [05], replace this const to current second.
|
||||
# [999], replace this const to current millisecond.
|
||||
# [timestamp],replace this const to current UNIX timestamp in ms.
|
||||
# @remark we use golang time format "2006-01-02 15:04:05.999" as "[2006]-[01]-[02]_[15].[04].[05]_[999]"
|
||||
output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;
|
||||
}
|
||||
}
|
||||
|
@ -1519,6 +1539,16 @@ vhost example.transcode.srs.com {
|
|||
# [app] the input stream app.
|
||||
# [stream] the input stream name.
|
||||
# [engine] the transcode engine name.
|
||||
# we also support datetime variables.
|
||||
# [2006], replace this const to current year.
|
||||
# [01], replace this const to current month.
|
||||
# [02], replace this const to current date.
|
||||
# [15], replace this const to current hour.
|
||||
# [04], replace this const to current minute.
|
||||
# [05], replace this const to current second.
|
||||
# [999], replace this const to current millisecond.
|
||||
# [timestamp],replace this const to current UNIX timestamp in ms.
|
||||
# @remark we use golang time format "2006-01-02 15:04:05.999" as "[2006]-[01]-[02]_[15].[04].[05]_[999]"
|
||||
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -382,6 +382,7 @@ srs_error_t SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective*
|
|||
// ie. rtmp://localhost:1935/live/livestream_sd
|
||||
output = srs_string_replace(output, "[vhost]", vhost->arg0());
|
||||
output = srs_string_replace(output, "[port]", srs_int2str(port));
|
||||
output = srs_path_build_timestamp(output);
|
||||
if (output.empty()) {
|
||||
return srs_error_new(ERROR_ENCODER_NO_OUTPUT, "empty output url, ingest=%s", ingest->arg0().c_str());
|
||||
}
|
||||
|
|
|
@ -219,6 +219,8 @@ string SrsNgExec::parse(SrsRequest* req, string tmpl)
|
|||
output = srs_string_replace(output, "[tcUrl]", req->tcUrl);
|
||||
output = srs_string_replace(output, "[swfUrl]", req->swfUrl);
|
||||
output = srs_string_replace(output, "[pageUrl]", req->pageUrl);
|
||||
|
||||
output = srs_path_build_timestamp(output);
|
||||
|
||||
if (output.find("[url]") != string::npos) {
|
||||
string url = srs_generate_rtmp_url(req->host, req->port, req->host, req->vhost, req->app, req->stream, req->param);
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
#ifndef SRS_CORE_VERSION3_HPP
|
||||
#define SRS_CORE_VERSION3_HPP
|
||||
|
||||
#define SRS_VERSION3_REVISION 124
|
||||
#define SRS_VERSION3_REVISION 125
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue