codegen is just an example of using libcodegen. libcodegen's Codegen() entry takes a buffer of PCM float32s. You can generate those samples using anything you want.
We shell out ffmpeg in the example codegen because it's the most popular converter but anyone can use anything they want in their own code.