periodic_fir_request=true
session.createStream({
name: streamName,
display: remoteVideo,
transport: "TCP"
...
}).play();
enable_extended_logging = false
client_acl_property_name = aclAuth
media_port_from= 10001
media_port_to = 50000
webrtc_cc_min_bitrate=3000000
webrtc_cc_max_bitrate=4000000
webrtc_sdp_min_bitrate_bps=3000000
webrtc_sdp_max_bitrate_bps=4000000
wcs_activity_timer_timeout=86400000
global_bandwidth_check_enabled=true
webrtc_aes_crypto_provider=JCE
rtp_receive_buffer_size=13107200
rtp_send_buffer_size =13107200
transcoding_disabled=true
streaming_video_decoder_fast_start = true
ice_tcp_transport = true
ice_tcp_send_buffer_size=1048576
ice_tcp_receive_buffer_size=1048576
ice_tcp_channel_high_water_mark=52428800
ice_tcp_channel_low_water_mark=5242880
ice_timeout=120
ice_tcp_nio=true
hls_preloader_enabled = true
hls_preloader_dir = /opt/custom_preloader
hls_preloader_time_min = 1000
inbound_video_rate_stat_send_interval = 1
outbound_video_rate_stat_send_interval = 1
periodic_fir_request = true
periodic_fir_request_interval = 2000
rtmp_out_buffer_enabled = true
rtmp_out_buffer_start_size = 1000
codecs = opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,h264,vp8,mpv
compact_media_port_usage = true
rtp_bundle = true
rtp_paced_sender = true
rtp_paced_sender_initial_rate = 200000
rtp_paced_sender_increase_interval = 50
rtp_paced_sender_k_up = 0.9
ws.port = 8080
wss.port = 8443
ws.map_custom_headers = true
ws.ip_forward_header = X-Forwarded-For
wcs_agent_ssl = true
rest_hook_secret_key = REMOVE_KEY
rest_hook_send_hash = true
https_server_enabled = true
hls_server_enabled = true
hls.http.port = 8082
hls_preloader_enabled = false
hls_min_list_size = 2
hls_auto_start = true
rtsp_server_enabled = false
cdn_enabled = true
cdn_ip = ORIGIN_IP_ADDR
cdn_role = origin
cdn_nodes_resolve_ip=false
cdn_groups = EU
opus_formats=stereo=1
disable_rest_auth = false
disable_streaming_proxy = false
client_acl_property_name = aclAuth
media_port_from= 10001
media_port_to = 50000
webrtc_cc_min_bitrate=5000
webrtc_cc_max_bitrate=10000
webrtc_sdp_min_bitrate_bps=5000
webrtc_sdp_max_bitrate_bps=10000
wcs_activity_timer_timeout=86400000
global_bandwidth_check_enabled=true
webrtc_aes_crypto_provider=JCE
rtp_receive_buffer_size=13107200
rtp_send_buffer_size =13107200
video_transcoder_preserve_aspect_ratio=false
streaming_video_decoder_fast_start = true
ice_tcp_transport = true
ice_tcp_send_buffer_size=1048576
ice_tcp_receive_buffer_size=1048576
ice_tcp_channel_high_water_mark=52428800
ice_tcp_channel_low_water_mark=5242880
ice_timeout=120
ice_tcp_nio=true
inbound_video_rate_stat_send_interval = 1
outbound_video_rate_stat_send_interval = 1
periodic_fir_request = true
periodic_fir_request_interval = 2000
rtmp_out_buffer_enabled = true
rtmp_out_buffer_start_size = 1000
codecs = opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,h264,vp8,mpv
compact_media_port_usage = true
transcoding_disabled = false
video_encoder_max_threads = 120
video_encoder_second_thread_threshold=777000
rtp_bundle = true
rtp_paced_sender = true
rtp_paced_sender_initial_rate = 200000
rtp_paced_sender_increase_interval = 50
rtp_paced_sender_k_up = 0.9
ws.port = 8080
wss.port = 8443
ws.map_custom_headers = true
ws.ip_forward_header = X-Forwarded-For
wcs_agent_ssl = true
rest_hook_secret_key = REMOVE_KEY
rest_hook_send_hash = true
https_server_enabled = true
hls_server_enabled = true
hls.http.port = 8082
hls_preloader_enabled = false
hls_min_list_size = 2
hls_auto_start = true
rtsp_server_enabled = false
cdn_enabled = true
cdn_ip = TRANSCODER_IP_ADDR
cdn_role = transcoder
cdn_nodes_resolve_ip=false
cdn_groups = EU
cdn_point_of_entry= ORIGIN_IP_ADDR
opus_formats=stereo=1
disable_rest_auth = false
disable_streaming_proxy = false
enable_extended_logging = false
client_acl_property_name = aclAuth
media_port_from= 10001
media_port_to = 50000
webrtc_cc_min_bitrate=3000000
webrtc_cc_max_bitrate=4000000
webrtc_sdp_min_bitrate_bps=3000000
webrtc_sdp_max_bitrate_bps=4000000
wcs_activity_timer_timeout=86400000
global_bandwidth_check_enabled=true
webrtc_aes_crypto_provider=JCE
rtp_receive_buffer_size=13107200
rtp_send_buffer_size =13107200
ice_tcp_transport = true
ice_tcp_send_buffer_size=1048576
ice_tcp_receive_buffer_size=1048576
ice_tcp_channel_high_water_mark=52428800
ice_tcp_channel_low_water_mark=5242880
ice_timeout=120
ice_tcp_nio=true
periodic_fir_request = true
periodic_fir_request_interval = 2000
rtmp_out_buffer_enabled = true
rtmp_use_stream_params_as_connection=true
rtmp_out_buffer_start_size = 1000
codecs = opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,h264,vp8,mpv
compact_media_port_usage = true
rtp_bundle = true
rtp_paced_sender = true
rtp_paced_sender_initial_rate = 200000
rtp_paced_sender_increase_interval = 50
rtp_paced_sender_k_up = 0.9
ws.port = 8080
wss.port = 8443
ws.map_custom_headers = true
ws.ip_forward_header = X-Forwarded-For
wcs_agent_ssl = true
rest_hook_secret_key = REMOVE_KEY
rest_hook_send_hash = true
https_server_enabled = true
hls_server_enabled = true
hls.http.port = 8082
hls_preloader_enabled = false
hls_min_list_size = 2
hls_auto_start = true
hls_player_width=0
hls_player_height=0
rtsp_server_enabled = false
cdn_enabled = true
cdn_ip = EDGE_IP_ADDR
cdn_role = edge
cdn_nodes_resolve_ip=false
cdn_point_of_entry = ORIGIN_IP_ADDR
cdn_groups = EU
cdn_origin_allowed_to_transcode=false
opus_formats=stereo=1
disable_rest_auth = false
disable_streaming_proxy = false
profiles:
-720p:
audio:
codec : opus
rate : 48000
video:
width : 1280
height : 720
bitrate : 3000
gop : 90
fps : 30
codec : h264
-Xmx100g # в Зависимости от доступного ОЗУ от 100 Гб до 200Гб
-Xms100g # в Зависимости от доступного ОЗУ от 100 Гб до 200Гб
-XX:+UnlockDiagnosticVMOptions
-XX:+UseAES
-XX:+UseAESIntrinsics
------------------------------------------------------------
[ 3] local IP_ADDR_ORIGIN port 56784 connected with IP_ADDR_TRANSCODER port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.06 GBytes 908 Mbits/sec
Данная настройка должна быть установлена на том сервере, куда публикуются входящие WebRTC потоки, т.е. на Origin сервере. На остальных серверах ее выставлять не нужно.1. periodic_fir_request - должен быть установлен на origin, edge или transcoder'e?
По конфигурации видим несколько проблем:2. Кроме того, мы видим повышенную нагрузку на origin сервер, возможно у нас проблема в конфигурации?
hls_auto_start = true
ice_tcp_nio=false
compact_media_port_usage
лучше оставить по умолчанию.rtp_paced_sender
. Вместо этого используйте многопоточную доставку стримов подписчикам:streaming_distributor_subgroup_enabled=true
streaming_distributor_subgroup_size=50
streaming_distributor_subgroup_queue_size=300
streaming_distributor_subgroup_queue_max_waiting_time=5000
streaming_distributor_audio_subgroup_queue_size=300
streaming_distributor_audio_subgroup_queue_max_waiting_time=5000
video_encoder_max_threads
, поскольку с Вашими настройками на каждый кодируемый стрим выделяется 120 процессорных потоков. По нашему опыту, 4 процессорных потоков достаточно для кодирования 1080pvideo_filter_enable_fps=true
video_filter_fps=30