TorchCodec 0.4 is out! It is a small release with:
- A new
num_channels
parameter toAudioDecoder
, allowing you to directly specify whether you want to convert the audio to mono or stereo. - A bug fix which fixes the time conversion in our time-based APIs, which used to be incorrect for some specific videos.
- A robustness improvement: TorchCodec is now able to decode poorly-encoded videos, when the PTS values are missing (it falls-back to DTS in that case). Previously, TorchCodec would fail on such videos.
- A bug fix in
AudioDecoder.get_samples_played_in_range()
: ifstop_seconds
was before the first sample's start, we would return all the samples. Now, we raise a loud error. - A bug fix in
AudioDecoder.get_samples_played_in_range()
whenstart_seconds == stop_seconds
: the shape of the output is now(num_channels, 0)
instead of(0, 0)
.