pyav / libav raises ImportError

1k views Asked by At

I have a code running perfectly on an Ubuntu machine but returning an error on another one:

from av._core import time_base, pyav_version as __version__, library_versions
ImportError: libavdevice-67a93a2b.so.58.10.100: cannot open shared object file: No such file or directory

I am simply ingesting multiple a video streams concurrently in different threads:

import av
import time

URL = "RTSP_url"
container = av.open(
            url, 'r',
            options={
                'rtsp_transport': 'tcp',
                'stimeout': '5000000',
                'max_delay': '5000000',
            }
        )

for packet in self.container.demux(video=0):
    for frame in packet.decode():
        # do something
        time.sleep(10)
1

There are 1 answers

0
user1315621 On BEST ANSWER

Reinstall pyav solved the issue: pip3 install av.