| 영어 | 한국어 | 중국어 | 일본어 |
APIs
소개
vmspy API는 세 가지 주요 모듈로 구성되어 있습니다:
· live_video: 지정된 채널에서 실시간 이미지 또는 스트림을 가져옵니다.
· playback: 지정된 시간의 녹화된 이미지 또는 스트림을 가져옵니다.
· utils: 채널 목록 조회, 사용 가능한 녹화 시간 확인, PTZ 프리셋 제어 등 유틸리티 기능을 제공합니다.
가져오기 및 초기화
라이브러리 설치 후, vmspy를 import하고 아래와 같이 각 모듈을 초기화합니다.
초기화에는 서버 주소, 포트, 그리고 접속 자격 증명(ID와 비밀번호)이 필요합니다.
import vmspy # type: ignore
# Live video
live_video = vmspy.live_video()
if not live_video.init(address, port, access_id, access_pw):
print(live_video.get_error())
# Playback
playback = vmspy.playback()
if not playback.init(address, port, access_id, access_pw):
print(playback.get_error())
# Utils
utils = vmspy.utils()
if not utils.init(address, port, access_id, access_pw):
print(utils.get_error())


