vision icon indicating copy to clipboard operation
vision copied to clipboard

[Documentation] Improve Clarity on `torchvision.io.write_video` options

Open N00bcak opened this issue 1 year ago • 1 comments

📚 The doc issue

tl;dr options parameter under torchvision.io.write_video is inadequately documented, challenging for end-users to tweak videos to their liking. same goes for audio_options

In torchvision.io.write_video, options and audio_options parameters are not sufficiently elaborated upon.

At first glance, this is okay as the function is ultimately just a wrapper around PyAV's video recording capabilities.

In practice, however, it is nontrivial to find relevant documentation to finetune the output. This is especially so if the end-user, like me, is not familiar with PyAV or video recording in general.

Here is an example of the potential issues this may cause.

Suggest a potential alternative/fix

This is an issue we are working on as well in TorchRL.

As suggested by @vmoens, it would be nice if a link could be provided to the FFmpeg documentation, which is ultimately behind the options exposed by PyAV.

A potential extra step could then be to translate the wiki information into specific code examples that end-users can easily read and apply. This will probably benefit more people than if such information were only being documented in downstream libraries. Here's what a "specific code example" could look like,

N00bcak avatar Jul 02 '24 14:07 N00bcak

Thanks for the report @N00bcak , I agree this is insufficiently documented. I'm happy to review a PR to improve the docs.

NicolasHug avatar Jul 04 '24 10:07 NicolasHug