One frame per minute. How?

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

One frame per minute. How?

Serhiy Stetskovych
Hello all,
I want to implement creating of thumbnails from video every minute, but videorate element doesn't support fps less than 1.Is it possible to do that in gstreamer and how? 

Thank you

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

Re: One frame per minute. How?

Tim-Philipp Müller-2
On Mon, 2013-09-16 at 18:18 +0300, Serhiy Stetskovych wrote:

Hi,

> I want to implement creating of thumbnails from video every minute,
> but videorate element doesn't support fps less than 1.Is it possible
> to do that in gstreamer and how?

gst-launch-1.0 videotestsrc ! video/x-raw,framerate=25/1 ! videorate !
video/x-raw,framerate=1/5 ! ximagesink

works fine for me?

Cheers
 -Tim


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

Re: One frame per minute. How?

Serhiy Stetskovych
Thank you,  but It works only in gstreamer 1.0 but not in 0.10, and I am  using  python bindings which are available only for 0.10.
Or I am wrong?


2013/9/17 Tim-Philipp Müller <[hidden email]>
On Mon, 2013-09-16 at 18:18 +0300, Serhiy Stetskovych wrote:

Hi,

> I want to implement creating of thumbnails from video every minute,
> but videorate element doesn't support fps less than 1.Is it possible
> to do that in gstreamer and how?

gst-launch-1.0 videotestsrc ! video/x-raw,framerate=25/1 ! videorate !
video/x-raw,framerate=1/5 ! ximagesink

works fine for me?

Cheers
 -Tim


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


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

Tr : One frame per minute. How?

nar6du14
no, there exist PyGobject  python introspection available for use Gtk3 and gstreamer-1.0 together note that Gstreamer could only be used with
Gtk+3

here are some link:

install it via synaptic on linux

for windows there is a port I tried the 2 (linux and windows version of pygobject) . link to windows port   https://code.google.com/p/osspack32/downloads/detail?name=pygi-aio-3.4.2rev11.7z&can=2&q=/ 


get some look at:  http://python-gtk-3-tutorial.readthedocs.org


a good starting point to learn the PyGOject  binding for Gtk+3  particularly on "signal" and loop section!!!


the following link is very very usefull when using gstreamer-1.0   https://wiki.ubuntu.com/Novacut/GStreamer1.0


for the rest you can google them.


the PyGObject site is:

https://wiki.gnome.org/PyGObject



hope that will help you :)


----- Mail transféré -----
De : Serhiy Stetskovych <[hidden email]>
À : Discussion of the development of and with GStreamer <[hidden email]>
Envoyé le : Mardi 17 septembre 2013 14h31
Objet : Re: One frame per minute. How?

Thank you,  but It works only in gstreamer 1.0 but not in 0.10, and I am  using  python bindings which are available only for 0.10.
Or I am wrong?


2013/9/17 Tim-Philipp Müller <[hidden email]>
On Mon, 2013-09-16 at 18:18 +0300, Serhiy Stetskovych wrote:

Hi,

> I want to implement creating of thumbnails from video every minute,
> but videorate element doesn't support fps less than 1.Is it possible
> to do that in gstreamer and how?

gst-launch-1.0 videotestsrc ! video/x-raw,framerate=25/1 ! videorate !
video/x-raw,framerate=1/5 ! ximagesink

works fine for me?

Cheers
 -Tim


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



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

Re: One frame per minute. How?

Tim-Philipp Müller-2
In reply to this post by Serhiy Stetskovych
On Tue, 2013-09-17 at 17:31 +0300, Serhiy Stetskovych wrote:

Hi,

> Thank you,  but It works only in gstreamer 1.0 but not in 0.10, and I
> am  using  python bindings which are available only for 0.10.
> Or I am wrong?

gst-launch-0.10 videotestsrc ! video/x-raw-rgb,framerate=25/1 !
videorate ! video/x-raw-rgb,framerate=1/5 ! ximagesink

works fine in 0.10 too.

There are python bindings for both 0.10 and 1.0, but they're slightly
different. In 1.0 you need to use the pygi bindings, in 0.10 the pygst
bindings.

https://wiki.ubuntu.com/Novacut/GStreamer1.0 shows some of the
differences.

Anyway, what you want to do with videorate should work fine in both
versions.

 Cheers
  -Tim

> 2013/9/17 Tim-Philipp Müller <[hidden email]>
>         On Mon, 2013-09-16 at 18:18 +0300, Serhiy Stetskovych wrote:
>        
>         Hi,
>        
>         > I want to implement creating of thumbnails from video every
>         minute,
>         > but videorate element doesn't support fps less than 1.Is it
>         possible
>         > to do that in gstreamer and how?
>        
>        
>         gst-launch-1.0 videotestsrc ! video/x-raw,framerate=25/1 !
>         videorate !
>         video/x-raw,framerate=1/5 ! ximagesink
>        
>         works fine for me?
>        
>         Cheers
>          -Tim
>        
>        
>         _______________________________________________
>         gstreamer-devel mailing list
>         [hidden email]
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>        
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


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

Re: One frame per minute. How?

