Add compression option to audio-netsender

Issue #9 new
Saxon Milton created an issue

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)

  1. Alan Noble

    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.

  2. Alan Noble

    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.

  3. Saxon Milton 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?

  4. Alan Noble

    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.

  5. Log in to comment