imageio
imageio copied to clipboard
Add audio support for pyav
This is a proposal to add new methods to the pyav plugin API in order to expose pyav's audio read/write capabilities. Reading could look something like this:
with iio.imopen(...) as file:
audio = file.read_audio(...)
for audio_frame in file.read_audio():
...
And writing could look something like this:
with iio.imopen(...) as file:
file.init_audio_stream(...)
for chunk in audio_frames:
file.write_audio_frame(chunk)
I can contribute the code changes for this addition.
Looks good from my side. Feel free to get started with a PR and let me know if you need any help or if I should review anything.