<img src="http://root:pass@192.168.1.100/axis-cgi/mjpg/video.cgi?resolution=640x480&fps=5"> The browser will continuously reload the image because the server streams multipart content. However, not all browsers support this natively forever; some may timeout. For modern web apps, you can parse the MJPEG stream manually:
| Endpoint | Purpose | |----------|---------| | /axis-cgi/jpg/image.cgi | Single JPEG snapshot | | /axis-cgi/com/ptz.cgi | Pan, tilt, zoom control | | /axis-cgi/param.cgi | Read or set configuration | | /axis-cgi/io/port.cgi | Control digital I/O ports | | /axis-cgi/operator/search.cgi | Search recorded video | axis cgi mjpg
camera: - platform: generic name: Axis Front Door still_image_url: http://root:pass@192.168.1.100/axis-cgi/jpg/image.cgi stream_source: http://root:pass@192.168.1.100/axis-cgi/mjpg/video.cgi?resolution=640x480 When building a robot with a Raspberry Pi, fetching MJPEG frames via OpenCV is easier than decoding H.264. The low latency helps with real-time object detection. 3. Legacy SCADA and Control Rooms Older industrial monitoring systems (no WebRTC support) can display multiple Axis MJPEG streams in an HTML frame grid. 4. Debugging and Field Testing Technicians use /axis-cgi/mjpg/video.cgi to quickly verify camera focus, angle, and lighting without specialized software. Part 7: Beyond MJPEG – Other Useful Axis CGI Endpoints While MJPEG is king for streaming, check out these related Axis CGI endpoints: <img src="http://root:pass@192
const streamUrl = 'http://192.168.1.100/axis-cgi/mjpg/video.cgi'; const auth = btoa('root:pass'); fetch(streamUrl, headers: 'Authorization': Basic $auth ) .then(response => const reader = response.body.getReader(); let boundary = ''; let buffer = ''; The low latency helps with real-time object detection
while True: ret, frame = cap.read() if not ret: break cv2.imshow("Axis MJPEG Stream", frame) if cv2.waitKey(1) & 0xFF == ord('q'): break
| Parameter | Description | Example | |-----------|-------------|---------| | resolution | Width x Height | resolution=640x480 | | fps | Frames per second (camera max allowed) | fps=15 | | compression | JPEG quality (0-100, 100=best) | compression=30 | | camera | Select camera (for multi-sensor or PTZ) | camera=1 | | clock | Overlay timestamp | clock=1 | | text | Custom text overlay | text=My%20Stream | | date | Show date | date=1 | | quad | Apply quad view if supported | quad=1 | | rect | Crop region (x,y,w,h) | rect=100,100,400,300 | | rotation | Rotate image (0, 90, 180, 270) | rotation=90 | | mirror | Mirror image | mirror=1 | http://192.168.1.100/axis-cgi/mjpg/video.cgi?resolution=1280x720&fps=10&compression=25&clock=1&text=Front%20Door This will generate an MJPEG stream at 720p, 10 fps, medium compression, with a timestamp and custom text. Part 3: How to Consume the MJPEG Stream Method 1: HTML <img> Tag (Simplest) The most surprising fact: you can embed an Axis MJPEG stream directly in a web page using a static image tag.