hl2ss icon indicating copy to clipboard operation
hl2ss copied to clipboard

Audio not streamed with sample_video.py

Open vli-syngular opened this issue 9 months ago • 8 comments

Hello, I'm testing with sample_video.py. All sensors data can be streamed except the audio. Am I missing something?

vli-syngular avatar Mar 17 '25 07:03 vli-syngular

Hi, Audio playback is not implemented in sample_video.py.

jdibenes avatar Mar 18 '25 06:03 jdibenes

Then is there any example demonstrating how to stream pv and extended audio at the same time?

vli-syngular avatar Mar 18 '25 06:03 vli-syngular

There wasn't but I just added an example in sample_pv_audio.py

jdibenes avatar Mar 18 '25 09:03 jdibenes

It works well! Thank you so much for adding this example.

vli-syngular avatar Mar 18 '25 10:03 vli-syngular

Did you ever try using StreamingCaptureMode.AudioAndVideo to achieve that? Though I suppose your current solution is better in terms of performance.

vli-syngular avatar Mar 18 '25 10:03 vli-syngular

I tried it a long time ago. When using Exclusive capture, the audio controller would report 11 channels but the callback would not receive any audio frames so I didn't continue down that path.

jdibenes avatar Mar 18 '25 18:03 jdibenes

Thanks for sharing those findings

vli-syngular avatar Mar 19 '25 03:03 vli-syngular

Any idea how to eliminate the echo? I've tried changing MediaCategory::Meida to MediaCategory::Communications in c++ project, which will use sample rate 16000 instead of 48000, but then the microphone capture cannot be heard.

vli-syngular avatar Mar 28 '25 13:03 vli-syngular