python-amcrest icon indicating copy to clipboard operation
python-amcrest copied to clipboard

play wav only sends static (audio)

Open AlexKohanim opened this issue 6 years ago • 4 comments

Hello, I'm loving this project so far which has greatly simplified the API calls for the amcrest camera.

I am currently testing with this camera [IP2M-841B]. And have run into one issue so far.

I'm using the pypip package to run the funcions.

For recording which works: camera = AmcrestCamera(ip, 80, 'user', 'password').camera camera.audio_stream_capture( httptype="singlepart", channel=1, path_file="audio.wav")

But trying to "stream" the same file just plays back about 10 seconds of static: camera = AmcrestCamera(ip, 80, 'user', 'password').camera camera.play_wav("singlepart", channel=1, path_file="audio.wav")

Any and all help would be appreciated.

Thanks!

AlexKohanim avatar Jan 31 '20 20:01 AlexKohanim

Hi Amcrest,

I would love some more information on sending audio with the API. In particular I would like to stream audio to the device but even just playing a wav file is proving difficult as brought to light in this issue. My company is very interested in Amcrest offerings but two-way audio is vital for our use case.

The solution discussed in the issue linked below is not solved despite being marked so. https://github.com/tchellomello/python-amcrest/issues/75

More guidance on this issue would be greatly appreciated.

tylertroy avatar Apr 01 '20 21:04 tylertroy

Hi @tylertroy

My team has a fix for this. I don't have it with me right now, but I remember it was due to a hardcoded file type or hardcoded stream type for the audio sent.

I have never made a PR officially, so it might take a bit to get the change here, unless someone has the time to help me out.

Take care,

-Alex Kohanim

AlexKohanim avatar Apr 02 '20 10:04 AlexKohanim

Hi @AlexKohanim

Thanks for your response. I would appreciate any help with this matter and would be happy to assist in any way in making/reviewing changes to the existing code base. Please feel free to contact me via email for further discussion. You can find my email address in my Github profile and thanks again.

tylertroy avatar Apr 02 '20 16:04 tylertroy

@tylertroy If you could Test the new implementation and let us know your findings, we can work to close this Issue.

AlexKohanim avatar Apr 07 '20 14:04 AlexKohanim