Wowza 4.7.1 nDVR MBR sync issue

Platform: Hp - DL380p Gen8 (12 LFF), 2x Intel Hexa-Core Xeon E5-2620, RAM: 32 GB, Hdd 5x500 Gbyte SSD in RAID 0

Network: 1 Gbit/sec

OS: Ubuntu 14.04 64bit

Java:

Java Garbage Collection Settings

Custom collector settings

-server -Xms20G -Xmx20G -XX:PermSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70

HLS streams

We are running Wowza 4.7.1 with nDVR (2 hours window). The platform includes Origin and Edge applications on the same server with 50 streams at about 800 kbits bitrate.

We want to deploy HLS ABR streaming, so we did it with one of the streams. We are using 2 bitrates.

800kBit/s and 1500kBit/s. The encoding is with ffmpeg on remote location ( the streams are pushed over internet with command:

*ffmpeg -y -re -timeout 2000 -i “udp://@:10001?pkt_size=1316&buffer_size=1000000&fifo_size=100000&overrun_nonfatal=1” -filter_complex ‘[0:v]crop=710:568:0:0,yadif=0:-1:0,hqdn3d=2,split=2[out1][out2],[0:a]volume=8dB,asplit=2[a1][a2]’ *

*-map ‘[out1]’ -s 1024x576 -init_hw_device qsv:hw -c:v h264_qsv -profile:v high -level 4.1 -preset veryfast -r 25 -g 50 -keyint_min 50 -sc_threshold 0 -threads 8 *

*-b_strategy 1 -refs 4 -bf 3 -look_ahead_downsampling off -look_ahead 1 -look_ahead_depth 100 -vb 1500k *

*-map ‘[a1]’ -strict -2 -c:a aac -ab 96k -ar 44100 -ac 2 -f tee “[f=fifo:fifo_format=flv:drop_pkts_on_overflow=1:attempt_recovery=1:recovery_wait_time=1]rtmp://server:443/liveorigin/n_ff_high.stream” *

*-map ‘[out2]’ -s 768x432 -c:v h264_qsv -profile:v high -level 4.1 -preset veryfast -r 25 -g 50 -keyint_min 50 -sc_threshold 0 -threads 8 *

*-b_strategy 1 -refs 4 -bf 3 -look_ahead_downsampling off -look_ahead 1 -look_ahead_depth 100 -vb 800k *

-map ‘[a2]’ -strict -2 -c:a aac -ab 96k -ar 44100 -ac 2 -f tee “[f=fifo:fifo_format=flv:drop_pkts_on_overflow=1:attempt_recovery=1:recovery_wait_time=1]rtmp://server:443/liveorigin/n_ff_mid.stream”

Everything is OK with live streaming without nDVR.But streaming with nDVR enabled, when load increases ( >100 users or more watching the nDVR stream ) sync issue appears when switching from one bitrate to the other. It starts with miliseconds and increases to several seconds. On the same time, switching without nDVR is OK. The only solution is to stop Wowza, delete nDVR directory and start Wowza again.