Marc Olzheim
On Tue, Sep 17, 2013 at 10:07:21PM +0100, Tim-Philipp M?ller wrote:

> > Thank you,  but It works only in gstreamer 1.0 but not in 0.10, and I
> > am  using  python bindings which are available only for 0.10.
> > Or I am wrong?
>
> gst-launch-0.10 videotestsrc ! video/x-raw-rgb,framerate=25/1 !
> videorate ! video/x-raw-rgb,framerate=1/5 ! ximagesink
>
> works fine in 0.10 too.
>
> There are python bindings for both 0.10 and 1.0, but they're slightly
> different. In 1.0 you need to use the pygi bindings, in 0.10 the pygst
> bindings.
>
> https://wiki.ubuntu.com/Novacut/GStreamer1.0 shows some of the
> differences.
>
> Anyway, what you want to do with videorate should work fine in both
> versions.

Do note that the GstFraction type (as used for the framerate) is not
supported in pygi. Using capabilities in string form like in the example
should probably circumvent that issues though.

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

Re: One frame per minute. How?

Serhiy Stetskovych
Thank you, 
l think I will rewrite code to C.  Thank you all.


2013/9/18 Marc Olzheim <[hidden email]>
On Tue, Sep 17, 2013 at 10:07:21PM +0100, Tim-Philipp M?ller wrote:
> > Thank you,  but It works only in gstreamer 1.0 but not in 0.10, and I
> > am  using  python bindings which are available only for 0.10.
> > Or I am wrong?
>
> gst-launch-0.10 videotestsrc ! video/x-raw-rgb,framerate=25/1 !
> videorate ! video/x-raw-rgb,framerate=1/5 ! ximagesink
>
> works fine in 0.10 too.
>
> There are python bindings for both 0.10 and 1.0, but they're slightly
> different. In 1.0 you need to use the pygi bindings, in 0.10 the pygst
> bindings.
>
> https://wiki.ubuntu.com/Novacut/GStreamer1.0 shows some of the
> differences.
>
> Anyway, what you want to do with videorate should work fine in both
> versions.

Do note that the GstFraction type (as used for the framerate) is not
supported in pygi. Using capabilities in string form like in the example
should probably circumvent that issues though.

Marc
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


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

Re: One frame per minute. How?

junxu94
In reply to this post by Tim-Philipp Müller-2
Hi, Tim, I am in the same position as to need to get image every minute and saw your very helpful post. I tried the command line and verified it is working. But how to convert this command line to gstreamer program? Specifically don't "video/x-raw,framerate=25/1" belong to some gstreamer element? What is the element to carry this attributes? Hope you can still read this message even though the original thread was more than 2 years old. Thanks, Jun
Reply | Threaded
Open this post in threaded view
|

Re: One frame per minute. How?

junxu94
gst-inspect-1.0 videorate showed Pad Templates Capability include Video/x-raw for both sink and src.  For gstreamer programming, I guess it is the PadTemplateCapability need to be configured for "framerate", right?

Thanks,
Jun
Reply | Threaded
Open this post in threaded view
|

Re: One frame per minute. How?

Tim Müller
On Thu, 2016-04-14 at 17:32 -0700, junxu94 wrote:

Hi,

> gst-inspect-1.0 videorate showed Pad Templates Capability include
> Video/x-raw
> for both sink and src.  For gstreamer programming, I guess it is the
> PadTemplateCapability need to be configured for "framerate", right?

The framerate is usually only indicative in GStreamer, what really
matters is the timestamps and the segment event.

If you get one frame per second (did you mean minute or second?) that
usually indicates that something is wrong with the latency
configuration of the pipeline (e.g. some element doesn't report its
latency or drops the latency query), and frames are arriving too late
at the sink. It could also be that the system is just not fast enough.

Try if it works with sync=false set on the videosink.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com


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

Re: One frame per minute. How?

Tim Müller
On Fri, 2016-04-15 at 08:45 +0100, Tim Müller wrote:

Following up to myself - I seem to have missed some context because it
never made it to the mailing list:

> Hi, Tim, I am in the same position as to need to get image every
> minute and saw your very helpful post. I tried the command line and
> verified it is working. But how to convert this command line to
> gstreamer program? Specifically don't "video/x-raw,framerate=25/1"
> belong to some gstreamer element? What is the element to carry this
> attributes? Hope you can still read this message even though the
> original thread was more than 2 years old. Thanks, Jun 


The .. ! video/x-raw,framerate=25/1 ! ...  bit is a shortcut notation
for a capsfilter element. In an application you can do

 capsfilter = gst_element_factory_make ("capsfilter", NULL);
 caps = gst_caps_new_from_string ("video/x-raw, framerate=25/1");
 g_object_set (capsfilter, "caps", caps, NULL);
 gst_caps_unref (caps);

One frame per minute would be framerate=1/60 I suppose.

 Cheers
  -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com


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

Re: One frame per minute. How?

junxu94
Yes, I get it that it is the capsfilter with these attributes, so I did use "gst_element_factory_make ("capsfilter", NULL)" to program and get the 1 image per minute.  Thanks a lot, Tim
Jun