import uvicorn from vidgear.gears.asyncio import WebGear # various performance tweaks options = { "frame_size_reduction": 30, "jpeg_compression_quality": 80, "jpeg_compression_fastdct": True, "jpeg_compression_fastupsample": False, "framerate": 30, "resolution": (1280, 1080) } testUrl = '/Users/gemer/Desktop/test.mkv' # initialize WebGear app web = WebGear(source=testUrl, logging=True, **options) # run this app on Uvicorn server at address http://localhost:8000/ uvicorn.run(web(), host="localhost", port=8000) # close app safely web.shutdown()