How to capture jpeg-pictures from a live video stream
Nicolas Dufresne
nicolas at ndufresne.ca
Wed Jun 20 15:44:16 UTC 2018
Le mardi 19 juin 2018 à 02:50 -0700, katariinaT a écrit :
> Hi! I'm working on a project where I'm supposed to capture jpeg-pictures from
> a live video stream. I've been reading and researching for some time now,
> but haven't found any useful guides.
> I'm using multiple IP-cameras, so the goal would be to capture a
> jpeg-picture from each camera for example every 10 seconds. Does anyone have
> aby good advice or idea how to implement or approach a problem like this?
This isn't much GStreamer specific. Some cameras have an HTTP capture
interface. So all you would have to do is wget <URI> (or similar) every
10s.
>
> At the moment I'm able to connect and stream video from multiple IP-cameras,
> but the rest is yet unsolved.
If instead you want to do that from RTSP streams, you could create a
playback pipeline, and every 10s, read the last-sample property of you
display sink. With gst_video_convert_sample() you'll be able to convert
it to JPEG. Another option would be to do that in your pipeline.
... ! decodebin ! videorate drop-only=1 ! video/x-raw,framerate=1/10 ! jpegenc ! multifilesink location="capture-%d.jpeg"
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180620/d9b7adfe/attachment.sig>
More information about the gstreamer-devel
mailing list