GESEffect seems incompatible with videorate

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

GESEffect seems incompatible with videorate

David Ing
Using gstreamer 1.16.1

My goal is to create a GESTimeline that contains a video clip which freezes on a single frame, or which plays back at a modified rate of speed.

So I make a GESEffect and attached it to my GESClip as follows.

GESEffect* gesRateEffect = ges_effect_new("videorate");

gobject::setDouble(reinterpret_cast<GObject*>(gesRateEffect), "max-rate", 0.0);
gobject::setDouble(reinterpret_cast<GObject*>(gesRateEffect), "rate", 0.0);
gobject::setBool(reinterpret_cast<GObject*>(gesRateEffect), "skip-to-first", true);

ges_container_add(
    reinterpret_cast<GESContainer*>(gesUriClip),
    reinterpret_cast<GESTimelineElement*>(gesRateEffect)
);


I build out the rest of my timeline and then I call `ges_timeline_save_to_uri`, and the clip gets serialized with an effect having different values.

<effect asset-id='videorate' clip-id='0' type-name='GESEffect' track-type='4' track-id='1' properties='properties, active=(boolean)true, track-type=(int)4;' metadatas='metadatas;' children-properties='properties, GstVideoRate::average-period=(guint64)0, GstVideoRate::drop-only=(boolean)false, GstVideoRate::max-duplication-time=(guint64)0, GstVideoRate::max-rate=(int)2147483647, GstVideoRate::new-pref=(double)1, GstBaseTransform::qos=(boolean)false, GstVideoRate::rate=(double)1, GstVideoRate::silent=(boolean)true, GstVideoRate::skip-to-first=(boolean)false;'>
</effect>

Even stranger, when I look at the *.dot files in my GST_DEBUG_DUMP_DOT_DIR, I don't see any evidence that this effect is being applied (not that I know what to look for).

Why is GES modifying my GESEffect?  Can I prevent it from doing this?

Is there a better way to achieve my goal?

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

Re: GESEffect seems incompatible with videorate

Thibault Saunier-4
Hello,

Have you tried using `videorate rate=0.0` outside GES? I am not sure it has been tested at all I have to say.

Also you should modify effects properties through the `ges_timeline_element_set_child_property` and friends API, `g_object_set` is not going to work the way you are using it here, and it explains why it didn't work.

Also, time effects is a complex matter in GES and we are almost ready to merge its support: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177! I have been reviewing the branch and playing with it lately and it is almost ready to get merged, it will be in for 1.18 in any case, `videorate` with a `rate` set is going to work well in that branch.

Regards,

- Thibault

On Tue, May 19, 2020 at 8:41 PM David Ing <[hidden email]> wrote:
Using gstreamer 1.16.1

My goal is to create a GESTimeline that contains a video clip which freezes on a single frame, or which plays back at a modified rate of speed.

So I make a GESEffect and attached it to my GESClip as follows.

GESEffect* gesRateEffect = ges_effect_new("videorate");

gobject::setDouble(reinterpret_cast<GObject*>(gesRateEffect), "max-rate", 0.0);
gobject::setDouble(reinterpret_cast<GObject*>(gesRateEffect), "rate", 0.0);
gobject::setBool(reinterpret_cast<GObject*>(gesRateEffect), "skip-to-first", true);

ges_container_add(
    reinterpret_cast<GESContainer*>(gesUriClip),
    reinterpret_cast<GESTimelineElement*>(gesRateEffect)
);


I build out the rest of my timeline and then I call `ges_timeline_save_to_uri`, and the clip gets serialized with an effect having different values.

<effect asset-id='videorate' clip-id='0' type-name='GESEffect' track-type='4' track-id='1' properties='properties, active=(boolean)true, track-type=(int)4;' metadatas='metadatas;' children-properties='properties, GstVideoRate::average-period=(guint64)0, GstVideoRate::drop-only=(boolean)false, GstVideoRate::max-duplication-time=(guint64)0, GstVideoRate::max-rate=(int)2147483647, GstVideoRate::new-pref=(double)1, GstBaseTransform::qos=(boolean)false, GstVideoRate::rate=(double)1, GstVideoRate::silent=(boolean)true, GstVideoRate::skip-to-first=(boolean)false;'>
</effect>

Even stranger, when I look at the *.dot files in my GST_DEBUG_DUMP_DOT_DIR, I don't see any evidence that this effect is being applied (not that I know what to look for).

Why is GES modifying my GESEffect?  Can I prevent it from doing this?

Is there a better way to achieve my goal?
_______________________________________________
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: GESEffect seems incompatible with videorate

David Ing
I have tried  `videorate rate=0.0` with an independent gst-launch-1.0 command, and it does work as you would expect.  I also tried specifying a rate of 0.01 with the GESEffect and I still see the problem.

I tried using `ges_timeline_element_set_child_property` and the pipeline just gets stuck when it tries to move into the PAUSED state.

I will use a workaround for the time being.  Glad to know that it is fixed in 1.18.

On Tue, May 19, 2020 at 9:05 PM Thibault Saunier <[hidden email]> wrote:
Hello,

Have you tried using `videorate rate=0.0` outside GES? I am not sure it has been tested at all I have to say.

Also you should modify effects properties through the `ges_timeline_element_set_child_property` and friends API, `g_object_set` is not going to work the way you are using it here, and it explains why it didn't work.

Also, time effects is a complex matter in GES and we are almost ready to merge its support: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/177! I have been reviewing the branch and playing with it lately and it is almost ready to get merged, it will be in for 1.18 in any case, `videorate` with a `rate` set is going to work well in that branch.

Regards,

- Thibault

On Tue, May 19, 2020 at 8:41 PM David Ing <[hidden email]> wrote:
Using gstreamer 1.16.1

My goal is to create a GESTimeline that contains a video clip which freezes on a single frame, or which plays back at a modified rate of speed.

So I make a GESEffect and attached it to my GESClip as follows.

GESEffect* gesRateEffect = ges_effect_new("videorate");

gobject::setDouble(reinterpret_cast<GObject*>(gesRateEffect), "max-rate", 0.0);
gobject::setDouble(reinterpret_cast<GObject*>(gesRateEffect), "rate", 0.0);
gobject::setBool(reinterpret_cast<GObject*>(gesRateEffect), "skip-to-first", true);

ges_container_add(
    reinterpret_cast<GESContainer*>(gesUriClip),
    reinterpret_cast<GESTimelineElement*>(gesRateEffect)
);


I build out the rest of my timeline and then I call `ges_timeline_save_to_uri`, and the clip gets serialized with an effect having different values.

<effect asset-id='videorate' clip-id='0' type-name='GESEffect' track-type='4' track-id='1' properties='properties, active=(boolean)true, track-type=(int)4;' metadatas='metadatas;' children-properties='properties, GstVideoRate::average-period=(guint64)0, GstVideoRate::drop-only=(boolean)false, GstVideoRate::max-duplication-time=(guint64)0, GstVideoRate::max-rate=(int)2147483647, GstVideoRate::new-pref=(double)1, GstBaseTransform::qos=(boolean)false, GstVideoRate::rate=(double)1, GstVideoRate::silent=(boolean)true, GstVideoRate::skip-to-first=(boolean)false;'>
</effect>

Even stranger, when I look at the *.dot files in my GST_DEBUG_DUMP_DOT_DIR, I don't see any evidence that this effect is being applied (not that I know what to look for).

Why is GES modifying my GESEffect?  Can I prevent it from doing this?

Is there a better way to achieve my goal?
_______________________________________________
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

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