After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743874 - Text overlay not working on fresh GES
Text overlay not working on fresh GES
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-editing-services
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-02 17:19 UTC by Kyrylo V. Polezhaiev
Modified: 2015-02-26 20:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Text overlaying example (2.39 KB, application/xml)
2015-02-26 14:59 UTC, Kyrylo V. Polezhaiev
Details
Text overlaying works (241.03 KB, image/svg+xml)
2015-02-26 15:00 UTC, Kyrylo V. Polezhaiev
Details
Text overlaying fails (274.20 KB, image/svg+xml)
2015-02-26 15:03 UTC, Kyrylo V. Polezhaiev
Details

Description Kyrylo V. Polezhaiev 2015-02-02 17:19:04 UTC
I switched from stock Ubuntu 14.10 GES to fresh GStreamer and GES from git master. I load timeline from .xges file and want to display a text over video using two <layer/> elements.

If I use older stable version I see text over video. In newer version I see just video on bottom layer (with priority 1). Text on upper layer (with priority 0) is invisible.

I found the following FIXME log message (appears on new GES, absent on old one):

 nlecomposition nle/nlecomposition.c:629:_initialize_stack_func:<nlecomposition35> PLEASE signal state change failure ASYNC
Comment 1 Thibault Saunier 2015-02-02 17:21:28 UTC
Could you please be more precise about what you exactly do? Sharing either a XGES file or you code.
Comment 2 Kyrylo V. Polezhaiev 2015-02-02 17:43:18 UTC
Hi, Thibault!

Thank you for your quick reply! Sure.

        ...
        project = ges_project_new(uri); /// URI of XGES file
        GESTimeline *timeline = GES_TIMELINE(ges_asset_extract(GES_ASSET(project), &error));
        if (error)
        ...
        /// I handle error here
        ...
        else
        {
            pipeline = ges_pipeline_new();
            ges_pipeline_set_timeline(pipeline, timeline);
            gchar *uri = g_strdup_printf("file://" RAMFS_PATH "t%" G_GUINT64_FORMAT ".webm", operation_identifier); /// Yet another URI: .webm file where output should be directed
            ges_pipeline_set_render_settings(pipeline, uri, GST_ENCODING_PROFILE(encoding_profile)); /// WebM with vp8 and Vorbis
            g_free(uri);
            ges_pipeline_set_mode(pipeline, GES_PIPELINE_MODE_RENDER);
            ...
            /// Here I attach some stuff to bus to handle errors, eos, etc.
            ...
            gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_PLAYING);
            ...

I use only one video file (file:///opt/cvd/audi.avi), raw uncompressed avi video, without sound. My XGES doesn't contain any encoding profile (cause I assign one manually):

<ges version='0.1'>
  <project properties='properties;' metadatas='metadatas;'>
    <encoding-profiles>
    </encoding-profiles>
    <ressources>
      <asset id='file:///opt/cvd/audi.avi' extractable-type-name='GESUriClip' properties='properties, supported-formats=(int)4, duration=(guint64)53760000000;' metadatas='metadatas;' />
      <asset id='diagonal-tr' extractable-type-name='GESTransitionClip' properties='properties;' metadatas='metadatas, description=(string)GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR;' />
      <asset id='GESTextOverlayClip' extractable-type-name='GESTextOverlayClip' properties='properties;' metadatas='metadatas;' />
    </ressources>
    <timeline properties='properties, auto-transition=(boolean)true, snapping-distance=(guint64)0;' metadatas='metadatas, duration=(guint64)3000000000;'>
      <track caps='video/x-raw' track-type='4' track-id='0' properties='properties, async-handling=(boolean)false, message-forward=(boolean)false, caps=(string)video/x-raw, restriction-caps=(string)"video/x-raw\,\ width\=\(int\)720\,\ height\=\(int\)576\,\ framerate\=\(fraction\)25/1";' metadatas='metadatas;'/>
      <track caps='audio/x-raw' track-type='2' track-id='1' properties='properties, async-handling=(boolean)false, message-forward=(boolean)false, caps=(string)audio/x-raw, restriction-caps=(string)"NULL";' metadatas='metadatas;'/>
      <layer priority='0' properties='properties, auto-transition=(boolean)true;' metadatas='metadatas, volume=(float)1;'>
        <clip id='3' asset-id='GESTextOverlayClip' type-name='GESTextOverlayClip' layer-priority='0' track-types='4' start='0000000000' duration='1000000000' inpoint='0' rate='0' properties='properties, name=(string)textoverlay0, text=(string)Just;' />
        <clip id='4' asset-id='GESTextOverlayClip' type-name='GESTextOverlayClip' layer-priority='0' track-types='4' start='1000000000' duration='1000000000' inpoint='0' rate='0' properties='properties, name=(string)textoverlay1, text=(string)Like;' />
        <clip id='5' asset-id='GESTextOverlayClip' type-name='GESTextOverlayClip' layer-priority='0' track-types='4' start='2000000000' duration='1000000000' inpoint='0' rate='0' properties='properties, name=(string)textoverlay2, text=(string)Cucumber;' />
      </layer>
      <layer priority='1' properties='properties, auto-transition=(boolean)true;' metadatas='metadatas, volume=(float)1;'>
        <clip id='0' asset-id='file:///opt/cvd/audi.avi' type-name='GESUriClip' layer-priority='1' track-types='4' start='0' duration='2000000000' inpoint='0' rate='0' properties='properties, name=(string)uriclip0, mute=(boolean)false, is-image=(boolean)false;' />
        <clip id='1' asset-id='diagonal-tr' type-name='GESTransitionClip' layer-priority='1' track-types='4' start='1000000000' duration='1000000000' inpoint='0' rate='0' properties='properties, name=(string)transitionclip0;' />
        <clip id='2' asset-id='file:///opt/cvd/audi.avi' type-name='GESUriClip' layer-priority='1' track-types='4' start='1000000000' duration='2000000000' inpoint='10000000000' rate='0' properties='properties, name=(string)uriclip1, mute=(boolean)false, is-image=(boolean)false;' >
        </clip>
      </layer>
    </timeline>
  </project>
</ges>
Comment 3 Kyrylo V. Polezhaiev 2015-02-26 14:59:03 UTC
Created attachment 297991 [details]
Text overlaying example
Comment 4 Kyrylo V. Polezhaiev 2015-02-26 15:00:16 UTC
Created attachment 297992 [details]
Text overlaying works

Pipeline on 1.4.5, correctly shows text overlay
Comment 5 Kyrylo V. Polezhaiev 2015-02-26 15:03:12 UTC
Created attachment 297993 [details]
Text overlaying fails

Pipeline using latest 1.5.x branch, fails to show textoverlay
Comment 6 Kyrylo V. Polezhaiev 2015-02-26 15:08:31 UTC
I think this can be related to porting GESPipeline to new NLE API
Comment 7 Tim-Philipp Müller 2015-02-26 20:19:54 UTC
This fixes it for me:

commit 80909fb99adee19af7de2170091f96d3f47cf3b0
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Thu Feb 26 20:14:31 2015 +0000

    ges-base-xml-formatter: fix property setting
    
    GstStructureForeachFunc has a gboolean return value,
    and the foreach function will stop unless we return
    TRUE here. This meant it was potluck whether all
    properties in the structure got set or not.
    
    Fixes setting of text overlay clip text property
    in particular.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743874