Configure channel defaults
This guide shows you how to set default resolution and frames per second (FPS) for a video channel. Setting defaults makes stream sharing easier because multiple clients can share a stream without needing to specify the same options each time.
Prerequisites
You need:
- An Axis camera:
<ip>to replace in commands - Camera user credentials with operator or administrator privileges:
<user>and<pass>to replace in commands ffplayandcurl
How to configure the default resolution
Check current default resolution
Read the current default resolution for the first channel (I0):
curl -s --anyauth -u '<user>:<pass>' "http://<ip>/axis-cgi/param.cgi?action=list&group=Image.I0.Appearance.Resolution"
Example output:
Image.I0.Appearance.Resolution=1920x1080
Check available resolutions
Read the available resolutions. Replace I0 with the channel index and JPEG with the codec:
curl -s --anyauth -u '<user>:<pass>' "http://<ip>/axis-cgi/param.cgi?action=list&group=Properties.Image.I0.JPEG.Resolution"
Example output:
Properties.Image.I0.JPEG.Resolution=1920x1080,1280x720,1024x768,1024x640,800x600,640x480,640x400,640x360,480x360
Update the default resolution
Set the default resolution of the first channel to 480x360:
curl -s --anyauth -u '<user>:<pass>' "http://<ip>/axis-cgi/param.cgi?action=update&Image.I0.Appearance.Resolution=480x360"
This returns OK.
Override the default per request
You can override the default for a specific stream by appending resolution to the URL:
ffplay -rtsp_transport http "rtsp://<user>:<pass>@<ip>/axis-media/media.amp?camera=1&resolution=1920x1080"
How to configure the default FPS
Check current default FPS
The default FPS is controlled by Image.I0.Stream.FPS. A value of 0 means no limit:
curl -s --anyauth -u '<user>:<pass>' "http://<ip>/axis-cgi/param.cgi?action=list&group=Image.I0.Stream.FPS"
Example output:
Image.I0.Stream.FPS=0
Update the default FPS
Set the default FPS to 15:
curl -s --anyauth -u '<user>:<pass>' "http://<ip>/axis-cgi/param.cgi?action=update&Image.I0.Stream.FPS=15"
This returns OK.
Override FPS per request
Override the default FPS for a specific stream. The value also accepts fractions:
ffplay -rtsp_transport http "rtsp://<user>:<pass>@<ip>/axis-media/media.amp?camera=1&fps=25/2"