Last active
January 7, 2023 03:24
-
-
Save johan149/674114c288d0f4e7499ebf225e0bec35 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listen 1935; | |
max_connections 1000; | |
daemon off; | |
srs_log_tank console; | |
http_api { | |
enabled on; | |
listen 1985; | |
} | |
http_server { | |
enabled on; | |
listen 8080; | |
dir ./objs/nginx/html; | |
} | |
srt_server { | |
enabled on; | |
listen 10080; | |
maxbw 1000000000; | |
connect_timeout 4000; | |
peerlatency 300; | |
recvlatency 300; | |
} | |
rtc_server { | |
enabled on; | |
listen 8000; # UDP port | |
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate | |
candidate $CANDIDATE; | |
} | |
vhost __defaultVhost__ { | |
tcp_nodelay on; | |
min_latency on; | |
play { | |
gop_cache off; | |
queue_length 10; | |
mw_latency 100; | |
} | |
publish { | |
mr off; | |
} | |
http_hooks { | |
enabled on; | |
on_publish https://fox16-graph-dev.meetmo.io/api/v1.6/meetmo/device/stream/webhook/; | |
on_unpublish https://fox16-graph-dev.meetmo.io/api/v1.6/meetmo/device/stream/webhook/; | |
on_play https://fox16-graph-dev.meetmo.io/api/v1.6/meetmo/device/stream/webhook/; | |
on_stop https://fox16-graph-dev.meetmo.io/api/v1.6/meetmo/device/stream/webhook/; | |
} | |
transcode { | |
enabled on; | |
ffmpeg ./objs/ffmpeg/bin/ffmpeg; | |
engine snapshot { | |
enabled on; | |
iformat flv; | |
vfilter { | |
vf fps=1; | |
} | |
vcodec png; | |
vparams { | |
vframes 6; | |
} | |
acodec an; | |
oformat image2; | |
output ./objs/nginx/html/[app]/[stream]-%03d.png; | |
} | |
} | |
ingest livestream { | |
enabled on; | |
input { | |
type file; | |
url ./doc/source.flv; | |
} | |
ffmpeg ./objs/ffmpeg/bin/ffmpeg; | |
engine { | |
enabled off; | |
output rtmp://127.0.0.1:[port]/live/livestream?vhost=[vhost]; | |
} | |
} | |
hls { | |
enabled on; | |
hls_path ./objs/nginx/html; | |
hls_fragment 0.2; | |
hls_window 2; | |
hls_wait_keyframe off; | |
} | |
http_remux { | |
enabled on; | |
mount [vhost]/[app]/[stream].ts; | |
} | |
srt { | |
enabled on; | |
srt_to_rtmp on; | |
} | |
dash { | |
enabled on; | |
dash_fragment 30; | |
dash_update_period 150; | |
dash_timeshift 300; | |
dash_path ./objs/nginx/html; | |
dash_mpd_file [app]/[stream].mpd; | |
} | |
rtc { | |
enabled on; | |
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc | |
rtmp_to_rtc on; | |
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp | |
rtc_to_rtmp on; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment