Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libjitsi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZRTP
libjitsi
Commits
96587199
Commit
96587199
authored
12 years ago
by
Damian Minkov
Browse files
Options
Downloads
Patches
Plain Diff
Adds option to change h264 encoder presets.
parent
59b4e07d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/org/jitsi/impl/neomedia/codec/video/h264/JNIEncoder.java
+36
-1
36 additions, 1 deletion
src/org/jitsi/impl/neomedia/codec/video/h264/JNIEncoder.java
with
36 additions
and
1 deletion
src/org/jitsi/impl/neomedia/codec/video/h264/JNIEncoder.java
+
36
−
1
View file @
96587199
...
...
@@ -63,6 +63,36 @@ public class JNIEncoder
=
"net.java.sip.communicator.impl.neomedia.codec.video.h264."
+
"defaultProfile"
;
/**
* A preset is a collection of options that will provide a certain encoding
* speed to compression ratio. A slower preset will provide
* better compression (compression is quality per size).
*/
public
static
final
String
PRESET_PNAME
=
"org.jitsi.impl.neomedia.codec.video.h264.preset"
;
/**
* The available presets we can use with the encoder.
*/
public
static
final
String
[]
AVAILABLE_PRESETS
=
{
"ultrafast"
,
"superfast"
,
"veryfast"
,
"faster"
,
"fast"
,
"medium"
,
"slow"
,
"slower"
,
"veryslow"
};
/**
* The default value of the {@link #PRESET_PNAME}
* <tt>ConfigurationService</tt> property.
*/
public
static
final
String
DEFAULT_PRESET
=
AVAILABLE_PRESETS
[
0
];
/**
* Key frame every 150 frames.
*/
...
...
@@ -489,6 +519,11 @@ else if("h264.profile".equals(k))
logger
.
warn
(
"The FFmpeg JNI library is out-of-date."
);
}
String
preset
=
(
cfg
==
null
)
?
null
:
cfg
.
getString
(
PRESET_PNAME
,
DEFAULT_PRESET
);
if
(
FFmpeg
.
avcodec_open2
(
avctx
,
avcodec
,
...
...
@@ -503,7 +538,7 @@ else if("h264.profile".equals(k))
//"crf" /* constant quality mode, constant ratefactor */, "0",
"intra-refresh"
,
"1"
,
"partitions"
,
"b8x8,i4x4,p8x8"
,
"preset"
,
"ultrafast"
,
"preset"
,
preset
,
"thread_type"
,
"slice"
,
"tune"
,
"zerolatency"
)
<
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment