Shortcuts

ffmpeg_utils

Module to change the configuration of FFmpeg libraries (such as libavformat).

It affects functionalities in torchaudio.io (and indirectly torchaudio.load()).

get_log_level

torchaudio.utils.ffmpeg_utils.get_log_level() int[source]

Get the log level of FFmpeg.

See set_log_level() for the detailo.

get_versions

torchaudio.utils.ffmpeg_utils.get_versions() Dict[str, Tuple[int]][source]

Get the versions of FFmpeg libraries

Returns:

mapping from library names to version string,

i.e. “libavutil”: (56, 22, 100).

Return type:

dict

Tutorials using get_versions:
StreamWriter Basic Usage

StreamWriter Basic Usage

StreamWriter Basic Usage

set_log_level

torchaudio.utils.ffmpeg_utils.set_log_level(level: int)[source]

Set the log level of FFmpeg (libavformat etc)

Parameters:

level (int) –

Log level. The larger, the more verbose.

The following values are common values, the corresponding ffmpeg’s -loglevel option value and desription.

  • -8 (quiet): Print no output.

  • 0 (panic): Something went really wrong and we will crash now.

  • 8 (fatal): Something went wrong and recovery is not possible. For example, no header was found for a format which depends on headers or an illegal combination of parameters is used.

  • 16 (error): Something went wrong and cannot losslessly be recovered. However, not all future data is affected.

  • 24 (warning): Something somehow does not look correct. This may or may not lead to problems.

  • 32 (info): Standard information.

  • 40 (verbose): Detailed information.

  • 48 (debug): Stuff which is only useful for libav* developers.

  • 56 (trace): Extremely verbose debugging, useful for libav* development.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources