question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error Import VideoFrame

See original GitHub issue

Use python3

I have intalled requirement from apt install libavdevice-dev libavfilter-dev libopus-dev libvpx-dev Then wanna to run server.py i try to install pip install aiohttp aiortc opencv-python but when run python3 server.py got error like this:

Traceback (most recent call last): File “server.py”, line 10, in <module> from aiortc import (RTCPeerConnection, RTCSessionDescription, VideoFrame, ImportError: cannot import name ‘VideoFrame’

any idea ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jlainecommented, Sep 27, 2018

Ok glad to hear it works! I need to find a way to tie the examples to the aiortc version…

0reactions
lby1992commented, Apr 28, 2019

I got the this error too of executing the example program, when I run python3 server.py, the program throws the following error:

Traceback (most recent call last):
  File "/Users/zxrjb/codes/python/aiortc/examples/server/server.py", line 11, in <module>
    from av import VideoFrame
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/av/__init__.py", line 9, in <module>
    from av._core import time_base, pyav_version as __version__
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/av/_core.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/fontconfig/lib/libfontconfig.1.dylib
  Referenced from: /usr/local/opt/ffmpeg/lib/libavdevice.58.dylib
  Reason: image not found

Below is something may be useful:

zxrjbdeiMac:aiortc zxrjb$ python3 --version
Python 3.7.2

zxrjbdeiMac:aiortc zxrjb$ pip3 show aiortc
Name: aiortc
Version: 0.9.20
Summary: An implementation of WebRTC and ORTC
Home-page: https://github.com/aiortc/aiortc
Author: Jeremy Lainé
Author-email: jeremy.laine@m4x.org
License: BSD
Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
Requires: aioice, attrs, av, cffi, crc32c, cryptography, pyee, pylibsrtp, pyopenssl
Required-by: 

Could someone help me?

Read more comments on GitHub >

github_iconTop Results From Across the Web

VideoFrame.from_ndarray(img) fails for widths that are not a ...
Any call to VideoFrame.from_ndarray(img) fails if the image width is not a multiple of 8. Error message: ValueError Traceback (most recent call ...
Read more >
PyAV-Org/User-Help - Gitter
Hi, I'm a new to PyAV, I try to plot some basic info of video frame, e.g. frame size, but I don't find...
Read more >
can't import mp4 file as videoframes in PS 2022, need help, ty
I always use the "import videoframes in layers" function. With 1080p vids it's no problem but it doesn't work with higher resolutions (4k)...
Read more >
My another React Native was working fine upto 4 November ...
My another React Native was working fine upto 4 November, but now throwing an exception while Running yarn android with different Error.
Read more >
Error message 'Can't import the selected video file because it ...
Error message "Can't import the selected video file because it does not contain any video frames" when importing video into Pro Tools. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found