mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Renamed --no-utf8-subs to "--sub-type utf8". Polished the man page regarding subtitle handling.
This commit is contained in:
parent
9b7a616d9f
commit
f99d7d16fb
@ -1,5 +1,8 @@
|
||||
2003-05-17 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* Renamed '--no-utf8-subs' to '--sub-type utf8'. Polished the man
|
||||
page regarding subtitle handling.
|
||||
|
||||
* Fixed a bug with mono MP3 files.
|
||||
|
||||
* Added support for AAC files (only those with ADTS headers at the
|
||||
|
37
mkvmerge.1
37
mkvmerge.1
@ -121,12 +121,14 @@ floating point number or as 'widht/height', e.g. 16/9.
|
||||
.LP
|
||||
Options that only apply to text subtitle tracks:
|
||||
.TP
|
||||
\fB\-\-no\-utf8\-subs\fR
|
||||
With this option text subtitles will not be recoded, and the track's
|
||||
CodecId will be set to S_TEXT/ASCII. Without this option the text subtitles
|
||||
will be converted to UTF\-8, and the track's CodecId will be set to
|
||||
S_TEXT/UTF8. \fBmkvmerge\fR uses the current locale to determine the charset
|
||||
from which to convert which can be overridden with \fB\-\-sub\-charset\fR.
|
||||
\fB\-\-sub\-format\fR <\fIutf8\fR|\fIascii\fR>
|
||||
If the format chosen is \fIutf8\fR then text subtitles will be recoded to
|
||||
UTF-8, and the track's codec ID will be set to S_TEXT/UTF8. \fIascii\fR does
|
||||
no conversion, and S_TEXT/ASCII will be used instead. \fBmkvmerge\fR uses the
|
||||
current locale to determine the charset from which to convert which can be
|
||||
overridden with \fB\-\-sub\-charset\fR.
|
||||
.br
|
||||
The default is utf8.
|
||||
.TP
|
||||
\fB\-\-sub\-charset\fR
|
||||
Sets the charset for the conversion to UTF-8 for UTF-8 subtitles. If not
|
||||
@ -167,11 +169,15 @@ could be converted into the following option file:
|
||||
\-A a movie.avi
|
||||
.br
|
||||
sound.ogg
|
||||
|
||||
|
||||
.SH USAGE
|
||||
.LP
|
||||
For each file the user can select which tracks \fBmkvmerge\fR should take.
|
||||
They are all put into the file specified with '-o'. A list of known
|
||||
(and supported) source formats can be obtained with the '-l' option.
|
||||
|
||||
|
||||
.SH EXAMPLES
|
||||
.LP
|
||||
Let's assume you have a file called \fIMyMovie.avi\fP and the audio track in a
|
||||
@ -262,6 +268,25 @@ $ \fBsrttool -s -w -i mymovie.srtx -o mymovie.srt\fP
|
||||
The resulting file can be used as another input file for \fBmkvmerge\fR:
|
||||
.LP
|
||||
$ \fBmkvmerge -o mymovie.mkv mymovie.avi mymovie.srt\fP
|
||||
|
||||
|
||||
.SH SUBTITLES
|
||||
.LP
|
||||
There are several text subtitle formats that can be embedded into Matroska.
|
||||
At the moment \fBmkvmerge\fR supports only one simple text subtitle formats:
|
||||
SRT (Subtitle Ripper). These subtitles should normally be recoded to UTF-8
|
||||
so that they can be displayed correctly by a player. For recoded subtitles
|
||||
Matroska specifies S_TEXT/UTF8 as the codec ID. There's also S_TEXT/ASCII
|
||||
which assumes that no conversion is necessary.
|
||||
.LP
|
||||
\fBmkvmerge\fR does this conversion automatically based on the system's current
|
||||
locale. If the user does not want that conversion then he has to use the
|
||||
\fB\-\-sub\-type ascii\fR switch. If the subtitle charset is not the same as
|
||||
the system's current charset then the user can use \fB\-\-sub\-charset\fR
|
||||
switch. If the subtitles are already encoded in UTF-8 then you can use
|
||||
\fB\-\-sub\-charset UTF\-8\fR.
|
||||
|
||||
|
||||
.SH NOTES
|
||||
.LP
|
||||
What works:
|
||||
|
24
mkvmerge.cpp
24
mkvmerge.cpp
@ -13,7 +13,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: mkvmerge.cpp,v 1.65 2003/05/17 20:51:34 mosu Exp $
|
||||
\version \$Id: mkvmerge.cpp,v 1.66 2003/05/17 23:25:08 mosu Exp $
|
||||
\brief command line parameter parsing, looping, output handling
|
||||
\author Moritz Bunkus <moritz @ bunkus.org>
|
||||
*/
|
||||
@ -288,8 +288,9 @@ static void usage(void) {
|
||||
" Works only for video tracks.\n"
|
||||
" --aspect-ratio <f|a/b> Sets the aspect ratio.\n"
|
||||
"\n Options that only apply to text subtitle tracks:\n"
|
||||
" --no-utf8-subs Outputs text subtitles unmodified and do not\n"
|
||||
" convert the text to UTF-8.\n"
|
||||
" --sub-format <utf8| Converts text subtitles to UTF-8 or not.\n"
|
||||
" ascii> keeps them as they are and assumes ASCII\n"
|
||||
" encoding.\n"
|
||||
" --sub-charset Sets the charset the text subtitles are\n"
|
||||
" written in for the conversion to UTF-8.\n"
|
||||
"\n\n Other options:\n"
|
||||
@ -806,8 +807,21 @@ static void parse_args(int argc, char **argv) {
|
||||
} else if (!strcmp(argv[i], "--default-track"))
|
||||
ti.default_track = 1;
|
||||
|
||||
else if (!strcmp(argv[i], "--no-utf8-subs"))
|
||||
ti.no_utf8_subs = 1;
|
||||
else if (!strcmp(argv[i], "--sub-type")) {
|
||||
if ((i + 1) >= argc) {
|
||||
fprintf(stderr, "Error: --sub-type lacks its argument.\n");
|
||||
exit(1);
|
||||
}
|
||||
if (!strcmp(argv[i + 1], "utf8"))
|
||||
ti.no_utf8_subs = 0;
|
||||
else if (!strcmp(argv[i + 1], "ascii"))
|
||||
ti.no_utf8_subs = 1;
|
||||
else {
|
||||
fprintf(stderr, "Error: '%s' is an unsupported subtitle type.\n",
|
||||
argv[i + 1]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
else if (!strcmp(argv[i], "--language")) {
|
||||
if ((i + 1) >= argc) {
|
||||
|
Loading…
Reference in New Issue
Block a user