CESNET / UltraGrid

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

[Decklink display] audio buffer underflow! #222

Closed alatteri closed 1 year ago

alatteri commented 2 years ago

Hello,

Using 1.7.3 app image I am getting lots of[Decklink display] audio buffer underflow! on the receiver. Any settings that would affect that?

Thanks.

MartinPulec commented 2 years ago

Do you have some more info about that? Terminal output, steps to reproduce, if you think it is a regression, then since which version? I've make a quick test with -t testcard -s testcard and everything looks ok in my setup.

Thanks, M

alatteri commented 2 years ago

Hi,

I'm using this command on receiver uv -d decklink -r analog -P 5004 --param decoder-use-codec R10k,use-hw-accel

This is the log output.

[2022-04-02 17:44:54] [Audio decoder] Volume: -18.61/-4.91 -19.50/-5.42 -24.71/-6.76 -32.82/-18.19 -22.20/-10.11 -23.22/-9.78 -18.92/-7.07 -19.89/-7.61 dBFS RMS/peak
[2022-04-02 17:44:56] SSRC 3fcc6a2a: 10240/10240 packets received (100%), 0 lost, max loss 0.
[2022-04-02 17:44:56] SSRC 73caaa43: 1920/1920 packets received (100%), 0 lost, max loss 0.
[2022-04-02 17:44:58] [Decklink display] 144 frames in 6.00755 seconds = 23.9699 FPS
[2022-04-02 17:44:59] [Audio decoder] Received 826479/826479 B, decoded 240640 samples in 5.01 sec.
[2022-04-02 17:44:59] [Audio decoder] Volume: -17.57/-1.11 -17.63/-1.39 -22.05/-1.14 -27.95/-6.82 -20.40/-7.98 -20.76/-8.14 -18.55/-3.28 -18.63/-4.56 dBFS RMS/peak
[2022-04-02 17:45:01] SSRC 73caaa43: 1920/1920 packets received (100%), 0 lost, max loss 0.
[2022-04-02 17:45:01] SSRC 3fcc6a2a: 10880/10880 packets received (100%), 0 lost, max loss 0.
[2022-04-02 17:45:01] [Decklink display] audio buffer underflow!
[2022-04-02 17:45:03] [Decklink display] audio buffer underflow!
[2022-04-02 17:45:04] [Decklink display] 144 frames in 6.00069 seconds = 23.9972 FPS
[2022-04-02 17:45:04] [Audio decoder] Received 850537/850537 B, decoded 239616 samples in 5.00 sec.
[2022-04-02 17:45:04] [Audio decoder] Volume: -17.68/-2.86 -18.46/-2.85 -29.18/-13.93 -22.56/-4.92 -19.23/-6.86 -20.22/-7.14 -18.68/-5.85 -19.41/-5.96 dBFS RMS/peak
[2022-04-02 17:45:06] SSRC 73caaa43: 1792/1792 packets received (100%), 0 lost, max loss 0.
[2022-04-02 17:45:06] SSRC 3fcc6a2a: 10112/10112 packets received (100%), 0 lost, max loss 0.
[2022-04-02 17:45:07] [Decklink display] audio buffer underflow!
[2022-04-02 17:45:09] [Audio decoder] Received 860426/860426 B, decoded 240640 samples in 5.01 sec.
[2022-04-02 17:45:09] [Audio decoder] Volume: -22.64/-4.11 -23.81/-6.01 -25.49/-3.98 -27.78/-11.43 -24.47/-9.00 -25.20/-10.47 -20.82/-5.60 -21.62/-6.63 dBFS RMS/peak
[2022-04-02 17:45:10] [Decklink display] 148 frames in 6.02337 seconds = 24.5709 FPS
[2022-04-02 17:45:10] SSRC 3fcc6a2a: 15616/15616 packets received (100%), 0 lost, max loss 0.
[2022-04-02 17:45:11] SSRC 73caaa43: 1920/1920 packets received (100%), 0 lost, max loss 0.
[2022-04-02 17:45:14] [Audio decoder] Received 869780/869780 B, decoded 243712 samples in 5.01 sec.
[2022-04-02 17:45:14] [Audio decoder] Volume: -22.28/-7.06 -23.52/-8.17 -22.46/-4.48 -29.06/-12.84 -21.01/-6.05 -22.91/-9.54 -19.94/-6.21 -20.92/-7.40 dBFS RMS/peak
[2022-04-02 17:45:15] Audio dec stats (cumulative): 1453 played / 1457 total audio frames
[2022-04-02 17:45:15] Video dec stats (cumulative): 705 total / 705 disp / 0 drop / 1 corr / 0 missing.
[2022-04-02 17:45:15] SSRC 3fcc6a2a: 15744/15744 packets received (100%), 0 lost, max loss 0.

