Hikvision - Audio Codec Mismatch?

Post Reply
aklassen
Posts: 2
Joined: Fri Aug 23, 2019 3:30 pm

Hikvision - Audio Codec Mismatch?

Post by aklassen »

Howdy all,

I was hoping to replace an older NVR / streaming software package with BI5, but I'm having some issues pulling audio off of our Hikvision cameras.

The audio stream is reachable in both VLC and the cameras' native web interface, but when connecting to BI5, all I hear is what I could best describe as "oscillating white noise." From the limited experience I have in digital audio encoding, the scenario sounds suspiciously like a mismatched codec, although I've tried all of them available to select in the Camera Config interface. The camera web interface shows the only option for audio as the G.711 u-law codec, though as you'll see from my testing below, I have serious reservations whether that setting's accurate... none of the variations I am able to select in BI5 result in an intelligible audio stream, just the static hiss.

After acquiring RTSP using VLC, I can view the codec information, and it shows the following:
(Acquired using rtsp://username:password@ca.me.ra.IP:554/Streaming/Channels/101)

---
Stream 0
Type: Video
Codec: H264 - MPEG-4 AVC (part 10) (h264)
Resolution: 704x482
Frame Rate: 30
Decoded format: Planar 4:2:0 YUV

Stream 1
Type: Audio
Codec: MPEG AAC Audio (mp4a)
Channels: Stereo
Sample rate: 32000Hz
---

To my eyes, it looks like the audio stream that VLC is acquiring over RTSP is definitely not encoded with the G.711 u-law setting specified in the camera's web config. My understanding is that ALL G.711 encoded audio channels will present themselves at 64KHz, and VLC is fairly clear that it's acquiring a 32KHz AAC-encoded audio channel. I can't explain the mismatch, as the current setup was all configured by an outside vendor, and I've only recently inherited it... but the audio discrepancy is the final piece of the puzzle for me to start using BI5. Has anyone else had a similar experience, or know how of any ways to get BI5 to understand the 32K AAC stream? All the other features of BI5 are perfect for what I'm hoping to accomplish, but sadly the audio component is a dealbreaker if I can't get it all working.

Any and all help or suggestions are appreciated!
-Tony
aklassen
Posts: 2
Joined: Fri Aug 23, 2019 3:30 pm

Re: Hikvision - Audio Codec Mismatch?

Post by aklassen »

Still no luck, but some additional information. I have been able to determine that the cameras are all the same model, DS-2DF1-402N. Pretty simple standard definition PTZ dome w/ external audio in.

I pulled one of the cams and brought it back for bench testing, and rigged up a constant audio source, 3.5mm out of a PC running direct to the mic input-- it's a little hot, but it's way more reliable for testing purposes. In fact, it helped me narrow down the issue a little bit more, it's NOT just white noise coming from the BI preview / recordings, there are sporadic "bursts" of audio that do get picked up, but we're talking like 100ms or less of actual audio, just a quick blip, then back to no audio at all.

Verified the stream info again using ffmpeg's ffplay utility, and successfully acquired the same RTSP audio stream as what I found in VLC, working perfectly. I'm leaning towards this being a Blue Iris problem, as opposed to a camera problem, because the video and audio streams seem to work without issue in other applications: the built-in camera web interface, VLC, ffmpeg, iSpy, iVMS, ContaCam... But none of the other applications offer the same out-of-the-box features and options that Blue Iris does! It would really be the perfect software package to replace what we've been using, if only the audio worked the way it should.

Ringing any bells for anyone that's experienced similar issues before? I'm totally at a loss... Letting the camera autodiscover just sets the generic ONVIF profile, and I've further tried virtually all of the Hikvision camera presets available in BI5.
Post Reply