- edited description
Add compression option to audio-netsender
We would like to record audio with compression in order to reduce the amount of data being sent to cloud. Eventually audio functionality and compression will be added to revid, but for now, compression can be explored using audio-netsender. I propose that we add a flag to control whether compression occurs or not, and simply compress data before populating pins fields in output(). The current plan is to use the following library: https://github.com/mewkiz/flac .
Because netreceiver is currently in python we would have to find a python library that does flac decoding, alternatively for this purpose, we could write a simple audiorecord (like vidrecord) that can receive audio and decode from flac.
Comments (10)
-
reporter -
Let's add audio support to VidGrind so we can work 100% in Go instead of Python. Audio capture and storage is just a matter of extending the /recv method to handle audio as well as video.
-
reporter Yeah that makes sense :)
-
reporter Update: I think we will do compression in formatBuffer()
-
BTW, we will need to implement "sound detection" for audio, i..e, the audio equivalent to "motion detection" for video, to filter out boring background sounds. Please think about where that will fit into the audio processing pipeline.
-
reporter alright I will have a think with Trek. How would you recommend we distinguish between video and audio inside recvHandler() - is it just a matter of checking the pin type in the request or is there a safer/better way?
-
Yes, "pin" types essentially just define different data types. They are a single-letter name space.
PS I have some vidgrind changes which I will submit shortly.
-
VidGrind accepts V(ideo) or S(ound) pins with /recv as of https://bitbucket.org/ausocean/iotsvc/commits/f781e9a0302a0e0a1acd01825b9dab30f86caa47
Note that audio/video clients will still need to talk to NetReceiver for reporting (/poll), vars (/vars) and configuration (/config), but should send audio/video data to VidGrind via /recv requests. I will open a separate issue against NetSender for this.
-
BTW, the current set of NetReceiver pins is documented at http://netreceiver.appspot.com/help#pins
-
- Log in to comment