I am writing my own program for writing video and audio to .mkv
container. I am successfully writing h.264
video in container with Codec_id V_MPEG4/ISO/AVC
but i can't find Codec_id for g.7xx audio codecs in specification? How can i properly write
g.711/g.722
to .mkv container?
It looks like MKV supports signaling Microsoft Audio Codec Manager (ACM) as A_MS/ACM. https://www.matroska.org/technical/specs/codecid/index.html
You find details for setting up the data structures here:
You will be off the beaten path with H.264/[a-law,u-law,ADPCM] - so players may not play your MKV files. Consider using 16-bit linear PCM which should be a loss less conversion.