Skip to main content
Topic: Where to start when designing an audio codec (Read 692 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Where to start when designing an audio codec

I have an idea for a basic audio format, based on a specific need for data compression of long runs of music recording, sound effects, etc. But I'm not sure where to start learning about how to write the codec that mediates the decoding/encoding of the format to software that wants to read and write to it. I'm capable of designing the format and learning how, but don't know where to begin when it comes to writing the codec software. I run a linux mint computer and in general I want to be able to listen to the format (like in VLC) and open it in audacity, possibly export. I assume there is a standard way of writing these kinds of software, but where do I start?

Re: Where to start when designing an audio codec

Reply #1
I'd try a Linux programming website/forum.   Or FFmpeg is open source so you could probably learn a lot from it.

Re: Where to start when designing an audio codec

Reply #2
I would go to the library and get a book on audio compression.

Re: Where to start when designing an audio codec

Reply #3
I would go to the library and get a book on audio compression.
Thank you, but DVDdoug's comment was more of what I meant. HOW I'm compressing it is a different matter, I've already written down some ideas for that.

Re: Where to start when designing an audio codec

Reply #4
Quote
based on a specific need for data compression of long runs of music recording, sound effects, etc.

which need, can you elaborate a bit? why isn't any existing codec (FLAC for example) a good fit for that need?
if you want more speed, FLAC has faster presets which might be ok.
some ANC'd headphones + AutoEq-based impulse + Meier Crossfeed (30%)

Re: Where to start when designing an audio codec

Reply #5
Quote
based on a specific need for data compression of long runs of music recording, sound effects, etc.

which need, can you elaborate a bit? why isn't any existing codec (FLAC for example) a good fit for that need?
if you want more speed, FLAC has faster presets which might be ok.
I did some searching for formats, such as sub-8-bit sample-width formats, and other odd options. But I came to the conclusion that what I needed was something of my own doing, and then feature-creep took over and I realised that I had something worth making. One of the ideas I came up with was dynamic sample-rate/sample-width, and various mathematical operations for compressing the audio. The gist of it is a list of options that get turned on or off to compress the data as much as possible moment to moment, without significant loss.

Re: Where to start when designing an audio codec

Reply #6
Of course it's up to you, but you should be able to do a LOT of testing & development directly on WAV files before interfacing with any existing software.  (Open a WAV, compress & write your file, read & decode file, and write a new WAV).  WAV files are easy to read/write, especially if you stick with some standard settings (such as 16-bit, 44.1kHz, stereo).

And if you haven't done so already, it would be wise to study the existing concepts & algorithms before re-inventing the wheel.   A lot of smart people have spent many man-years on audio (and video) compression and it's almost always best to build-on what's already been learned and done than to start from scratch.

Re: Where to start when designing an audio codec

Reply #7
Of course it's up to you, but you should be able to do a LOT of testing & development directly on WAV files before interfacing with any existing software.  (Open a WAV, compress & write your file, read & decode file, and write a new WAV).  WAV files are easy to read/write, especially if you stick with some standard settings (such as 16-bit, 44.1kHz, stereo).

And if you haven't done so already, it would be wise to study the existing concepts & algorithms before re-inventing the wheel.   A lot of smart people have spent many man-years on audio (and video) compression and it's almost always best to build-on what's already been learned and done than to start from scratch.
Understandable, I just want to be ready for when it comes that I need to write the codec so I can edit this thing in audacity and stuff.

 
SimplePortal 1.0.0 RC1 © 2008-2020