Audio 40ms forerunning on passthrough

No, he mutes the audio on layer 10 and make it invisible on layer 11 but let the audio be played there, so that the PLAY 1-11 ROUTE 1-10 command does the audio delay.

Ah, now I get it.
Interesting approach.
Going to try that tomorrow.

Thanks!

Ingo

Hello again,

I tried to get Julusians solution working but get an error message from the server. Video is visible but audio is muted.

Here’s what the server says in debug level:

[2021-06-15 09:33:55.698] [10800] [info] Received message from 172.30.84.51: LOADBG 1-5 DECKLINK 1 FORMAT 1080i50 MIX 12 CHANNEL_LAYOUT 16ch\r\n
[2021-06-15 09:33:55.698] [5364] [debug] Executing command: LOADBG
[2021-06-15 09:33:55.719] [2484] [debug] [ffmpeg] [Parsed_abuffer_0 @ 000001D63C5D3EC0] tb:1/48000 samplefmt:s32 samplerate:48000 chlayout:0x18003f737
[2021-06-15 09:33:55.719] [2484] [debug]
[2021-06-15 09:33:55.719] [2484] [debug]
[2021-06-15 09:33:55.719] [2484] [debug] +------------------+
[2021-06-15 09:33:55.719] [2484] [debug] | Parsed_abuffer_0 |default--[48000Hz s32:hexadecagonal]--Parsed_anull_1:default
[2021-06-15 09:33:55.719] [2484] [debug] | (abuffer) |
[2021-06-15 09:33:55.719] [2484] [debug] +------------------+
[2021-06-15 09:33:55.719] [2484] [debug]
[2021-06-15 09:33:55.719] [2484] [debug] +----------------+
[2021-06-15 09:33:55.719] [2484] [debug] Parsed_abuffer_0:default--[48000Hz s32:hexadecagonal]--default| Parsed_anull_1 |default--[48000Hz s32:hexadecagonal]--Parsed_abuffersink_2:default
[2021-06-15 09:33:55.719] [2484] [debug] | (anull) |
[2021-06-15 09:33:55.719] [2484] [debug] +----------------+
[2021-06-15 09:33:55.719] [2484] [debug]
[2021-06-15 09:33:55.719] [2484] [debug] +----------------------+
[2021-06-15 09:33:55.719] [2484] [debug] Parsed_anull_1:default--[48000Hz s32:hexadecagonal]--default| Parsed_abuffersink_2 |
[2021-06-15 09:33:55.719] [2484] [debug] | (abuffersink) |
[2021-06-15 09:33:55.719] [2484] [debug] +----------------------+
[2021-06-15 09:33:55.719] [2484] [debug]
[2021-06-15 09:33:55.719] [2484] [debug]
[2021-06-15 09:33:55.800] [7516] [debug] [ffmpeg] [filter_buffer @ 000001D62D543C00] w:1920 h:1080 pixfmt:uyvy422 tb:1/25 fr:25/1 sar:0/1 sws_param:
[2021-06-15 09:33:55.800] [7516] [debug]
[2021-06-15 09:33:55.800] [7516] [debug] [ffmpeg] [auto_scaler_0 @ 000001D62D543400] w:iw h:ih flags:'bilinear' interl:0
[2021-06-15 09:33:55.800] [7516] [debug]
[2021-06-15 09:33:55.800] [7516] [debug] [ffmpeg] [filter_buffersink @ 000001D62D542900] auto-inserting filter 'auto_scaler_0' between the filter 'filter_buffer' and the filter 'filter_buffersink'
[2021-06-15 09:33:55.800] [7516] [debug]
[2021-06-15 09:33:55.801] [7516] [debug] [ffmpeg] [auto_scaler_0 @ 000001D62D543400] w:1920 h:1080 fmt:uyvy422 sar:0/1 -> w:1920 h:1080 fmt:yuv422p sar:0/1 flags:0x2
[2021-06-15 09:33:55.801] [7516] [debug]
[2021-06-15 09:33:55.801] [7516] [debug]
[2021-06-15 09:33:55.801] [7516] [debug] +---------------+
[2021-06-15 09:33:55.801] [7516] [debug] | filter_buffer |default--[1920x1080 0:1 uyvy422]--auto_scaler_0:default
[2021-06-15 09:33:55.801] [7516] [debug] | (buffer) |
[2021-06-15 09:33:55.801] [7516] [debug] +---------------+
[2021-06-15 09:33:55.801] [7516] [debug]
[2021-06-15 09:33:55.801] [7516] [debug] +-------------------+
[2021-06-15 09:33:55.801] [7516] [debug] auto_scaler_0:default--[1920x1080 0:1 yuv422p]--default| filter_buffersink |
[2021-06-15 09:33:55.801] [7516] [debug] | (buffersink) |
[2021-06-15 09:33:55.801] [7516] [debug] +-------------------+
[2021-06-15 09:33:55.801] [7516] [debug]
[2021-06-15 09:33:55.801] [7516] [debug] +---------------+
[2021-06-15 09:33:55.801] [7516] [debug] filter_buffer:default--[1920x1080 0:1 uyvy422]--default| auto_scaler_0 |default--[1920x1080 0:1 yuv422p]--filter_buffersink:default
[2021-06-15 09:33:55.801] [7516] [debug] | (scale) |
[2021-06-15 09:33:55.801] [7516] [debug] +---------------+
[2021-06-15 09:33:55.801] [7516] [debug]
[2021-06-15 09:33:55.801] [7516] [debug]
[2021-06-15 09:33:55.801] [7516] [info] [frame_muxer] simple 1920x1080i50.00
[2021-06-15 09:33:55.805] [10744] [debug] [buffer] Buffer allocation (2073600b) took: 0.003
[2021-06-15 09:33:55.806] [10744] [debug] [buffer] Buffer allocation (1036800b) took: 0.002
[2021-06-15 09:33:55.808] [10744] [debug] [buffer] Buffer allocation (1036800b) took: 0.002
[2021-06-15 09:33:55.813] [2484] [info] DeckLink Quad 2 [1|1080i5000] Initialized
[2021-06-15 09:33:55.814] [5364] [info] transition[empty=>DeckLink Quad 2 [1|1080i5000]] Initialized
[2021-06-15 09:33:55.814] [7136] [info] Sent message to 172.30.84.51:202 LOADBG OK\r\n
[2021-06-15 09:33:55.814] [7136] [debug] Executed command (0.117s): LOADBG
[2021-06-15 09:33:55.842] [10744] [debug] [buffer] Buffer allocation (2073600b) took: 0.004
[2021-06-15 09:33:55.849] [10744] [debug] [buffer] Buffer allocation (1036800b) took: 0.007
[2021-06-15 09:33:55.850] [10744] [debug] [buffer] Buffer allocation (1036800b) took: 0
[2021-06-15 09:33:55.878] [10744] [debug] [buffer] Buffer allocation (2073600b) took: 0.001
[2021-06-15 09:33:55.885] [10744] [debug] [buffer] Buffer allocation (1036800b) took: 0.007
[2021-06-15 09:33:55.885] [10744] [debug] [buffer] Buffer allocation (1036800b) took: 0
[2021-06-15 09:33:55.886] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:55.947] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:55.987] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.027] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.067] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.107] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.154] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.187] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.227] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.267] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.307] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.346] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.387] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.427] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.467] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.507] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.547] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.587] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.627] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.667] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.707] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.747] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.787] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.827] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.867] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.907] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.947] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:56.987] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:57.027] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:57.067] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:57.107] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:57.141] [10800] [info] Received message from 172.30.84.51: PLAY 1-5\r\n
[2021-06-15 09:33:57.141] [5364] [debug] Executing command: PLAY
[2021-06-15 09:33:57.141] [10800] [info] Received message from 172.30.84.51: MIXER 1-5 VOLUME 0\r\n
[2021-06-15 09:33:57.141] [10800] [info] Received message from 172.30.84.51: MIXER 1-6 OPACITY 0\r\n
[2021-06-15 09:33:57.141] [7136] [info] Sent message to 172.30.84.51:202 PLAY OK\r\n
[2021-06-15 09:33:57.141] [10800] [info] Received message from 172.30.84.51: PLAY 1-6 ROUTE 1-5\r\n
[2021-06-15 09:33:57.141] [7136] [debug] Executed command (0s): PLAY
[2021-06-15 09:33:57.141] [5364] [debug] Executing command: MIXER VOLUME
[2021-06-15 09:33:57.141] [7136] [info] Sent message to 172.30.84.51:202 MIXER OK\r\n
[2021-06-15 09:33:57.141] [7136] [debug] Executed command (0s): MIXER VOLUME
[2021-06-15 09:33:57.141] [5364] [debug] Executing command: MIXER OPACITY
[2021-06-15 09:33:57.141] [7136] [info] Sent message to 172.30.84.51:202 MIXER OK\r\n
[2021-06-15 09:33:57.141] [7136] [debug] Executed command (0.001s): MIXER OPACITY
[2021-06-15 09:33:57.141] [5364] [debug] Executing command: PLAY
[2021-06-15 09:33:57.144] [5364] [error] Turn on log level debug for stacktrace.
[2021-06-15 09:33:57.144] [5364] [info] Sent message to 172.30.84.51:404 PLAY FAILED\r\n
[2021-06-15 09:33:57.147] [7516] [debug] [diagnostics] [DeckLink Quad 2 [1|1080i5000]] dropped-frame [ch=1; layer=5]
[2021-06-15 09:33:57.149] [10744] [debug] [texture] Texture allocation: 1920x1080x1
[2021-06-15 09:33:57.150] [10744] [debug] [texture] Texture allocation: 960x1080x1
[2021-06-15 09:33:57.151] [10744] [debug] [texture] Texture allocation: 960x1080x1
[2021-06-15 09:33:57.189] [10744] [debug] [texture] Texture allocation: 1920x1080x1
[2021-06-15 09:33:57.191] [10744] [debug] [texture] Texture allocation: 960x1080x1
[2021-06-15 09:33:57.191] [10744] [debug] [texture] Texture allocation: 960x1080x1
[2021-06-15 09:33:57.226] [10744] [debug] [buffer] Buffer allocation (2073600b) took: 0
[2021-06-15 09:33:57.234] [10744] [debug] [buffer] Buffer allocation (1036800b) took: 0.007
[2021-06-15 09:33:57.234] [10744] [debug] [buffer] Buffer allocation (1036800b) took: 0

