[longomatch] Use bitrates for video encoders
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Use bitrates for video encoders
- Date: Fri, 17 Jan 2014 00:27:24 +0000 (UTC)
commit f1107ff260cfdccbc29e3b1369c72fece2b12ec7
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Jan 17 01:26:56 2014 +0100
Use bitrates for video encoders
libcesarplayer/video-utils.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libcesarplayer/video-utils.c b/libcesarplayer/video-utils.c
index d2e7664..21662d8 100644
--- a/libcesarplayer/video-utils.c
+++ b/libcesarplayer/video-utils.c
@@ -444,7 +444,7 @@ GstElement * lgm_create_video_encoder (VideoEncoderType type, guint quality,
encoder = gst_element_factory_make ("ffenc_mpeg4", "video-encoder");
g_object_set (encoder, "pass", 512,
"max-key-interval", -1,
- "bitrate", 4000000 * quality / 100, NULL);
+ "bitrate", quality * 1000 , NULL);
name = "FFmpeg mpeg4 video encoder";
break;
@@ -452,7 +452,7 @@ GstElement * lgm_create_video_encoder (VideoEncoderType type, guint quality,
encoder = gst_element_factory_make ("xvidenc", "video-encoder");
g_object_set (encoder, "pass", 3,
"profile", 146, "max-key-interval", -1,
- "quantizer", quality * 31 / 100, NULL);
+ "bitrate", quality * 1000, NULL);
name = "Xvid video encoder";
break;
@@ -460,7 +460,7 @@ GstElement * lgm_create_video_encoder (VideoEncoderType type, guint quality,
encoder = gst_element_factory_make ("x264enc", "video-encoder");
g_object_set (encoder, "key-int-max", 25, "pass", 17,
"speed-preset", 3,
- "bitrate", 4000 * quality / 100, NULL);
+ "bitrate", quality, NULL);
name = "X264 video encoder";
break;
@@ -468,7 +468,7 @@ GstElement * lgm_create_video_encoder (VideoEncoderType type, guint quality,
encoder = gst_element_factory_make ("theoraenc", "video-encoder");
g_object_set (encoder, "keyframe-auto", FALSE,
"keyframe-force", 25,
- "quality", quality * 63 / 100, NULL);
+ "bitrate", quality, NULL);
name = "Theora video encoder";
break;
@@ -477,7 +477,7 @@ GstElement * lgm_create_video_encoder (VideoEncoderType type, guint quality,
encoder = gst_element_factory_make ("vp8enc", "video-encoder");
g_object_set (encoder, "speed", 2, "threads", 8,
"max-keyframe-distance", 25,
- "quality", (gdouble) quality * 10 / 100, NULL);
+ "bitrate", (gdouble) quality * 1000, NULL);
name = "VP8 video encoder";
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]