audio icon indicating copy to clipboard operation
audio copied to clipboard

Support for 10bit / 12bit encoding (e.g. yuv420p10le) in StreamWriter

Open tvercaut opened this issue 1 year ago • 0 comments

🚀 The feature

The ability to provide 16 bit data (torch.int16) as input to StreamWriter with the understanding that the data will be truncated to 10/12 bit depending on the selected encoder_format would be very helpful.

Motivation, pitch

10 bit video encoding is becoming more mainstream and is supported in nvenc. 12 bit video encoding is also getting more traction. torchaudio already supports reading 10 bit video and storing it in 16 bit tensors: https://github.com/pytorch/audio/issues/3331 https://github.com/pytorch/audio/pull/3023 https://github.com/pytorch/audio/pull/3332 It would be great to have the converse support on the encoding side.

Alternatives

Additional context

N/A

tvercaut avatar Apr 23 '24 19:04 tvercaut