IP and USB camera synchronization

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

IP and USB camera synchronization

toniM
Hi all,

I am currently working on a project where I want to synchronize two cameras. The first one is an ip camera and the other is a usb webcam. For example using gst-launch I can see their streams with

1) gst-launch-1.0 -v souphttpsrc location=camera_uri ! jpegdec ! autovideoconvert ! autovideosink

2) gst-launch-1.0 v4l2src device=/dev/video0  !  videoparse format=GST_VIDEO_FORMAT_GRAY16_LE width=640 height=480 ! autovideoconvert ! autovideosink

my question is if I can somehow synchronize these cameras. In particular, my goal is  to find for each frame in the first camera, the frame in the second one that is most close in time.
In case synchronization is feasible, any hints/tips on how to proceed would be most helpful.

many thanks,
Toni

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

Re: IP and USB camera synchronization

Dimitrios Katsaros
You will need to share a network clock across the different devices. These links can get you started:

https://noraisin.net/diary/?p=954
https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples

Are you intending on transmitting the media to a common device to do the correlation? you will need to use a good network transmission format. rtpbin help you with that or matroska via tcp. Also, make sure you add a healthy amount of latency to your receiver app to ensure that there is a window to synchronize the media. It should roughly be more than the biggest latency amongst all the connections.

Dimitrios

On Mon, Jan 23, 2017 at 3:49 PM, Toni Matsablokos <[hidden email]> wrote:
Hi all,

I am currently working on a project where I want to synchronize two cameras. The first one is an ip camera and the other is a usb webcam. For example using gst-launch I can see their streams with

1) gst-launch-1.0 -v souphttpsrc location=camera_uri ! jpegdec ! autovideoconvert ! autovideosink

2) gst-launch-1.0 v4l2src device=/dev/video0  !  videoparse format=GST_VIDEO_FORMAT_GRAY16_LE width=640 height=480 ! autovideoconvert ! autovideosink

my question is if I can somehow synchronize these cameras. In particular, my goal is  to find for each frame in the first camera, the frame in the second one that is most close in time.
In case synchronization is feasible, any hints/tips on how to proceed would be most helpful.

many thanks,
Toni

_______________________________________________
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