[pitivi] Use proper default project and rendering settings
- From: Alexandru BÄluČ› <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Use proper default project and rendering settings
- Date: Sat, 13 Jul 2019 23:14:53 +0000 (UTC)
commit 2dde39ce1fb7612e72c146b682da836eb337b4da
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 3641b5f3..177b95f4 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -88,6 +88,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"
SCALED_THUMB_WIDTH = 96
SCALED_THUMB_HEIGHT = 54
@@ -710,12 +712,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)
@@ -725,7 +730,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 206bafe2..06f6743e 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]