mirror of https://github.com/mpv-player/mpv
ass-color and ass-border-color options.
Only plain text subtitles are affected. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19652 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2e802cf855
commit
62b44a7d1f
|
@ -1759,11 +1759,19 @@ external subtitles and Matroska tracks.
|
|||
You may also want to use \-embeddedfonts.
|
||||
.
|
||||
.TP
|
||||
.B \-ass-border-color <value>
|
||||
Sets border (outline) color for plain text subtitles. Color format is RRGGBBAA.
|
||||
.
|
||||
.TP
|
||||
.B \-ass-bottom-margin <value>
|
||||
Adds a black band at the bottom of the frame.
|
||||
The SSA/ASS renderer can place subtitles there (with \-ass-use-margins).
|
||||
.
|
||||
.TP
|
||||
.B \-ass-color <value>
|
||||
Sets color for plain text subtitles. Color format is RRGGBBAA.
|
||||
.
|
||||
.TP
|
||||
.B \-ass-font-scale <value>
|
||||
Set the scale coefficient to be used for fonts in the SSA/ASS renderer.
|
||||
.
|
||||
|
|
|
@ -316,6 +316,8 @@
|
|||
{"embeddedfonts", &extract_embedded_fonts, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||
{"noembeddedfonts", &extract_embedded_fonts, CONF_TYPE_FLAG, 0, 1, 0, NULL},
|
||||
{"ass-force-style", &ass_force_style_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
|
||||
{"ass-color", &ass_color, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
{"ass-border-color", &ass_border_color, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
#endif
|
||||
#ifdef HAVE_FONTCONFIG
|
||||
{"fontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "mp_msg.h"
|
||||
|
||||
#include "ass.h"
|
||||
#include "ass_utils.h"
|
||||
#include "ass_mp.h"
|
||||
|
||||
// libass-related command line options
|
||||
|
@ -16,6 +17,8 @@ int ass_bottom_margin = 0;
|
|||
int extract_embedded_fonts = 0;
|
||||
char **ass_force_style_list = NULL;
|
||||
int ass_use_margins = 0;
|
||||
char* ass_color = NULL;
|
||||
char* ass_border_color = NULL;
|
||||
|
||||
extern int font_fontconfig;
|
||||
extern char* font_name;
|
||||
|
@ -30,6 +33,7 @@ ass_track_t* ass_default_track() {
|
|||
ass_style_t* style;
|
||||
int sid;
|
||||
double fs;
|
||||
uint32_t c1, c2;
|
||||
|
||||
track->track_type = TRACK_TYPE_ASS;
|
||||
track->Timer = 100.;
|
||||
|
@ -50,9 +54,14 @@ ass_track_t* ass_default_track() {
|
|||
fs *= 1.4;
|
||||
style->FontSize = fs;
|
||||
|
||||
style->PrimaryColour = 0xFFFF0000;
|
||||
style->SecondaryColour = 0xFFFF0000;
|
||||
style->OutlineColour = 0x00000000;
|
||||
if (ass_color) c1 = strtoll(ass_color, NULL, 16);
|
||||
else c1 = 0xFFFF0000;
|
||||
if (ass_border_color) c2 = strtoll(ass_border_color, NULL, 16);
|
||||
else c2 = 0x00000000;
|
||||
|
||||
style->PrimaryColour = c1;
|
||||
style->SecondaryColour = c1;
|
||||
style->OutlineColour = c2;
|
||||
style->BackColour = 0x00000000;
|
||||
style->BorderStyle = 1;
|
||||
style->Alignment = 2;
|
||||
|
|
|
@ -11,6 +11,8 @@ extern int ass_bottom_margin;
|
|||
extern int extract_embedded_fonts;
|
||||
extern char **ass_force_style_list;
|
||||
extern int ass_use_margins;
|
||||
extern char* ass_color;
|
||||
extern char* ass_border_color;
|
||||
|
||||
ass_track_t* ass_default_track();
|
||||
int ass_process_subtitle(ass_track_t* track, subtitle* sub);
|
||||
|
|
Loading…
Reference in New Issue