Reference only

No module named av: why installing FFmpeg may not fix the Python import

Check PyAV, its linked libraries and an external FFmpeg executable as separate dependencies.

Scope and symptoms

No module named 'av', a native-library import error, an external ffmpeg command failure and a media decoding error happen at different stages. Identify the failing caller before changing packages.

Source-supported context

The current PyAV installation guide describes release 18.1.0 as requiring Python 3.11 or later. Its Linux, macOS and Windows binary wheels bundle FFmpeg libraries; building PyAV from source against your own FFmpeg instead needs matching development libraries and tools. PyAV is imported as av and exposes media containers and frames through Python. The FFmpeg command-line tool is a separate executable. Installing that executable alone does not install the Python binding, and a PyAV wheel import does not prove the node can launch an external command.

Distinguish these cases

1. The Python executable that starts ComfyUI cannot find av, or the chosen PyAV release has no compatible interpreter/platform wheel.

2. av is installed but its native extension or FFmpeg libraries fail to load. A source-build error has different prerequisites from a binary-wheel import error.

3. The node launches an external ffmpeg/ffprobe process that is missing or points to a different executable.

4. Python import and executable lookup work, but a particular container, codec, track or file fails during decoding or encoding.

Suggested diagnostic sequence

This sequence is editorial guidance, not a diagnosis of your machine.

1. Save the first complete traceback or subprocess error. With the exact interpreter that launches ComfyUI, record Python, PyAV and node versions and package origin: python -m pip show av. For a trusted installation, test python -c "import av; print(av.__version__); print(av.library_versions)" using that interpreter.

2. If the import is absent, compare the node's declared PyAV range with that interpreter and the release's wheel requirements; do not assume current PyAV 18.1.0 supports an older Python. If a native import or source build fails, preserve the first missing library, header or compiler message and inspect the exact wheel/source artifact before changing system FFmpeg.

3. Only for an external-process error, identify the executable path selected by the node and test that same executable. The FFmpeg CLI version is not the version of libraries reported by av.library_versions.

4. In a recoverable copy, use a short non-private video and the failing node operation to test open, one frame, and any required audio or output codec. Keep the original input untouched and change one dependency at a time.

Completion checks

The intended Python import or external executable works in the actual process, and the relevant short-media operation succeeds. A successful import alone does not prove codec support or the final node workflow.

Limits and cautions

PyAV wheel, source-build and FFmpeg CLI requirements are release- and platform-specific. Do not globally replace FFmpeg or every video node to repair one missing Python module.

Source review: 2026-09-26. No local package installation, native build, video decode or GPU run occurred.

Original sources

Didn't solve it?

Check the next possible cause

The same symptom can come from a different cause. Work through these related entries in order.

  1. aiohttp and requests: a missing library is not a connection failureNo module named aiohttpCheck library availability before investigating DNS, TLS, HTTP responses or timeouts.
Paste your full log into the error finder

Was this page helpful?

Anonymous. Only a yes/no counter is stored; no account, IP address or device details.

Sources & references

2026-09-26 primary PyAV/FFmpeg source review and English editorial pass; no package, native build, media or GPU run.

01PyAV installation documentationSource checked: 2026-09-2602PyAV overview and basic demoSource checked: 2026-09-2603FFmpeg command-line documentationSource checked: 2026-09-26

Report an issue · 3ea6f31b-4008-5206-aaa3-96957ecf66f7