#!/usr/bin/env python3 #---------------------------------------------------------------------------- # Copyright (c) 2018 FIRST. All Rights Reserved. # Open Source Software - may be modified and shared by FRC teams. The code # must be accompanied by the FIRST BSD license file in the root directory of # the project. #---------------------------------------------------------------------------- import json import time import sys from cscore import CameraServer, VideoSource, UsbCamera, MjpegServer from networktables import NetworkTablesInstance # JSON format: # { # "team": , # "ntmode": <"client" or "server", "client" if unspecified> # "cameras": [ # { # "name": # "path": # "pixel format": <"MJPEG", "YUYV", etc> // optional # "width":