Amcrest http api v3.26
Amcrest HTTP API V3.26 가이드에 따른 카메라 제어 주요 API 요약임.
실시간 스트림 제어 (RTSP)
카메라의 실시간 영상을 요청할 때 사용하며, RTSP 프로토콜(기본 포트 554)을 이용함.
- URL 형식: <file>
rtsp://<server>:<port>/cam/realmonitor?channel=<channel>&subtype=<type> </file>
- subtype: 0(메인 스트림), 1(서브 스트림 1), 2(서브 스트림 2)
- 주요 메서드: DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN.
PTZ(팬/틸트/줌) 제어
카메라의 방향 및 배율을 조절함.
- 기본 이동:
Up,Down,Left,Right,ZoomWide,ZoomTele등. - `<file>
http://<ip>/cgi-bin/ptz.cgi?action=start&channel=1&code=<Code>&arg1=0&arg2=<Speed>&arg3=0 </file>`
- 프리셋(Preset) 이동: 특정 저장 위치로 즉시 이동함.
- `<file>
http://<ip>/cgi-bin/ptz.cgi?action=start&code=GotoPreset&channel=1&arg2=<PresetID> </file>`
- 3D 포지셔닝: 화면상의 특정 영역을 지정하여 그 위치로 렌즈를 정렬함.
- `<file>
http://<ip>/cgi-bin/ptzBase.cgi?action=moveDirectly&channel=1&startPoint[0]=<x>&startPoint[1]=<y>… </file>`
포커스 및 줌 상세 설정
렌즈의 초점과 미세한 배율을 조절함.
- 초점 조절: `<file>
http://<ip>/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=<val>&zoom=<val> </file>`
- 자동 초점: `<file>
http://<ip>/cgi-bin/devVideoInput.cgi?action=autoFocus&channel=1 </file>`
이미지 및 화면 설정
카메라의 화질과 출력 방식을 변경함.
- 이미지 속성: 밝기(Brightness), 대비(Contrast), 채도(Saturation) 조절.
- `<file>
http://<ip>/cgi-bin/configManager.cgi?action=setConfig&VideoColor[0][0].Brightness=50 </file>`
화면 반전 및 회전: Flip, Mirror, 90도 회전 기능을 설정함.
http://<ip>/cgi-bin/configManager.cgi?action=setConfig&VideoImageControl[0].Flip=true주야간 모드: 컬러, 흑백, 자동 전환 모드를 설정함.
http://<ip>/cgi-bin/configManager.cgi?action=setConfig&VideoInDayNight[0][0].Mode=Auto
스냅샷(Snapshot) 요청
현재 화면을 JPEG 이미지로 캡처함.
요청:
http://<ip>/cgi-bin/snapshot.cgi?channel=<channel>
오디오 제어
오디오 채널 확인 및 볼륨을 조절함.
볼륨 설정:
http://<ip>/cgi-bin/configManager.cgi?action=setConfig&AudioOutputVolume[0]=80
오디오 스트림 받기:
http://<ip>/cgi-bin/audio.cgi?action=getAudio&channel=1
아직 댓글이 없어요. 첫 댓글을 남겨보세요.