summaryrefslogtreecommitdiff
path: root/py/tests/cam.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/tests/cam.py')
-rwxr-xr-xpy/tests/cam.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/tests/cam.py b/py/tests/cam.py
index b7294ed..957eb11 100755
--- a/py/tests/cam.py
+++ b/py/tests/cam.py
@@ -9,11 +9,12 @@ import time
parser = argparse.ArgumentParser()
parser.add_argument("width", type=int)
parser.add_argument("height", type=int)
+parser.add_argument("fourcc", type=str, nargs="?", default="YUVY")
args = parser.parse_args()
w = args.width
h = args.height
-fmt = pykms.PixelFormat.YUYV
+fmt = pykms.fourcc_to_pixelformat(args.fourcc)
print("Capturing in {}x{}".format(w, h))