Am I doing something wrong? I can’t spot any difference.

Thanks.
Ingo

I think the route command is incorrect. See this wiki page.

OK. Thanks.
I already tried “ROUTE://1-5” but wasn’t aware that it is case-sensitive also.
“route://1-5” works.

Ingo

I wasn’t either. :+1:

Hi Julusian,

you mentioned further delay possibilities above 1 frame. Do you know how to manage that?

Thanks
Ingo

I’ve have had similar issues with Decklink Duo 2.
Have been measuring the sync with Phabirx AV delay feature.
Hope the following findings will help to pin point the issue.

If the REF is connected (tried with both TriLevel and Black Burst, both behave similarly).
With no REF/SYNC signal the AV delay is only 3-5 frames.
Is REF is connected and computer booted (“full reset”) the AV delay seems to settle around 36ms.
If REF is then disconnected the offset remains the same. But once REF is re-connected the audio will shift another 36ms or so, this happens every time the REF is reconnected, finally resulting in hundreds of ms AV delay.
A restart/reboot will reset the offset back to 36ms. With this in mind we have been running caspar with out REF for now.

BMD drivers/firmware 11.x, 12.x

Only been testing with version 2.3.2 and 2.3.3 of Caspar.

1 Like

Would you mind posting this also in the issue tracker on GitHub? Thanks.

