How to trigger a pipeline with a camera source to capture certain framerate using an external signal ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to trigger a pipeline with a camera source to capture certain framerate using an external signal ?

sk_gst
Hi,

I have successfully managed to stream video using imx6 and a camera, using
the Gstreamer-imx plugins.  Now for the next part, I want to trigger the
pipeline (video streaming), based on an external device.

For eg: Consider the following pipeline, where I am storing the video to a
file:

gst-launch-1.0 -v v4l2src device=/dev/video1 !
video/x-raw,width=100,height=50,framerate=30/1 ! filesink location=<xyz>

Now I have a custom device that is interfaced to imx6, which gives a set of
data at 60Hz, i.e 2 sets of data for each frame if camera is operating at
30fps. The custom device also has an external trigger signal, which I want
to use to trigger the camera so that the data from custom device and camera
are in sync.
i.e.  at time t1 -> custom device has data  D1 and D2
       at time ~t1 ->  custom device triggers camera which captures the
frame F1.
After this, I can relate data D1 and D2 with the frame F1 which I further
use at the receiving side.

Now I want to have this relation between the external device and the camera
throughout the streaming time.  

My question is :
1. How do I get the external device trigger the pipeline to start capturing?  
The 'v4l2src' has a property called 'extra-controls'. however I could not
find much information on using this property. Can this property be used to
control the camera capture?

2. I know that the GStreamer gives  timestamp related tools, but its with
respect to the pipeline. The other way around is also acceptable where the
camera triggers the external device based on the timestamp, so I have F1 D1
D2.  How can this trigger be achieved using Gstreamer?

3. To maintain a constant sync, is it a good idea to constantly check for
the trigger or just check for the trigger for the first time and then only
focus on video capture?

Regards



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to trigger a pipeline with a camera source to capture certain framerate using an external signal ?

Felipe C. Gehrke
Hi,

What about to watch lsusb periodically and filter for your device ?

On Wed, Jul 18, 2018 at 8:51 AM, vk_gst <[hidden email]> wrote:
Hi, I have successfully managed to stream video using imx6 and a camera, using the Gstreamer-imx plugins. Now for the next part, I want to trigger the pipeline (video streaming), based on an external device. For eg: Consider the following pipeline, where I am storing the video to a file: gst-launch-1.0 -v v4l2src device=/dev/video1 ! video/x-raw,width=100,height=50,framerate=30/1 ! filesink location=<xyz> Now I have a custom device that is interfaced to imx6, which gives a set of data at 60Hz, i.e 2 sets of data for each frame if camera is operating at 30fps. The custom device also has an external trigger signal, which I want to use to trigger the camera so that the data from custom device and camera are in sync. i.e. at time t1 -> custom device has data D1 and D2 at time ~t1 -> custom device triggers camera which captures the frame F1. After this, I can relate data D1 and D2 with the frame F1 which I further use at the receiving side. Now I want to have this relation between the external device and the camera throughout the streaming time. My question is : 1. How do I get the external device trigger the pipeline to start capturing? The 'v4l2src' has a property called 'extra-controls'. however I could not find much information on using this property. Can this property be used to control the camera capture? 2. I know that the GStreamer gives timestamp related tools, but its with respect to the pipeline. The other way around is also acceptable where the camera triggers the external device based on the timestamp, so I have F1 D1 D2. How can this trigger be achieved using Gstreamer? 3. To maintain a constant sync, is it a good idea to constantly check for the trigger or just check for the trigger for the first time and then only focus on video capture? Regards -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to trigger a pipeline with a camera source to capture certain framerate using an external signal ?

sk_gst
Could you explain this a bit more? I do not get the point here.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to trigger a pipeline with a camera source to capture certain framerate using an external signal ?

sk_gst
In reply to this post by sk_gst
correction to the post :

gst-launch-1.0 -v imxv4l2videosrc device=/dev/video1 !
video/x-raw,width=100,height=50,framerate=30/1 ! filesink location=<xyz>



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel