c++/c/python wrapper for
- FFmpeg
- Galaxy driver used in Daheng cameras
- pylon driver used in Basler cameras
apt install libavcodec-dev libavdevice-dev libavformat-dev libswscale-dev
.
Set FFMPEG_DIR
environment variable when setting custom ffmpeg directory. See Findffmpeg.cmake
Download galaxy SDK. Then set GALAXY_DIR
environment variable to the SDK directory.
See Findgalaxy.cmake for exact logic of finding galaxy SDK.
Download pylon SDK. Then set PYLON_DIR
environment variable to the SDK directory. See Findpylon.cmake for exact logic of finding pylon SDK.
pip install git+https://github.com/Visillect/videoreader
FFMPEG_DIR=... GALAXY_DIR=... PYLON_DIR=... pip install git+https://github.com/Visillect/videoreader
from videoreader.numpy import VideoReaderNumpy as VideoReader
# uri = 'galaxy://192.168.0.13'
uri = 'test/big_buck_bunny_480p_1mb.mp4'
reader = VideoReader(uri, extras=["pkt_dts", "pts"])
for image, number, timestamp, extras in reader:
print(f"{fmt_image(image)} {number}, {timestamp:g}, {extras}")