-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
v2_EN_FlvVodStream
I recomment:
- Vod stream should always use HTTP protocol, never use RTMP. SRS can dvr RTMP live stream to flv file, and provides some tools for vod stream, but user should use other HTTP server to delivery flv file as vod stream.
- In a word, SRS does not support vod, only support live.
The workflow of flv vod stream:
- SRS dvr live stream to flv file, or upload flv vod file, to the HTTP root dir:
objs/nginx/html
- HTTP server must support flv?start=offset, for example, flv module of nginx, or use experiment SRS HTTP server.
- Use
research/librtmp/srs_flv_injecter
inject the keyframe offset to metadata of flv. - Flash player play http flv url, for instance,
http://192.168.1.170:8080/sample.flv
- When user seek, for instance, seek to 300s.
- Player use the keyframe offset in metadata to calc the offset of 300s, for instance, 300s offset=
6638860
- Start new request, url is
http://192.168.1.170:8080/sample.flv?start=6638860
Note: SRS HTTP server is experiment, do not limit the bandwidth.
Note: SRS provides flv view tool research/librtmp/srs_flv_parser
, to list the seconds:offsets in metadata.
SRS supports http-api, so SRS can also parse HTTP protocol(partial HTTP right now), so SRS also implements a experiment HTTP server.
SRS HTTP server is rewrite, table and partial HTTP protocol support, ok for online service.
For some emebeded device, for instance, arm linux, user can use SRS HTTP server, for arm is not easy to build some server.
The config for http vod streaming:
# http static vhost specified config
http {
# whether enabled the http static service for vhost.
# default: off
enabled on;
# the url to mount to,
# typical mount to [vhost]/
# the variables:
# [vhost] current vhost for http server.
# @remark the [vhost] is optional, used to mount at specified vhost.
# @remark the http of __defaultVhost__ will override the http_stream section.
# for example:
# mount to [vhost]/
# access by http://ossrs.net/xxx.html
# mount to [vhost]/hls
# access by http://ossrs.net/hls/xxx.html
# mount to /
# access by http://ossrs.net/xxx.html
# or by http://192.168.1.173/xxx.html
# mount to /hls
# access by http://ossrs.net/hls/xxx.html
# or by http://192.168.1.173/hls/xxx.html
# default: [vhost]/
mount [vhost]/hls;
# main dir of vhost,
# to delivery HTTP stream of this vhost.
# default: ./objs/nginx/html
dir ./objs/nginx/html/hls;
}
Winlin 2015.1
Welcome to SRS wiki!
Please select your language:
Please select your language:
Please select your language:
Please select your language:
Please select your language: