How to send audio API for two-way-audio?

zenna

n3wb
Joined
Jul 12, 2016
Messages
1
Reaction score
0
I need help to understand why when sending audio to the camera you hear ugly, very fast.
The camera is configured audio codec G711Ulaw


The process I am doing is the following:


- I download a wav audio and converted to the codec that the camera is configured, these are all evidence conversions.
ffmpeg -i padrino.wav -acodec pcm_mulaw -ar 8000 -ac 1 -b:a 32k output.wav
ffmpeg -i padrino.wav -acodec pcm_mulaw -ar 8000 -ac 2 -b:a 32000 output.wav
ffmpeg -i padrino.wav -f mulaw -acodec pcm_mulaw -ac 1 output.wav
ffmpeg -i padrino.wav -ar 8000 -ac 1 -ab 64k -f mulaw output.ulaw

- Turned on the two-way-audio, within the "data.xml" is the xml that enables two-way-audio:
curl -H "application/xml" -X PUT -d @data.xml http://USER:PASS@IPCAM/ISAPI/System/TwoWayAudio/channels/1/open

- I send through a curl
curl -H "application/binary" -X PUT -d @output.ulaw http://USER:PASS@IPCAM/ISAPI/System/TwoWayAudio/channels/1/audioData
or
curl -H "application/binary" -X PUT -d @output.wav http://USER:PASS@IPCAM/ISAPI/System/TwoWayAudio/channels/1/audioData

This is heard in camera but as I explained at the beginning is heard wrong, I distorted, very fast.
What am I doing wrong?


regards
 

tmt

n3wb
Joined
Apr 9, 2018
Messages
2
Reaction score
0
Hi, Did you ever get this working, I have been testing here and I just hear a click when I send the audio data.

thanks!
 
Last edited:
Top