User’s Manual v.15
QVidium
®
H.264 HD Video Codecs
™
Copyright 2011-2014 QVidium
®
Technologies, Inc.
Page 31 of 71
4.2.1 URL Control
There are 2 URLs, one to get the current video bitrate and a second url to set the video bitrate.
These URLs return plain text (no HTML) to simplify parsing. The "
Encoder->Bitrate
" link in the
web UI allows you to set the video bitrate with a browser.
/cgi-bin/encoder_bitrate2.cgi
: Gets the current video bitrate. Returns
VIDEO_BITRATE=xxxxxxx, where xxxxxxx is the current bitrate.
/cgi-bin/encoder_bitrate2.cgi?VIDEO_BITRATE=xxxxxxx
: Sets the video bitrate where xxxxxxx
is the desired bitrate. Returns VIDEO_BITRATE=xxxxxxx where xxxxxxx is the bitrate that was
set. The maximum video bitrate is 25000000.
Examples of using the wget command. The initial bitrate was 23Mbps.
$ wget -q -O -
http://root:[email protected]/cgi-bin/encoder_bitrate2.cgi
VIDEO_BITRATE=23000000
$ wget -q -O -
http://root:[email protected]/cgi-bin/encoder_bitrate2.cgi?VIDEO_BITRATE=9000000
VIDEO_BITRATE=9000000
$ wget -q -O -
http://root:[email protected]/cgi-bin/encoder_bitrate2.cgi
VIDEO_BITRATE=9000000
$ wget -q -O -
http://root:[email protected]/cgi-bin/encoder_bitrate2.cgi?VIDEO_BITRATE=500000000
VIDEO_BITRATE=25000000
4.2.2 Command-line Control
The program, /qvidium/qvctrl, allows you to communicate with the encoder via a command-line
interface, such as
telnet
,
ssh
, or the RS-232 Console port. This allows you to dynamically and
seamlessly change the encoding bitrate and format, while the encoder is running.
The first argument is always /dev/qvencode1, The second argument is "get_videobitrate" or
"set_videobitrate BITRATE"
, or “set_outputformat FORMAT”. Here BITRATE is the desired new
bitrate, in bits per second. The maximum bitrate is 30000000 (30 Mbps, UDP only). FORMAT is
one of:
1080i59.94|1080i50|720p59.94|720p50|480i59.94|576i50|240p30
. The
set_videobitrate command always returns VIDEO_BITRATE=xxxxxxx where xxxxxx is the current
bitrate. The set_outputformat command always returns OUTPUT_FORMAT=YYYxZZZ, where
YYYxZZZ is the new video format. Here are some examples:
[QVPRO.qvidium.com]$ /qvidium/qvctrl /dev/qvencode1 "get_videobitrate"
VIDEO_BITRATE=4000000
[QVPRO.qvidium.com]$ /qvidium/qvctrl /dev/qvencode1 "set_videobitrate 2000000"
VIDEO_BITRATE=2000000
[QVPRO.qvidium.com]$ /qvidium/qvctrl /dev/qvencode1 "set_videobitrate 8000000"
VIDEO_BITRATE=8000000
[QVPRO.qvidium.com]$ /qvidium/qvctrl /dev/qvencode1 'set_outputformat 480i59.94'
OUTPUT_FORMAT=720x480i30
[QVPRO.qvidium.com]$ /qvidium/qvctrl /dev/qvencode1 'set_outputformat 1080i59.94'
OUTPUT_FORMAT=1920x1080i30
[QVPRO.qvidium.com]$ /qvidium/qvctrl /dev/qvencode1 'set_outputformat 240p30'
OUTPUT_FORMAT=352x240p30