I do feel this is a regression, until recently it was awhile since I updated to a newer version of UG, so I don't have a good timeframe of when. I have seen in the commit logs lots of DeckLink audio stuff. This used to be very reliable.

These are my encoder settings: uv -m 1316 -t decklink:codec=R10k --audio-filter delay:5:frames -c libavcodec:encoder=libx265:x265-params=intra-refresh=1\:keyint=24\:frame-threads=5:bitrate=30M -s embedded --audio-capture-format channels=8 --audio-codec=AAC:bitrate=192K --param use-hw-accel -P 5004

and the encoder logs from the same time period.

[2022-04-02 17:44:40] Created new RTP session with SSRC 0x73caaa43.
[2022-04-02 17:44:40] [lavcd aud.] Using audio encoder: aac
[2022-04-02 17:44:40] Using device DeckLink 4K Pro
[2022-04-02 17:44:40] [DeckLink capture] Setting single link by default.
[2022-04-02 17:44:40] The desired display mode is supported: 1080p23.98
[2022-04-02 17:44:40] [DeckLink] Trying to autodetect format.
[2022-04-02 17:44:40] [DeckLink capture] EnableAudioInput: Decklink audio capture initialized sucessfully: 8 channels, 4 Bps, 48000 Hz, codec: PCM
[2022-04-02 17:44:40] [key control] Stdin is not a TTY - disabling keyboard control.
[2022-04-02 17:44:40] Created new RTP session with SSRC 0x3fcc6a2a.
[2022-04-02 17:44:40] Frame received (#0) - No input signal detected
[2022-04-02 17:44:40] [Decklink capture] Format change detected (display mode, color space).
[2022-04-02 17:44:40] [Decklink capture] Using codec: R10k
[2022-04-02 17:44:40] [lavcd aud.] Using audio encoder: aac
[2022-04-02 17:44:40] [lavcd aud.] Using audio encoder: aac
[2022-04-02 17:44:40] [lavcd aud.] Using audio encoder: aac
[2022-04-02 17:44:40] [lavcd aud.] Using audio encoder: aac
[2022-04-02 17:44:40] [lavcd aud.] Using audio encoder: aac
[2022-04-02 17:44:40] [lavcd aud.] Using audio encoder: aac
[2022-04-02 17:44:40] [lavcd aud.] Using audio encoder: aac
[2022-04-02 17:44:40] [Decklink capture] Format change detected (color space).
[2022-04-02 17:44:40] [lavc] Using codec: H.265, encoder: libx265
[2022-04-02 17:44:40] [lavc] Setting bitrate to 30000000 bps.
[2022-04-02 17:44:40] [lavc] Warning: Codec doesn't support slice-based multithreading.
[2022-04-02 17:44:40] [lavc] Setting preset to ultrafast.
[2022-04-02 17:44:40] x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
[2022-04-02 17:44:40] x265 [info]: build info [Linux][GCC 9.3.0][64 bit] 10bit
[2022-04-02 17:44:40] x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[2022-04-02 17:44:40] x265 [warning]: halving the quality when psy-rd is enabled for 444 input. Setting cbQpOffset = 6 and crQpOffset = 6
[2022-04-02 17:44:40] x265 [warning]: Open Gop disabled, Intra Refresh is not compatible with openGop
[2022-04-02 17:44:40] x265 [warning]: Scenecut is disabled when Intra Refresh is enabled
[2022-04-02 17:44:40] x265 [warning]: Keyint value is very low.It leads to frequent intra refreshes, can be almost every frame.Prefered use case would be high keyint value or an API call to refresh when necessary
[2022-04-02 17:44:40] x265 [info]: Main 4:4:4 10 profile, Level-4 (High tier)
[2022-04-02 17:44:40] x265 [info]: Thread pool created using 32 threads
[2022-04-02 17:44:40] x265 [info]: Slices                              : 1
[2022-04-02 17:44:40] x265 [info]: frame threads / pool features       : 5 / wpp(34 rows)
[2022-04-02 17:44:40] x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
[2022-04-02 17:44:40] x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
[2022-04-02 17:44:40] x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
[2022-04-02 17:44:40] x265 [info]: Cb/Cr QP Offset                     : 6 / 6
[2022-04-02 17:44:40] x265 [info]: Lookahead / bframes / badapt        : 0 / 0 / 0
[2022-04-02 17:44:40] x265 [info]: b-pyramid / weightp / weightb       : 0 / 0 / 0
[2022-04-02 17:44:40] x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
[2022-04-02 17:44:40] x265 [info]: Rate Control / qCompress            : ABR-30000 kbps / 0.50
[2022-04-02 17:44:40] x265 [info]: VBV/HRD buffer / max-rate / init    : 10010 / 30000 / 0.750
[2022-04-02 17:44:40] x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip mode=1 tmvp fast-intra
[2022-04-02 17:44:40] x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
[2022-04-02 17:44:40] [lavc] Selected pixfmt: gbrp10le
[2022-04-02 17:44:40] [lavc] Selected pixfmt has not 4:2:0 subsampling, which is usually not supported by hw. decoders
[2022-04-02 17:44:45] [Decklink capture] 116 frames in 5.0096 seconds = 23.1555 FPS
[2022-04-02 17:44:45] [Audio sender] Sent 234234 samples in last 5.022340 seconds.
[2022-04-02 17:44:45] [Audio sender] Volume: -23.00/-8.98 -23.10/-8.78 -27.26/-7.79 -38.68/-22.26 -25.11/-10.50 -25.08/-11.24 -21.90/-9.07 -21.65/-8.15 dBFS RMS/peak
[2022-04-02 17:44:50] [Decklink capture] 120 frames in 5.00496 seconds = 23.9762 FPS
[2022-04-02 17:44:50] [Audio sender] Sent 240240 samples in last 5.005119 seconds.
[2022-04-02 17:44:50] [Audio sender] Volume: -27.02/-11.82 -28.78/-14.59 -24.39/-6.84 -61.60/-41.09 -28.19/-13.03 -29.66/-14.86 -22.80/-9.32 -23.77/-9.08 dBFS RMS/peak
[2022-04-02 17:44:55] [Decklink capture] 120 frames in 5.00489 seconds = 23.9765 FPS
[2022-04-02 17:44:55] [Audio sender] Sent 240240 samples in last 5.004597 seconds.
[2022-04-02 17:44:55] [Audio sender] Volume: -17.61/-4.90 -18.15/-5.42 -21.70/-0.27 -31.02/-18.17 -21.65/-10.10 -22.91/-9.77 -18.39/-3.97 -19.06/-6.47 dBFS RMS/peak
[2022-04-02 17:45:00] [Decklink capture] 120 frames in 5.00498 seconds = 23.9761 FPS
[2022-04-02 17:45:00] [Audio sender] Sent 240240 samples in last 5.005232 seconds.
[2022-04-02 17:45:00] [Audio sender] Volume: -16.34/-1.02 -16.64/-1.32 -24.88/-7.56 -22.39/-4.89 -18.88/-6.88 -19.29/-7.12 -18.13/-3.25 -18.19/-4.54 dBFS RMS/peak
[2022-04-02 17:45:05] [Decklink capture] 120 frames in 5.00485 seconds = 23.9767 FPS
[2022-04-02 17:45:05] [Audio sender] Sent 240240 samples in last 5.004686 seconds.
[2022-04-02 17:45:05] [Audio sender] Volume: -21.84/-5.97 -22.83/-8.46 -26.87/-7.21 -29.35/-12.87 -21.85/-6.88 -22.61/-8.86 -20.45/-6.27 -21.21/-8.48 dBFS RMS/peak
[2022-04-02 17:45:10] [Decklink capture] 120 frames in 5.00499 seconds = 23.9761 FPS
[2022-04-02 17:45:10] [Audio sender] Sent 240240 samples in last 5.005082 seconds.
[2022-04-02 17:45:10] [Audio sender] Volume: -22.26/-4.11 -23.38/-5.99 -25.27/-3.96 -27.75/-11.45 -23.35/-6.05 -24.27/-10.07 -20.35/-5.61 -21.15/-6.62 dBFS RMS/peak
[2022-04-02 17:45:15] [Decklink capture] 120 frames in 5.00492 seconds = 23.9764 FPS
[2022-04-02 17:45:15] [Audio sender] Sent 240240 samples in last 5.004897 seconds.
[2022-04-02 17:45:15] [Audio sender] Volume: -19.39/-3.76 -20.01/-1.52 -23.39/-4.47 -22.84/-6.43 -19.90/-6.10 -21.41/-7.46 -19.09/-4.44 -19.78/-3.51 dBFS RMS/peak
[2022-04-02 17:45:20] [Decklink capture] 120 frames in 5.005 seconds = 23.976 FPS
[2022-04-02 17:45:20] [Audio sender] Sent 240240 samples in last 5.005211 seconds.
[2022-04-02 17:45:20] [Audio sender] Volume: -15.56/-0.43 -16.42/-0.42 -19.91/-4.56 -17.46/-0.91 -19.03/-1.06 -20.53/-4.71 -17.57/-1.21 -18.40/-2.62 dBFS RMS/peak
[2022-04-02 17:45:25] [Decklink capture] 120 frames in 5.00488 seconds = 23.9766 FPS
[2022-04-02 17:45:25] [Audio sender] Sent 240240 samples in last 5.004789 seconds.
[2022-04-02 17:45:25] [Audio sender] Volume: -14.62/-0.42 -14.46/-0.42 -20.66/-0.47 -24.20/-8.18 -18.42/-2.32 -18.44/-3.34 -17.27/-1.80 -16.98/-1.97 dBFS RMS/peak
[2022-04-02 17:45:30] [Decklink capture] 120 frames in 5.00495 seconds = 23.9763 FPS
[2022-04-02 17:45:30] [Audio sender] Sent 240240 samples in last 5.005177 seconds.
alatteri commented 2 years ago

I'm thinking this issue is not just limited to decklink. I am also getting drop-outs with ASLA output. Sometimes the audio just cuts out for a moment. Totally randomly. No errors in logs, and it is not packet loss.

alatteri commented 2 years ago

Hi guys,

If you could have a look at the included --verbose=7 logs for both receiver and encoder.

[2022-04-07 19:48:12] [hevc @ 0x7f7d50019700] Decoded frame with POC 5499.
[2022-04-07 19:48:12] [1649386092.733] [lavd] Decompressing P frame took 0.007832 sec, pixfmt change 0.001584 s.
[2022-04-07 19:48:12] [1649386092.733] [video dec.] Decompress duration: 9.44267 ms
[2022-04-07 19:48:12] [1649386092.733] [Decklink display] DeckLinkFrame QueryInterface E232A5B7-4DB4-44C9-9152-F47C12E5F051
[2022-04-07 19:48:12] [1649386092.733] [Decklink display] DeckLinkFrame QueryInterface D5973DC9-6432-46D0-8F0B-2496F8A1238F
[2022-04-07 19:48:12] [1649386092.740] [Decklink display] audio buffer underflow!
[2022-04-07 19:48:12] [1649386092.740] [Decklink display] putf audio - lasted 0.069 ms.
[2022-04-07 19:48:12] [1649386092.745] [Decklink display] putf - 0 frames buffered, lasted 13 ms.
[2022-04-07 19:48:12] [1649386092.752] [Decklink display] putf audio - lasted 0.061 ms.
[2022-04-07 19:48:12] [hevc @ 0x7f7d50019700] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[2022-04-07 19:48:12] [hevc @ 0x7f7d50019700] Output frame with POC 5500.
[2022-04-07 19:48:12] [1649386092.763] [Decklink display] putf audio - lasted 0.06 ms.
[2022-04-07 19:48:12] [hevc @ 0x7f7d50019700] Decoded frame with POC 5500.
[2022-04-07 19:48:12] [1649386092.767] [lavd] Decompressing P frame took 0.006570 sec, pixfmt change 0.001608 s.
[2022-04-07 19:48:12] [1649386092.767] [video dec.] Decompress duration: 8.20171 ms
[2022-04-07 19:48:12] [1649386092.767] [Decklink display] DeckLinkFrame QueryInterface E232A5B7-4DB4-44C9-9152-F47C12E5F051
[2022-04-07 19:48:12] [1649386092.767] [Decklink display] DeckLinkFrame QueryInterface D5973DC9-6432-46D0-8F0B-

encoder.log receiver.log

benroeder commented 2 years ago

@alatteri @MartinPulec this is related to the #213 issue, we have a fix for this that is coming in the next few days, that solves this

alatteri commented 2 years ago

@benroeder Thanks.... Do you know when this started? It seems fairly new within the past 6 months. I didn't see this issues in some of my older use cases.

benroeder commented 2 years ago

It has always been there, basically it is the two clocks problem ( clock skew), so you eventually run out of or over run the audio buffer on the decklink card, at the receive end. Even a test locally will fail eventually as the testcard uses the system clock and the playout is clocked by the decklink card. The print statement is newer I think for the case where it is happening. We have a complete fix for this, as have been chasing it for about 5 months :-) @alatteri

alatteri commented 2 years ago

@benroeder Thanks for the info... wonder why it is now more present then before. I don't recall any full drop outs with older versions <1.7. I do remember some audio drift if the stream was active for a long time. Good to know it is on the playout side.... Maybe I will just try downgrading that for now until your fix comes in.

benroeder commented 2 years ago

@alatteri I know it was, but it did get worse. I saw it happen and wrote it off to packet loss. which version of the decklink drivers are you using ? As you should upgrade to 12.2.2 as there were some clock issues they have fixed.

alatteri commented 2 years ago

Yup, on that driver version.

As you should upgrade to 12.2.2 as there were some clock issues they have fixed.

benroeder commented 2 years ago

It's timing related and blackmagic have made some clock changes (no idea what they did ) which could have made it worse not sure why it is worse though, or even if it is worse

alatteri commented 2 years ago

It has always been there

I recompiled a variety of commits going back to August, and yes the problem has always been there, but it seems worse the more recent the commit.

Eager to see that fix come in.

MartinPulec commented 2 years ago

As Ben noted - the point is that the underrun detection is new. If the clock was drifting, the difference is only that the message is printed, not in actual behavior/audio handling.

alatteri commented 2 years ago

Hi Martin... So the fix that Ben has does not actually fix the audio drop outs? I'm confused.

