CamStreamer App functionality can be controlled using API once the application is installed and licensed. There are several parameters described below.
Read more about API licensing here
Global Parameters
http://IPADDR[:PORT]/axis-cgi/param.cgi?action=update&Netrexcamstreamer.PARAMNAME=PARAMVALUE
where
IPADDR[:PORT]
is an IP address:port of the camera. E.g. 192.168.1.5
PARAMNAME
is a name of any parameter listed below.PARAMVALUE
is a value you'd like to save to CamStreamer App. Special characters in the value has to be urlencoded. See URL encoding
Mind that CamStreamer App/stream is restarted every time any parameter is changed.
Parameter Enabled
Stop or start the stream using parameter "Enabled". Valid values: 0
, 1
Parameter MediaServerUrl
Valid values (for selected protocol):
- RTMP
rtmp://[user:pass@]server:port[/app][/stream_name]
- MPEG-TS TCP
tcp://server:port
- MPEG-TS UDP
udp://server:port[?pkt_size=XXX&ttl=XXX]
You can stop or start the stream using parameter "Enabled". Valid values: 0
, 1
Parameter UserVapixParameters
Overwrite the default video parameters. See parameter description. You can e.g. choose different camera or View Area using parameter camera=2&resolution=1280x720&overlaypos=200%2C600
.
Parameter AudioSource
Specify audio channel. Available values:
none
disable audio channel.default
Use the audio channel from the camera (e.g. mic./line input).file: FILEPATH
use an audio file FILEPATH (mka/mp3) on the file system on the camera (e.g. SD card).url: URL
use an external (network) audio source (codec AAC or MP3). E.g. internet radio, another camera or Axis P8221 audio encoder. For Axis device: rtsp://root:password@IPaddress/axis-media/media.amp?audio=1&video=0 Use audio sample rate 44.1KHz and bitrate 128Kbps. CamStreamer App is not streaming once the external audio is not available.
Parameter AVSyncMsec
Time offset for audio/video channel in milliseconds.
Parameter LiveLED
Enable LED light indication on the camera. The light is ON if the stream is established. The light is off once the CamStreamer App is not able to broadcast the video. Valid values: 0
, 1
API example
You can configure CamStreamer App to start/stop the stream based on an Action rules (Setup > Events):
- Create a HTTP recipient - url:
http://127.0.0.1/axis-cgi/param.cgi
and fill in the user name / password (valid root access to your camera). - Create two schedules (to start and to stop the video).
- Create an action rule to start CamStreamer App. The action should be the HTTP recipient + parameters:
action=update
Netrexcamstreamer.Enabled=1
- Create an action rule to stop CamStreamer App. The action should be the HTTP recipient + parameters:
action=update
Netrexcamstreamer.Enabled=0
Get current YouTube Live broadcast
Redirect your viewers to the current broadcast.
https://camstreamer.com/yt-broadcast-api/SECTOKEN/CSID
where SECTOKEN and CSID are used in "Permanent link" in CamStreamer App user interface. Mind that the SECTOKEN is changed once you use a different YouTube channel.
Example:
https://camstreamer.com/yt-broadcast-api/b7133489237eee1/S-78
Response:
{"broadcast_id":"XCIfaGvbXSs"}