Ingest is used to ingest file(flv, mp4, mkv, avi, rmvb...), stream(RTMP, RTMPT, RTMPS, RTSP, HTTP, HLS...) and device, encode or passthrough then publish as RTMP to SRS.
Ingest actually use FFMEPG, or your tool, to encode or remux to suck known data to RTMP to SRS.
How to deploy ingest, read Ingest
The main use scenarios:
In a word, the Ingest is used to ingest any stream supported by FFMPEG to SRS.
SRS server is support encoder to publish stream, while ingest can enable SRS to act like a client to pull stream from other place.
Config SRS with option --with-ingest
, read Build
The ingest tool of SRS can use FFMPEG, or use your own tool.
The config to use ingest:
vhost your_vhost {
# ingest file/stream/device then push to SRS over RTMP.
# the name/id used to identify the ingest, must be unique in global.
# ingest id is used in reload or http api management.
ingest livestream {
# whether enabled ingest features
# default: off
enabled on;
# input file/stream/device
# @remark only support one input.
input {
# the type of input.
# can be file/stream/device, that is,
# file: ingest file specifies by url.
# stream: ingest stream specifeis by url.
# device: not support yet.
# default: file
type file;
# the url of file/stream.
url ./doc/source.200kbps.768x320.flv;
}
# the ffmpeg
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
# the transcode engine, @see all.transcode.srs.com
# @remark, the output is specified following.
engine {
# @see enabled of transcode engine.
# if disabled or vcodec/acodec not specified, use copy.
# default: off.
enabled off;
# output stream. variables:
# [vhost] current vhost which start the ingest.
# [port] system RTMP stream port.
output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;
}
}
}
The word after ingest keyword is the id of ingest, the id must be unique.
The type
specifies the ingest type:
-re
for FFMPEG.The engine
specifies the transcode engine and output:
Note: Engine is copy, when:
SRS does not ingest a file list, a wordaround:
Read https://github.com/ossrs/srs/issues/55
Winlin 2014.11
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。