TwoWay Audio problem

Arrayan

n3wb
Joined
Dec 12, 2017
Messages
1
Reaction score
1
Hi, i'm trying to implement a two way audio app but i cant get the audio encoding to work. I use the ISAPI methods :

curl -X PUT "http://admin:admin@192.168.xx.xx/ISAPI/System/TwoWayAudio/channels/1/open"

<?xml version="1.0" encoding="UTF-8"?>
<TwoWayAudioSession version="2.0" xmlns="Oops:The page you are visiting may have been deleted,renamed or inaccessible.">
<sessionId>1943264390</sessionId>
</TwoWayAudioSession>

curl -H "Content-Type: application/binary" -X PUT -d @didi.pcm http://admin:admin@192.168.xx.xx/ISAPI/System/TwoWayAudio/channels/1/audioData

HTTP/1.1 200 OK
Date: Mon, 08 Jan 2018 18:25:16 GMT
Server: App-webs/
Connection: close
Content-Length: 302
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="2.0" xmlns="Oops:The page you are visiting may have been deleted,renamed or inaccessible.">
<requestURL>/ISAPI/System/TwoWayAudio/channels/1/audioData</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
<subStatusCode>ok</subStatusCode>
</ResponseStatus>

So far everything looks ok, but the problem is that i have tried almost all the audio bitrate, samplingrate, encoding, endiannes combination possible and i cant get a clear audio reproduction in the camera. All of them sounds with an incredible amount of noise and a pitched up annoying effect. Is there a way to get the two way audio reproduction to work? Or is it closed to some obscure hikvision encoding ? Thanks in advance!
 

tmt

n3wb
Joined
Apr 9, 2018
Messages
2
Reaction score
0
Hi, Did you manage to get this working well in the end?
 

iTuneDVR

Pulling my weight
Joined
Aug 23, 2014
Messages
846
Reaction score
153
Location
Россия
So far everything looks ok, but the problem is that i have tried almost all the audio bitrate, samplingrate, encoding, endiannes combination possible and i cant get a clear audio reproduction in the camera. All of them sounds with an incredible amount of noise and a pitched up annoying effect. Is there a way to get the two way audio reproduction to work? Or is it closed to some obscure hikvision encoding ? Thanks in advance!
PUT by Curl - it's not work.
Share your ipc & i play any song on it ;)

For myself, for the test, I write a console utility in C, which plays sounds from the outside, transmitted by the parameters on the command line, on the camera.
Of course i did 1 variant with ulaw codec. This codec must be setting at the ipc & for other codec need white some diff code.
It was interesting task
The main thing, that it POSSIBLE TO DO ;)
It was here Аудио оповещение через аудиовыход камеры - Неофициальный форум технической поддержки Hikvision
 

FTell92

n3wb
Joined
Oct 30, 2019
Messages
5
Reaction score
0
Location
Sweden
PUT by Curl - it's not work.
Share your ipc & i play any song on it ;)

For myself, for the test, I write a console utility in C, which plays sounds from the outside, transmitted by the parameters on the command line, on the camera.
Of course i did 1 variant with ulaw codec. This codec must be setting at the ipc & for other codec need white some diff code.
It was interesting task
The main thing, that it POSSIBLE TO DO ;)
It was here Аудио оповещение через аудиовыход камеры - Неофициальный форум технической поддержки Hikvision
Thanks for your replay. Is it possible that you could share the consolue utility in C? I would appreciate a little description of how to run it and what it dose, that make this possible.
 

iTuneDVR

Pulling my weight
Joined
Aug 23, 2014
Messages
846
Reaction score
153
Location
Россия
Thanks for your replay. Is it possible that you could share the consolue utility in C? I would appreciate a little description of how to run it and what it dose, that make this possible.
Let's test 1st.
Share your ipc.
 

FTell92

n3wb
Joined
Oct 30, 2019
Messages
5
Reaction score
0
Location
Sweden
Let's test 1st.
Share your ipc.
Why would I do that? Please let me know how you did so we could continue develop this and encurage the development. I'm capable to execute and code by myself offline, thanks. If you need to test something you can do that on your end.

My goal is to develop a dorrbell that is comunicating between the camera and Google Home (this is done). But I would also like to play a wav file or similar every time someone hit the dorr bell button thrue the Two Way Audio to the outside camera. Today I'm able to play only some nosice before I open the communication to the Google API using curl.
 

iTuneDVR

Pulling my weight
Joined
Aug 23, 2014
Messages
846
Reaction score
153
Location
Россия
I close reserch this project not yesterday with own old ipc.
Need new(actual) ipc, need time to remember how it with special setting at ipc.
What is your model & firmware version?
 

FTell92

n3wb
Joined
Oct 30, 2019
Messages
5
Reaction score
0
Location
Sweden
The one on my test bench is a DS-2CD2542FWD with fw: V5.5.0 build 170725, also a bit old, guessing from arround 2017.
 

iTuneDVR

Pulling my weight
Joined
Aug 23, 2014
Messages
846
Reaction score
153
Location
Россия
The one on my test bench is a DS-2CD2542FWD with fw: V5.5.0 build 170725, also a bit old, guessing from arround 2017.
Audio alert via Hikvision camera audio output (TwoWayAudio)

Code:
/*
* Copyright(C) iTuneDVR www.iTineDVR.ru @iTuneDVR
*    FileName: HSWP.cpp
* Description:
*     Version: 1.0
*      Author: iTuneDVR
* Create Date: 2018-10-22
* Modification History
*   2021-01-22 Share for http://ipcamtalk.com/threads/twoway-audio-problem.25351/#post-522957
*/
...
 

Attachments

Last edited:

NoFate

Getting the hang of it
Joined
Oct 24, 2020
Messages
479
Reaction score
63
Location
Belgium
Hi @FTell92 do you have the google hub working with 2 way audio? I am using home assistant, i have attached an nodemcu to the relay of an intercom, that whay i can start the rtsp stream on google hub when someone pressed the doorbell.... But i miss the Audio.
Can you share how you do it?
 

NoFate

Getting the hang of it
Joined
Oct 24, 2020
Messages
479
Reaction score
63
Location
Belgium
I can also open the door relay with google assistant with ISAPI, so audio is the only thing missing for me
 

dimamukhin

n3wb
Joined
Mar 24, 2021
Messages
4
Reaction score
0
Location
Ukraine
Подскажите, есть ли возможность передать звук на 2CD2443G0-I передать звук?
 

iTuneDVR

Pulling my weight
Joined
Aug 23, 2014
Messages
846
Reaction score
153
Location
Россия
Подскажите, есть ли возможность передать звук на 2CD2443G0-I передать звук?
Так выше же исходники выложены и там все подробно как это сделать. ;)
 

dimamukhin

n3wb
Joined
Mar 24, 2021
Messages
4
Reaction score
0
Location
Ukraine
Подскажите, есть ли возможность передать звук на 2CD2443G0-I передать звук?
Thanks to iTuneDVR for help and sources.
The 2CD2443FG0-I camera on the latest firmware reproduces sound.
 

BassTeQ

Young grasshopper
Joined
May 10, 2017
Messages
62
Reaction score
8
Audio alert via Hikvision camera audio output (TwoWayAudio)
Thanks, I'm trying the application but getting the follow error, any idea how to fix it?

NET_DVR_StartVoiceCom_MR_V30 fail 29

Thanks
 

BassTeQ

Young grasshopper
Joined
May 10, 2017
Messages
62
Reaction score
8
Thanks, I'm trying the application but getting the follow error, any idea how to fix it?

NET_DVR_StartVoiceCom_MR_V30 fail 29

Thanks
Seems to be working now, I just copied the DLL to the same directory as the executable.
The playback is scratchy, is this normal or should the playback be smooth and uninterrupted?

Cheers
 

dimamukhin

n3wb
Joined
Mar 24, 2021
Messages
4
Reaction score
0
Location
Ukraine
;)

Should be flat, but your effect is also known
Show your ipc audio setting & what sound you try?
Good day. Faced the same problem.
On a laptop with WIN10x64 it did not work, it twitched, but on a computer, it also worked well with WIN10x64.
Try changing your computer
 
Top