I’m trying to run a python app that uses omxh264enc, but I receive this error when I try to initiate the plugin:
0:00:23.812035601 18170 0xda0390 WARN omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/nvidia/.config:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
The python code is:
def start_record(self):
# Filename (current time)
filename = datetime.now().strftime("%Y-%m-%d_%H.%M.%S") + ".mp4"
print(filename)
# record pipe line
# t. ! omxh264enc bitrate=10000000 ! h264parse ! mp4mux ! filesink location=test.mp4 -e
self.rec_pipeline = Gst.Pipeline.new("rec_pipe")
self.queue_rec = Gst.ElementFactory.make("queue", "queueRec")
self.rec_pipeline.add(self.queue_rec)
h264enc = Gst.ElementFactory.make("omxh264enc", "h264enc")
h264enc.set_property("bitrate", 10000000)
self.rec_pipeline.add(h264enc)
h264parse = Gst.ElementFactory.make("h264parse")
self.rec_pipeline.add(h264parse)
mp4mux = Gst.ElementFactory.make("mp4mux")
self.rec_pipeline.add(mp4mux)
filesink = Gst.ElementFactory.make("filesink")
filesink.set_property("location", filename)
self.rec_pipeline.add(filesink)
self.queue_rec.link(h264enc)
h264enc.link(h264parse)
h264parse.link(mp4mux)
mp4mux.link(filesink)
self.pipeline.add(self.rec_pipeline)
self.pipeline.get_by_name("teeMix").link(self.rec_pipeline)
self.rec_pipeline.set_state(Gst.State.PLAYING)
Anyone knows how I specific this configuration file?
Thanks