vivoe mibs.conf configuration file - Openwide-Ingenierie/openvivoe GitHub Wiki
#Behaviour This configuration file follows the rules of the GLib's key files. It uses groups and keys to define a set of parameters the will be used by openvivoe. Groups are defined using brackets, key are defined by their name, first word of a line, which precede a '='. As a example we have:
[Group_name]
key_1=foo
key_2=bar
key_3=foo,bar
This is a group named "Group_name", containing 3 keys: "key_1", "key_2", "key_3" whith the corresponding value foo, bar and the list {foo,bar}.
#Utility for OpenVivoe This file has to major functions: it is used to initiate the content of the device's MIB, and to configuration the device's sources and receivers.
Configure device's MIB
As you should know now, openvivoe uses SNMPv2 prtocol to control the streams. This protocol questions a data base named Management Information Base (MIB). In our case it will be filled by this configuration file. You can have a preview of openvivoe's MIB content here.
First group is [device_info], this will be used to fill the entry Deviceinfo of the MIB. You should set the appropriate value of the key you found in this group. Besides, a comment indicates you which keys are "optional" or "mandatory", you may leave optional value blank, but if you do so with mandatory parameters, an error will occur.
An important key in this group is ethernetInterface
this is a semi-colon separated list, that list all interfaces openvivoe will use. However, net-snmp deamon can only run on one interface. This interface will be defined as the primary interface, others will be secondaries. This is important because it will define the multicast IP addresses you will use to send and receive your streams.
How are multicast addresses computed?
The scheme to compute the multicast addresses on which stream is the following:
- The first two bytes of this address are constant:
239.192
- Then follows a byte which is the channel ID of your stream: each stream is send and receive through a channel. A channel can send a stream if it is a videoChannel, or receive a stream if it is a serviceUser. In both cases the channel is completely defined by its ID: a number included between 1 and 255. You can see all channel defined on the device by displaying the channel Table.
- Last byte of the IP address will be the last byte of the interface's IP address.
As an example: if you launch a stream on channel 2 through on interface of IP :
10.5.10.119
. The multicast IP of the stream will be :239.192.2.119
.
Configure sources and receivers
As you may have seen in the configuration file other groups in vivoe-mib.conf file are [source_x]
and [receiver_x]
. This will be used to configure source (videoChannel) and receiver (serviceUser) on your device.
Configure sources
Sources' groups have two keys: one to describe the channel channelUserDesc
, and one to configure the Gstreamer pipeline it should used to retrieve the video. As an example if you simply want openvivoe to get the video from the webcam connected to your device, and encode it to MPEG-4 simply set gst_source
to :
gst_source=v4l2src device=/dev/video ! avenc_mpeg4
Configure receivers
As sources, receivers only have to keys. The first one defaultReceiveIP
is used to set the multicast address that the device should start listening right after start-up. The second one gst_sink
is used to specify the Gstreamer command line to use to sink the received stream. As an example, if you want your device to listen to 239.192.1.119
on start-up and display the stream on a connected stream, you can simply set gst_sink
to :
gst_sink=xvimagesink
If you receive an encoding stream on the device, you should decode it before displaying it ( wiith JPEG2000 for example):
gst_sink=openjpegdec ! xvimagesink
Where to put this file
The searching directories where OpenVivoe looks for this configuration file are:
.
the working directory./conf
the conf folder which should be found from the root of OpenVivoe's clone directory
You can fulfill the list of path where OpenVivoe looks for configuration file by modifying the source code in src/conf/vivoe-mib.conf.