On Raspberry Pi I run a client program written in Python. It communicates over tcp messages with the server. When the appropriate command comes from the server, the program starts the video transmission:
subprocess.check_call(['/home/pi/to_janus.sh'],shell = True)
While I start the client manually, video by command from the server is started. But if I set the start of client to rc.local
, I get the following error messages, when the command comes from the server:
(gst-plugin-scanner:839): GLib-GObject-WARNING **: cannot register existing type 'GstOMXAudioSink'
(gst-plugin-scanner:839): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(gst-plugin-scanner:839): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
(gst-plugin-scanner:839): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed
(gst-plugin-scanner:839): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
(The same messages I get if I try to run the video directly via rc.local
).
At the same time, the client successfully exchanges messages, and the result does not depend on how quickly the command to start transmitting video comes.
I don't understand how the system knows that I started the client not manually, but through rc.local
. And what I have to do to be able to work without manual loading.
to_janus.sh:
gst-launch-1.0 v4l2src ! image/jpeg,width=1280,height=480,framerate=20/1 ! jpegdec ! videoflip method=rotate-180 ! omxh264enc target-bitrate=1000000 control-rate=variable ! rtph264pay ! udpsink host=192.168.1.2 port=8004 sync=false