benroeder commented 2 years ago

@alatteri the new version will fix underflows ( as long as the packets arrive ) and overflows, we are just working on the stability. Basically you have to resample the audio to keep the buffer at the "correct fill" level, as the clocks are drifting against each other.

alatteri commented 2 years ago

Sorry....the original comment here was for a different issue.

alatteri commented 1 year ago

Hi everyone... still getting this even after the merge.

`uv -d decklink drift_fix --audio-delay 1050 -r analog -P 5004 --param use-hw-accel,resampler=soxr

[2022-11-05 18:09:13] [Decklink display] 121 frames in 5.02848 seconds = 24.0629 FPS
[2022-11-05 18:09:15] Decklink stats (cumulative) - Total Audio Frames Played: 17384 / Missing Audio Frames: 2798 / Buffer Underflows: 54 / Buffer Overflows: 242 / Resample (Higher Hz): 5073 / Resample (Lower Hz): 11937 / Average Buffer: 2650 / Average Added Frames: 1216.5 / Max time diff audio (ms): 57 / Min time diff audio (ms): 1
[2022-11-05 18:09:15] SSRC 0x1e683b64: 1920/1920 packets received (100.0000%), 0 lost, max loss 0
[2022-11-05 18:09:16] SSRC 0x6b20acd9: 19712/19712 packets received (100.0000%), 0 lost, max loss 0, reordered 1 pkts (max dist 6)
[2022-11-05 18:09:16] [Audio decoder] Received 698185/698185 B, decoded 242688 samples in 5.03 sec.
[2022-11-05 18:09:16] [Audio decoder] Volume: -22.59/-5.37 -23.18/-6.66 -26.50/-5.64 -55.77/-41.28 -24.74/-5.37 -26.04/-6.93 -22.28/-2.93 -23.41/-4.42 dBFS RMS/peak
[2022-11-05 18:09:18] [Decklink display] 120 frames in 5.00469 seconds = 23.9775 FPS
[2022-11-05 18:09:19] Audio dec stats (cumulative): 4290 played / 4290 total audio frames
[2022-11-05 18:09:20] Video dec stats (cumulative): 2228 total / 2192 disp / 36 drop / 3 corr / 0 missing.
[2022-11-05 18:09:20] SSRC 0x1e683b64: 1920/1920 packets received (100.0000%), 0 lost, max loss 0
[2022-11-05 18:09:21] SSRC 0x6b20acd9: 24192/24192 packets received (100.0000%), 0 lost, max loss 0
[2022-11-05 18:09:21] [Audio decoder] Received 730612/730612 B, decoded 239610 samples in 5.01 sec.
[2022-11-05 18:09:21] [Audio decoder] Volume: -19.18/-5.59 -19.04/-5.82 -24.79/-8.58 -32.64/-17.01 -21.66/-5.75 -21.51/-6.45 -18.07/-3.59 -18.09/-3.93 dBFS RMS/peak
[2022-11-05 18:09:23] [Decklink display] 120 frames in 5.0572 seconds = 23.7285 FPS
[2022-11-05 18:09:24] [Decklink display] audio buffer underflow!
[2022-11-05 18:09:24] [Decklink display] audio buffer overflow! (546 written, 478 dropped, 5453 buffer size)
[2022-11-05 18:09:24] [Decklink display] audio buffer overflow! (920 written, 1128 dropped, 5081 buffer size)
[2022-11-05 18:09:24] [Decklink display] audio buffer overflow! (669 written, 2403 dropped, 5332 buffer size)
[2022-11-05 18:09:25] [Decklink display] audio buffer overflow! (803 written, 221 dropped, 5198 buffer size)
[2022-11-05 18:09:25] SSRC 0x1e683b64: 1920/1920 packets received (100.0000%), 0 lost, max loss 0
[2022-11-05 18:09:26] SSRC 0x6b20acd9: 28693/28800 packets received (99.6285%), 107 lost, max loss 50
[2022-11-05 18:09:26] Decklink stats (cumulative) - Total Audio Frames Played: 17810 / Missing Audio Frames: 2888 / Buffer Underflows: 55 / Buffer Overflows: 246 / Resample (Higher Hz): 5125 / Resample (Lower Hz): 12310 / Average Buffer: 3073 / Average Added Frames: 1269.67 / Max time diff audio (ms): 122 / Min time diff audio (ms): 0
[2022-11-05 18:09:26] [Audio decoder] Received 722773/722773 B, decoded 240619 samples in 5.00 sec.
[2022-11-05 18:09:26] [Audio decoder] Volume: -24.75/-10.24 -23.31/-9.25 -25.07/-8.28 -57.90/-36.71 -32.61/-20.46 -30.25/-18.46 -31.08/-17.28 -28.60/-17.10 dBFS RMS/peak
[2022-11-05 18:09:26] [Decklink display] audio buffer overflow! (1804 written, 243 dropped, 4196 buffer size)
[2022-11-05 18:09:27] [Decklink display] audio buffer overflow! (1706 written, 341 dropped, 4294 buffer size)
[2022-11-05 18:09:29] [Decklink display] 121 frames in 5.03926 seconds = 24.0115 FPS
[2022-11-05 18:09:30] SSRC 0x1e683b64: 1792/1792 packets received (100.0000%), 0 lost, max loss 0
[2022-11-05 18:09:31] SSRC 0x6b20acd9: 20864/20864 packets received (100.0000%), 0 lost, max loss 0
[2022-11-05 18:09:31] [Audio decoder] Received 725849/725849 B, decoded 240498 samples in 5.01 sec.
[2022-11-05 18:09:31] [Audio decoder] Volume: -22.81/-6.98 -22.37/-6.41 -25.85/-8.26 -33.63/-18.14 -30.88/-15.45 -29.64/-16.01 -22.37/-7.28 -22.47/-7.53 dBFS RMS/peak
[2022-11-05 18:09:34] [Decklink display] 120 frames in 5.00334 seconds = 23.984 FPS
[2022-11-05 18:09:35] SSRC 0x1e683b64: 1920/1920 packets received (100.0000%), 0 lost, max loss 0
[2022-11-05 18:09:36] SSRC 0x6b20acd9: 18688/18688 packets received (100.0000%), 0 lost, max loss 0
[2022-11-05 18:09:36] [Audio decoder] Received 775008/775008 B, decoded 239466 samples in 5.01 sec.
[2022-11-05 18:09:36] [Audio decoder] Volume: -22.05/-9.13 -21.81/-8.13 -27.28/-7.81 -40.47/-22.28 -25.24/-10.51 -25.22/-11.24 -23.44/-8.98 -23.46/-8.90 dBFS RMS/peak
[2022-11-05 18:09:37] Decklink stats (cumulative) - Total Audio Frames Played: 18238 / Missing Audio Frames: 2987 / Buffer Underflows: 55 / Buffer Overflows: 248 / Resample (Higher Hz): 5125 / Resample (Lower Hz): 12738 / Average Buffer: 3311 / Average Added Frames: 1248.5 / Max time diff audio (ms): 66 / Min time diff audio (ms): 0
[2022-11-05 18:09:39] [Decklink display] 120 frames in 5.00466 seconds = 23.9777 FPS
[2022-11-05 18:09:41] SSRC 0x1e683b64: 1920/1920 packets received (100.0000%), 0 lost, max loss 0
[2022-11-05 18:09:41] SSRC 0x6b20acd9: 19584/19584 packets received (100.0000%), 0 lost, max loss 0, reordered 11 pkts (max dist 11
MartinPulec commented 1 year ago

Does it occur also if you omit --audio-delay 1050 parameter? Also does it happen all the time or only at the beginning? I've tried your command it and indeed I got very similar pattern at the beginning. But this is quite expectable if you give it audio 1 second deficit at the very beginning. Even so the resampler seems to stabilize itself after few seconds. I didn't test without an actual clock drift, however.

alatteri commented 1 year ago

I'm going to close this. If the issue appear again, I'll start a new case.