If you measured it with an Phabrix, I don´t have to :slight_smile: Was thinking about the same measurement. Thanks!

Thanks hege. That could be helpful.
In fact we tried it with and without REF but never rebootet the hardware in between (only restarted CCG-server).
I’ll check how our systems react when I use them without REF (and reboot).
Unfortunately the servers are onair almost permanently at the time. I have to contact the production team for a time slot to test.
I’ll come back to you as soon as possible.

Ingo

P.S.: You’re talking about a delay between audio and video (asynchronous audio forerunning), don’t you?

Hello all,

I now can confirm hege’s suggestion.
I rebootet the workstation without reference connected and we measured the shift between audio and video around ±1ms which is absolutely within the limits. :+1:
Reconnecting the reference immediately shifted audio and video out of sync bei around 50 ms (audio forerunning).
After reboot with reference connected the delay between audio and video is stable at 40 ms.
So there’s obviously an issue with decklink and genlock.

Thanks for the help.

Ingo :grinning:

I still not fully understand, what is going on. How is the setup of the cards? It seems to me, that something is assumed wrong concerning that mode of operation (either at BMD or on our side). At least it is interesting, that the delay is exactly one frame. I think it tries to compensate for something. If it would be an error, it would tend to be some other random value, or don’t you think so?

Hi didi,

I’m just guessing now:
I have four different video-ins on my card which might not be all synchronized. Without reference each output genlocks to the related input. With reference connected caspar servers tries to synchronize all sources to the one genlock which might result in the delay. However strangely enough only video is delayed and audio runs through transparently.
But it’s just a guess though. :thinking:

My operation mode is actually pretty simple. I have four video-ins with four related video-outs. I always route the same video-in to the same video-out (IN1 → OUT1 etc).
The client can superimpose either full screen videoclips or stills from the harddrive and/or html5-templates (lower-thirds).

I use a decklink Quad 2 with driver version 12.1.
You can check my server config (posted above).
I don’t see any problems with that.
The performance of the CPU and storage workload never raises over 50%.
So all fine actually. :grinning:

Ingo

1 Like

That makes sense and will be the source of the problem.