Page 1 of 1

Problems reading XLR Analog Audio In with IDeckLinkInput

PostPosted: Wed Apr 12, 2017 9:38 am
by Jules Davis
I am using a Blackmagic DeckLink 4K Extreme Capture card to capture video from a mini 4k camera via the Blackmagic SDK with the IDeckLinkInput interface.

This works fine when the audio is coming directly from the camera, however I have a requirement to support audio connection from an analog source via the XLR connector.

I can use the configuration tool to reconfigure the device to get audio from the XLR port, plug in an analog microphone and then monitor it in Media Express and see the audio levels.

However, when I use the IDeckLinkInput interface to capture the video/audio I get strange results.

The samples read from IDeckLinkAudioInputPacket->GetBytes() in the VideoInputFrameArrived callback appear to be at least 1000x to small / low and very noisy. (As compared to when reading audio with the same code from the camera via SDI input).

I have set the interface to 32 bit audio samples and expecting the samples to be in the range int-min to int-max.

How do I read from the XLR reliably?

Thanks

Re: Problems reading XLR Analog Audio In with IDeckLinkInput

PostPosted: Mon May 22, 2017 6:23 pm
by Ed Dow
Greetings,
I have the same card and I too am having issues with the XLR input.

For your small file issue...Maybe check the sample rate? DeckLinkAPI_h.h --> bmdAudioSampleRate48kHz=48000

Don't know if you could set it differently?

I use it in a repetitive test environment and initially it captures fine. After a while it does not capture audio. My program has to be restarted in order to function properly again.

I am switching audio input from HDMI to SDI to XLR. The other two inputs have no issues, only my XLR.

Funny thing about the audio is I have 2 of these cards. On my development system the results are nice and predictable.

The production system seems to have noise introduced into the audio sample.

Let me tell you... it makes for a hard time trying to figure out what is going on.... especially when you listen to the sample and you don't hear anything wrong with it.

Re: Problems reading XLR Analog Audio In with IDeckLinkInput

PostPosted: Fri May 26, 2017 9:15 am
by Jules Davis
My work around for this is to require that we run the "Blackmagic Desktop Video Setup" utility, select the card that has the analog, and edit the properties.

Then on the audio tab, in the Analog Audio Input Levels section, tick the Use HiFi Audio Levels.

The docs on this say:

Use HiFi Audio Levels: Professional XLR connectors are standard on UltraStudio and DeckLink models. If you want to connect consumer audio equipment to the XLR connectors, make sure you enable the 'use HiFi audio levels' checkbox as the audio levels between professional and consumer hardware differ. You'll also need to use an RCA to XLR adapter.

SDK Configuration
The corresponding option in the DeckLink SDK appears to be to get an IDeckLinkConfiguration Interface and set the bmdDeckLinkAnalogAudioConsumerLevels flag.

Re: Problems reading XLR Analog Audio In with IDeckLinkInput

PostPosted: Fri Jun 02, 2017 7:01 pm
by Ed Dow
Greetings Jules,
Thanks for imparting some light. I must have skipped over that section where it talked about different input levels for professional vs consumer. I am converting from RCA to XLR via a simple conversion plug.

I just checked it on my development system where my analog audio is good and I don't have the "use hifi audio levels" checked.

Checked it on my production systems and it's not checked either.

Just curious if you might have tried a newer version of the Desktop Video?

I was having an issue with the XLR not working properly after a duration of time with 10.6.8. Now I've upgraded to 10.9 and the issue does not manifest itself as frequently. It took days for it to crop up after I upgraded.

There was another issue I was seeing too where scaling was not working properly on the output of hdmi (4k->HD/SD). It seems to be working now.

Re: Problems reading XLR Analog Audio In with IDeckLinkInput

PostPosted: Mon Jun 05, 2017 2:23 pm
by Jules Davis
I've not seen the problems with DeckLink Video as I only use it very occasionally. I use the DeckLink SDK directly to read the audio / video.

However I am running 10.6.5 build of the SDK and it is certainly possible that upgrading to a more recent build (I think they've just released 10.9.3) might change this behaviour.

Thanks for the observation.

Jules