This PR relates to this #702 issue I posted earlier. This let user to specify input audio codec to be used instead of relaying on FFMPEG default one. Default codec is PCM_S16LE and in one scenario I needed to specify PCM_S32LE instead.
Some questions still on my head related to this:
- I only added PCM codecs. Is this okay? I think in the future if someone needs more they can be added quite easily.
- Anything to improve here? I'd be happy to modify this PR if needed.
With this change av.open
can for example be called with
import av
av.open('alsa_device_name', format='alsa', audio_codec='PCM_S32LE')