Skip to main content

Tech Forum

NDI audio streams recorder using SDK examples

NDI audio streams recorder using SDK examples

by Nicanor Júnior - Number of replies: 0

Hello guys!

Recently, I've started experimenting with the NDI SDK examples on Linux. The main purpose is to record the audio NDI streams into wave file format.

By changing the NDIlib_Recv.cpp a bit, I got the number of audio channels in NDI streams (added audio_frame.no_channels):

printf("Audio data received (%d samples, %d channels).\n", audio_frame.no_samples, audio_frame.no_channels);

It printed 40 channels.

After that, I added the <sndfile.h> library and changed the code to record all 40 channels in a single wave file for 5 seconds. When I checked the result in Audacity, there were 40 channels, but the audio was very noisy.

So, I changed the code to record just one channel, and the audio was perfect.

Has anyone already recorded more than one channel in an NDI stream and could share an example of how to do that?

Thanks in advance!