Skip to content

Instantly share code, notes, and snippets.

@Manouchehri
Created November 8, 2021 22:41
Show Gist options
  • Save Manouchehri/0041032ba7e26d2ac5e0f3d07cd4ee37 to your computer and use it in GitHub Desktop.
Save Manouchehri/0041032ba7e26d2ac5e0f3d07cd4ee37 to your computer and use it in GitHub Desktop.
srs for DJI Fly app RTMP stream
# main config for srs.
# @see full.conf for detail config.
listen 1935;
max_connections 1000;
#srs_log_tank file;
#srs_log_file ./objs/srs.log;
daemon on;
http_api {
enabled on;
listen 1985;
}
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
rtc_server {
enabled on;
listen 8000;
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
candidate $CANDIDATE;
}
vhost __defaultVhost__ {
transcode {
enabled on;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine ff {
enabled on;
vcodec copy ;
# vcodec libx264 ;
# vprofile main;
# vpreset veryfast ;
# TODO: Figure out why having audio causes latency issues
acodec an ;
vthreads 12 ;
oformat flv ;
# oformat mpegts ;
# oformat mp4 ;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
# vcodec libx264 ;
# an ;
}
tcp_nodelay on;
min_latency on;
hls {
enabled on;
}
play {
gop_cache off;
queue_length 10;
# time_jitter off;
# mix_correct on;
# atc on;
# mw_msgs 0;
mw_latency 100;
}
publish {
mr off;
# mr_latency 350;
# normal_timeout 1000;
# firstpkt_timeout 1000;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
rtc {
enabled off;
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtmp-to-rtc
rtmp_to_rtc off;
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtc-to-rtmp
rtc_to_rtmp off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment