On-the-Fly Image Conversion

CameraProxy can open most IP cameras via the jpg, mjpg, and vlc_transcode camera types. Regardless of which of these camera types you choose, CameraProxy makes the video available in JPEG, WebP, PNG, and M-JPEG formats. (you can also request an mjpeg stream with WebP or PNG encoding, by using advanced encoding parameters)

Standard output formats

JPEG snapshots (supported by practically any web browser)

WebP snapshots (supported by Google Chrome)

PNG snapshots (supported by practically any web browser)

M-JPEG stream. Supported by most modern web browsers. M-JPEG streams one jpeg image after another in the same connection, providing a better frame rate at the cost of higher bandwidth usage.

Advanced Encoding

You can add URL parameters to the JPEG and M-JPEG URLs to modify the image encoding.

size - [1-100] Default Value: 100
Change the size of the image to a percentage of its original size.

quality - [1-100] Default Value: 80
Change the encoding quality of the image. Applies to JPEG and WebP output formats.

format - {"jpg", "webp", "png"} Default Value: "jpg"
Encode the image in a new format. Overrides the image format that would have been used otherwise.

rotate - {-270, -180, -90, 0, 90, 180, 270} Default Value: 0
Rotate the image in 90 degree increments.

maxwidth and maxheight - Default Value: 0
Shrink image if necessary to make it fit in a rectangle with the dimensions maxwidth x maxheight. Preserves aspect ratio. Both parameters must be set greater than 0 for either of them to be considered.

special - {"", "red"} Default Value: ""
A parameter reserved for testing. Currently, if you pass "red" as the value it will turn the image red.

Advanced Encoding Examples










The most efficient way to request images is to request them as jpg or mjpg without using any of the advanced formatting parameters. This allows the image encoding step to be skipped entirely for jpg and mjpg camera types, resulting in minimal CPU usage.

PNG encoding is not recommended, as it greatly increases bandwidth usage.

WebP encoding uses more CPU time on the server than JPEG encoding, but has the benefit of better image quality and bandwidth usage.

Last edited Apr 15 at 4:03 PM by bp2008, version 2