[pitivi/1.0] Use proper default project and rendering settings
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/1.0] Use proper default project and rendering settings
- Date: Mon, 20 May 2019 17:55:30 +0000 (UTC)
commit a75b7e335f847242119f40587a15f79c373e90aa
Author: Thibault Saunier <tsaunier igalia com>
Date: Thu May 16 19:20:55 2019 -0400
Use proper default project and rendering settings
Default to vp8+vorbis in webm 1080p@30fps and 48kz.
Fixes https://gitlab.gnome.org/GNOME/pitivi/issues/2322
pitivi/project.py | 12 ++++++++----
pitivi/render.py | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index 8fb127a4..7674fee1 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -80,6 +80,8 @@ for i in range(2, GLib.MAXINT):
# Properties of encoders that should be ignored when saving/loading
# a project.
IGNORED_PROPS = ["name", "parent"]
+DEFAULT_VIDEO_SETTINGS = "video/x-raw,width=1920,height=1080,framerate=(GstFraction)30/1"
+DEFAULT_AUDIO_SETTINGS = "audio/x-raw,channels=2,rate=48000"
class ProjectManager(GObject.Object, Loggable):
@@ -706,12 +708,15 @@ class Project(Loggable, GES.Project):
self.container_profile = \
GstPbutils.EncodingContainerProfile.new("pitivi-profile",
_("Pitivi encoding profile"),
- Gst.Caps("application/ogg"),
+ Gst.Caps("video/webm"),
None)
+ has_default_settings = not bool(uri) and not bool(scenario)
+ vsettings = DEFAULT_VIDEO_SETTINGS if has_default_settings else "video/x-raw"
self.video_profile = GstPbutils.EncodingVideoProfile.new(
- Gst.Caps("video/x-theora"), None, Gst.Caps("video/x-raw"), 0)
+ Gst.Caps("video/x-vp8"), None, Gst.Caps(vsettings), 0)
+ asettings = DEFAULT_AUDIO_SETTINGS if has_default_settings else "audio/x-raw"
self.audio_profile = GstPbutils.EncodingAudioProfile.new(
- Gst.Caps("audio/x-vorbis"), None, Gst.Caps("audio/x-raw"), 0)
+ Gst.Caps("audio/x-vorbis"), None, Gst.Caps(asettings), 0)
self.container_profile.add_profile(self.video_profile)
self.container_profile.add_profile(self.audio_profile)
self.add_encoding_profile(self.container_profile)
@@ -721,7 +726,6 @@ class Project(Loggable, GES.Project):
self.aencoder = Encoders().default_audio_encoder
self._ensureAudioRestrictions()
self._ensureVideoRestrictions()
- has_default_settings = not bool(uri) and not bool(scenario)
self._has_default_audio_settings = has_default_settings
self._has_default_video_settings = has_default_settings
diff --git a/pitivi/render.py b/pitivi/render.py
index 2942f415..9f654271 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -94,9 +94,9 @@ class Encoders(Loggable):
X264 = "x264enc"
SUPPORTED_ENCODERS_COMBINATIONS = [
+ (WEBM, VORBIS, VP8),
(OGG, VORBIS, THEORA),
(OGG, OPUS, THEORA),
- (WEBM, VORBIS, VP8),
(WEBM, OPUS, VP8),
(MP4, AAC, X264),
(MP4, AC3, X264),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]