From 6b98756de659fe43d550d0d95d298dd1777dfebb Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Sat, 12 Sep 2020 00:32:27 +0800 Subject: [PATCH] make-xges: set xges project name from bbb metadata --- make-xges.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/make-xges.py b/make-xges.py index aaa2ae6..f71ec6a 100755 --- a/make-xges.py +++ b/make-xges.py @@ -35,6 +35,7 @@ def __init__(self, opts): # Construct the presentation self.set_track_caps() + self.set_project_metadata() self.add_webcams() self.add_slides() self.add_deskshare() @@ -123,7 +124,7 @@ def set_track_caps(self): # Add an encoding profile for the benefit of Pitivi profile = GstPbutils.EncodingContainerProfile.new( 'MP4', 'bbb-render encoding profile', - Gst.Caps.from_string('video/quicktime, variant=(string)iso')) + Gst.Caps.from_string('video/quicktime,variant=iso')) profile.add_profile(GstPbutils.EncodingVideoProfile.new( Gst.Caps.from_string('video/x-h264,profile=high'), None, self.video_track.props.restriction_caps, 0)) @@ -132,6 +133,12 @@ def set_track_caps(self): None, self.audio_track.props.restriction_caps, 0)) self.project.add_encoding_profile(profile) + def set_project_metadata(self): + doc = ET.parse(os.path.join(self.opts.basedir, 'metadata.xml')) + name = doc.find('./meta/name') + self.project.register_meta_string( + GES.MetaFlag.READWRITE, 'name', name.text.strip()) + def add_webcams(self): layer = self._add_layer('Camera') asset = self._get_asset(