[go: up one dir, main page]

File: kate-HOWTO.doc

package info (click to toggle)
libkate 0.3.7-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,484 kB
  • ctags: 4,083
  • sloc: ansic: 10,002; sh: 8,853; yacc: 2,250; python: 721; lex: 362; makefile: 239
file content (123 lines) | stat: -rw-r--r-- 4,776 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/* Copyright (C) 2008, 2009 Vincent Penquerc'h.
   This file is part of the Kate codec library.
   Written by Vincent Penquerc'h.

   Use, distribution and reproduction of this library is governed
   by a BSD style source license included with this source in the
   file 'COPYING'. Please read these terms before distributing. */


/**

\page HOWTO


\section HOWTO-text-subtitles Text movie subtitles

Kate streams can carry Unicode text (that is, text that can represent
pretty much any existing language/script). If several Kate streams are
multiplexed along with a video, subtitles in various languages can be
made for that movie.

An easy way to create such subtitles is to use ffmpeg2theora, which
can create Kate streams from SubRip (.srt) format files, a simple but
common text subtitles format. ffmpeg2theora 0.21 or later is needed.

At its simplest:

\verbatim
    ffmpeg2theora -o video-with-subtitles.ogg --subtitles subtitles.srt
      video-without-subtitles.avi 
\endverbatim

Several languages may be created and tagged with their language code
for easy selection in a media player:

\verbatim
    ffmpeg2theora -o video-with-subtitles.ogg video-without-subtitles.avi
      --subtitles japanese-subtitles.srt --subtitles-language ja
      --subtitles welsh-subtitles.srt --subtitles-language cy
      --subtitles english-subtitles.srt --subtitles-language en_GB
\endverbatim

Alternatively, kateenc (which comes with the libkate distribution) can
create Kate streams from SubRip files as well. These can then be merged
with a video with oggz-tools:

\verbatim
    kateenc -t srt -c SUB -l it -o subtitles.ogg italian-subtitles.srt

    oggz merge -o movie-with-subtitles.ogg movie-without-subtitles.ogg subtitles.ogg
\endverbatim

This second method can also be used to add subtitles to a video which
is already encoded to Theora, as it will not transcode the video again.


\section HOWTO-DVD-subtitles DVD subtitles

DVD subtitles are not text, but images. Thoggen, a DVD ripper program,
can convert these subtitles to Kate streams (at the time of writing,
Thoggen and GStreamer have not applied the necessary patches for this
to be possible out of the box, so patching them will be required).

When configuring how to rip DVD tracks, any subtitles will be detected
by Thoggen, and selecting them in the GUI will cause them to be saved as
Kate tracks along with the movie.


\section HOWTO-lyrics Song lyrics

Kate streams carrying song lyrics can be embedded in an Ogg file. The
oggenc Vorbis encoding tool from the Xiph.Org Vorbis tools allows lyrics
to be loaded from a LRC or SRT text file and converted to a Kate stream
multiplexed with the resulting Vorbis audio. At the time of writing,
the patch to oggenc was not applied yet, so it will have to be patched
manually with the patch found in the diffs directory.

\verbatim
    oggenc -o song-with-lyrics.ogg --lyrics lyrics.lrc --lyrics-language en_US song.wav
\endverbatim

So called 'enhanced LRC' files (containing extra karaoke timing information)
are supported, and a simple karaoke color change scheme will be saved
out for these files. For more complex karaoke effects (such as more
complex style changes, or sprite animation), kateenc should be used with
a Kate description file to create a separate Kate stream, which can then
be merged with a Vorbis only song with oggz-tools:

\verbatim
    oggenc -o song.ogg song.wav

    kateenc -t kate -c LRC -l en_US -o lyrics.ogg lyrics-with-karaoke.kate

    oggz merge -o song-with-karaoke.ogg lyrics-with-karaoke.ogg song.ogg
\endverbatim

This latter method may also be used if you already have an encoded Vorbis song
with no lyrics, and just want to add the lyrics without reencoding.


\section HOWTO-remuxing Changing a Kate stream embedded in an Ogg stream

If you need to change a Kate stream already embedded in an Ogg stream
(eg, you have a movie with subtitles, and you want to fix a spelling
mistake, or want to bring one of the subtitles forward in time, etc),
you can do this easily with KateDJ, a tool that will extract Kate streams,
decode them to a temporary location, and rebuild the original stream
after you've made whatever changes you want.

KateDJ (included with the libkate distribution) is a GUI program using
wxPython, a Python module for the wxWidgets GUI library, and the oggz
tools (both needing installing separately if they are not already).

The procedure consists of:
- Run KateDJ
- Click 'Load Ogg stream' and select the file to load
- Click 'Demux file' to decode Kate streams in a temporary location
- Edit the Kate streams - you can also double click on the language you want to change
- When done, click 'Remux file from parts'
- If any errors are reported, continue editing until the remux step succeeds


*/