CESNET / UltraGrid

UltraGrid low-latency audio and video network transmission system
http://www.ultragrid.cz
Other
489 stars 55 forks source link

[Decklink display] audio buffer underflow! #280

Closed alatteri closed 1 year ago

alatteri commented 1 year ago

Hello and Happy New Year to everyone. With the latest UG I'm still getting the Decklink buffer problem. Not sure if there was a regression, but at one point not to long ago this did see to be fixed.

receiver: uv -d decklink:drift_fix --audio-delay 0 -r analog --audio-channel-map 0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7 --audio-scale none -P 5004 --param use-hw-accel,resampler=soxr,decoder-use-codec=R12L

UltraGrid 1.8+ (tags/continuous rev 10d5350 built Dec 30 2022 14:14:49)

[2022-12-30 17:02:46] SSRC 0x574fe77d: 1792/1792 packets received (100.0000%), 0 lost, max loss 0 [2022-12-30 17:02:46] SSRC 0x34aa7e86: 7040/7040 packets received (100.0000%), 0 lost, max loss 0 [2022-12-30 17:02:47] [Decklink display] 121 frames in 5.02066 seconds = 24.1004 FPS [2022-12-30 17:02:49] Decklink stats (cumulative) - Total Audio Frames Played: 10103 / Missing Audio Frames: 1731 / Buffer Underflows: 18 / Buffer Overflows: 130 / Resample (Higher Hz): 2029 / Resample (Lower Hz): 7820 / Average Buffer: 3192 / Average Added Frames: 1359.15 / Max time diff audio (ms): 56 / Min time diff audio (ms): 0 [2022-12-30 17:02:50] [Decklink display] audio buffer underflow! [2022-12-30 17:02:50] [Decklink display] audio buffer overflow! (2160 written, 5005 dropped, 0 buffer size) [2022-12-30 17:02:50] [Decklink display] audio buffer overflow! (271 written, 752 dropped, 5729 buffer size) [2022-12-30 17:02:50] [Decklink display] audio buffer overflow! (739 written, 284 dropped, 5261 buffer size) [2022-12-30 17:02:50] [Decklink display] audio buffer overflow! (903 written, 120 dropped, 5097 buffer size) [2022-12-30 17:02:51] [Audio decoder] Received 987456/987456 B, decoded 240510 samples in 5.02 sec. [2022-12-30 17:02:51] [Audio decoder] Volume: [0] -14.40/-0.40, [1] -14.35/-0.08, [2] -20.66/-0.23, [3] -24.12/-8.19, [4] -17.88/-1.09, [5] -18.14/-3.47, [6] -16.97/-1.84, [7] -16.87/-1.98 dBFS RMS/peak [2022-12-30 17:02:51] [Decklink display] audio buffer overflow! (2008 written, 39 dropped, 3992 buffer size) [2022-12-30 17:02:51] SSRC 0x574fe77d: 1920/1920 packets received (100.0000%), 0 lost, max loss 0 [2022-12-30 17:02:51] [Decklink display] audio buffer overflow! (1861 written, 185 dropped, 4139 buffer size) [2022-12-30 17:02:51] SSRC 0x34aa7e86: 5888/5888 packets received (100.0000%), 0 lost, max loss 0 [2022-12-30 17:02:52] [Decklink display] audio buffer overflow! (857 written, 167 dropped, 5143 buffer size) [2022-12-30 17:02:52] [Decklink display] audio buffer overflow! (2015 written, 31 dropped, 3986 buffer size) [2022-12-30 17:02:52] [Decklink display] 120 frames in 5.01058 seconds = 23.9493 FPS [2022-12-30 17:02:56] [Audio decoder] Received 903668/903668 B, decoded 241513 samples in 5.02 sec. [2022-12-30 17:02:56] [Audio decoder] Volume: [0] -17.09/-0.37, [1] -19.62/-1.88, [2] -24.55/-6.05, [3] -28.20/-12.42, [4] -25.85/-9.08, [5] -25.51/-7.94, [6] -19.77/-3.61, [7] -21.00/-3.98 dBFS RMS/peak

sender: uv -m 1316 -t decklink:device=0:codec=R12L --audio-filter delay:1:frames -c libavcodec:encoder=libx265:crf=20 -s embedded --audio-capture-format channels=8 --audio-codec=AAC:bitrate=256K -P 5004

alatteri commented 1 year ago

If I revert to commit e3cc4dc46e8ddc118d1a04da33bc5e349fcb7e3c from Nov. 1, the problem only happens very rarely. But at HEAD it is un-usable.

alatteri commented 1 year ago

Happy New Year.... I guess 2023 bring good luck.

In further testing today, I am unable to reproduce this. I did switch to a more powerful encoder. I had been trying to re-use some old gear, and although the encoder never reported "to slow", every now and then, it would get an "SDI lost signal", which I know is also an error message for when compressor can't keep up with signal from Decklink, as the SDI signal itself is solid.

Anyway, big thank you for everything UG team has done in 2022 and also to the SohoNet guys for contributing the DeckLink fix.