This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GStreamer OMAP4 capture

Hi,

my problem is to capture sth from camera using GSreamer. I'm working on Linux  and OMAP4. In pre-build image I have a command to capture image:

#!/bin/sh
DISPLAY=:0 gst-launch --gst-debug-level=2 -e omx_camera device=0 do-timestamp=1 mode=0 nme=cam cam.src ! 
"video/x-raw-yuv, format=(fourcc)NV12, width=1280, height=720, framerate=24/1" !
queue ! avimux ! filesink location=foo1.avi t1. ! queue ! dri2videosink sync=fal

So If I undestand this It should capture video from omx_camera number=0 and save it as a foo1.avi. But it doesn't work. Error msg I get is:

(gst-launch-0.10:3579): GLib-GObject-CRITICAL **: Read/writable property 'exposure' on class 'GstOmxCamera' has type 'GstOmxCameraExposureControl' which is not exactly equal to the type 'guint' of the property on the interface 'GstPhotography'

No protocol specified
No protocol specified
0:00:00.356109667  3579  0x10692a0 ERROR                    omx gstomx_camera.c:1555:open_drm: Could not open display
Setting pipeline to PAUSED ...
No protocol specified
No protocol specified
0:00:00.380157518  3579  0x10692a0 ERROR          dri2videosink gstdri2util.c:178:gst_dri2context_new:<dri2videosink0> Failed to open X display
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...

So my questions are:
1. Is it problem with display and connection to it? (I have X running but I am connected to my board over serial, and don't have any physic displays.)

2. How to capture sth? :D (I try many different versions and variations of gst-launch line, but no effect). I guess gst is installed correctly becouse I can test it:

$ gst-launch-1.0 -v fakesrc silent=0 num-buffers=3 ! fakesink silent=0
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstFakeSrc:fakesrc0: last-message = "create   ******* (fakesrc0:src) (0 bytes, timestamp: none, duration: none, offset: 0, offset_end: -1, flags: 0 ) 0xb6002408"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "preroll   ******* "
Pipeline is PREROLLED ...
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event   ******* (fakesink0:sink) E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_BYTES, start=(gint64)0, stop=(gint64)-1, position=(gint64)0;) 0x1a5d198"
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstFakeSrc:fakesrc0: last-message = "event   ******* (fakesrc0:src) E (type: 289, GstEventLatency, latency=(guint64)0;) 0x1b84c08"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* (fakesink0:sink) (0 bytes, timestamp: 0:00:00.000000000, duration: none, offset: 0, offset_end: -1, flags: 32 discont ) 0xb6002408"
New clock: GstSystemClock
/GstPipeline:pipeline0/GstFakeSrc:fakesrc0: last-message = "create   ******* (fakesrc0:src) (0 bytes, timestamp: none, duration: none, offset: 1, offset_end: -1, flags: 0 ) 0xb6002470"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* (fakesink0:sink) (0 bytes, timestamp: 0:00:00.000000000, duration: none, offset: 1, offset_end: -1, flags: 0 ) 0xb6002470"
/GstPipeline:pipeline0/GstFakeSrc:fakesrc0: last-message = "create   ******* (fakesrc0:src) (0 bytes, timestamp: none, duration: none, offset: 2, offset_end: -1, flags: 0 ) 0xb60024d8"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* (fakesink0:sink) (0 bytes, timestamp: 0:00:00.000000000, duration: none, offset: 2, offset_end: -1, flags: 0 ) 0xb60024d8"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event   ******* (fakesink0:sink) E (type: 86, ) 0x1a5d198"
Got EOS from element "pipeline0".
Execution ended after 2441406 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

  • Hi,

    I am not an expert on GStreamer, but besides installed GST, you need to have all the necessary plugins:
    gst-plugins-base

    gst-plugins-good

    gst-plugins-bad

    gst-ducati

    You can also check the following articles, which may give you other ideas for debugging the issue:
    http://www.omappedia.com/wiki/Gstreamer_overview

    http://omappedia.org/wiki/Building_GStreamer

    user4006142 said:
    Is it problem with display and connection to it? (I have X running but I am connected to my board over serial, and don't have any physic displays.)

    I think this could cause a problem, can you try with HDMI display connected to your board?

    Best Regards,

    Yordan

  • Thx, for fast replay. The problem was not in gst, but in display configuration. I manage to repair this and now it is working :)
    Now I wander if it is possible to get signal after I capture 1 frame. My idea is to record continuously and in real time detect for example smile. I have written algorithms which detect smile from picture. Now I wander if a usage Gstreamer is good idea for me?