简体   繁体   中英

pyav / libav raises ImportError

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)

Reinstall pyav solved the issue: pip3 install av .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM