1 registered members (Russ),
1,132
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
S |
M |
T |
W |
T |
F |
S |
|
|
|
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
|
|
|
Only The Best Herbs!
Your best source of world-class herbal information! More... |
#1 Book We've Found!
"Silver" fillings, mercury detox, & much more. More... |
For Mercury Detox
Prevent mercury reabsorption in the colon during detox. More... |
Softcover & Kindle
Excellent resource for mercury detox. More... |
For Mercury Chelation
For calcium chelation and heart health. More... |
Must for Every Parent
The most complete vaccine info on the planet. More... |
Finally.
Relief! More... |
Dr. Sherri Tenpenny
Get the info you need to protect yourself. More... |
What everyone's talking about!
Safe, powerful, timely! More... |
There is a difference!
A powerful brain antioxidant for use during Hg detox. More... |
This changed my life!
This book convinced me remove my fillings. More... |
This is what we use!
The only multi where you feel the difference. More... |
Hair Tests Explained!
Discover hidden toxicities, easily. More... |
Have Racing Thoughts?
Many use GABA for anxiety and better sleep. More... |
Help Them!
Natural health for pets. More... |
The Bible We Use!
King James with study notes by Bullinger. More... |
The Bible We Use!
King James with study notes by Bullinger. More... |
Food Additives
Protect your family from toxic food! More... |
|
|
|
|
Using mencoder to add captions to video
#58527
08/06/10 01:24 AM
08/06/10 01:24 AM
|
OP
Master Elite Member
|
Joined: Dec 1999
Posts: 30,795
Maine, USA
|
|
Using mencoder to add captions to videoI have been using mencoder to add captions to timelapse video that I create from a series of photos. I perform these 2 functions in a single step using mencoder. Following are some samples. Basic Title for VideoThis puts a title on the screen for the first few seconds of the video. mencoder "mf://*.jpg"
-o _movie02.avi
-ovc lavc
-lavcopts vcodec=mjpeg
-font c:\windows\fonts\verdana.ttf
-sub title.srt
-subalign 2
-subfont-autoscale 0
-subfont-text-scale 16 Argument Explanations-font c:\windows\fonts\verdana.ttfThe -font argument needs to be provided with the path to a font file. In this example, I used the Verdana font located in my Windows\fonts folder. -sub title.srtThe -sub argument specifies an "srt" file that exists in the current directory. This file is called a "SubRip Title" file and normally has the extension "srt". The text for the title(s) is located in this file. The "srt" file has the following format: 1
00:00:00,000 --> 00:00:15,000
This is the text of the first title.
2
00:00:30,000 --> 00:01:00,000
This is the text of the second title. The "1" and "2 are simply serial numbers indicating the title "number". The second line represents the time the title starts and ends in hours:minutes:seconds. The "seconds" field contains 3 decimal places after the comma. Note that the comma is a decimal delimiter used in France (the origin of the "srt" file format). Americans should think of this as a decimal point (because that's what it represents). The third line is the actual text that you want to have displayed. This text is limited to a maximum of 2 lines in length. So, if you wanted to have a single title displayed throughout the length of your video, your "srt" file may look like this: 1
00:00:00,000 --> 99:00:00,000
This is my subtitle. Note that the start time is the very beginning of the video and the end time is much longer than the video. This ensures the title is displayed all the way through the video. -subalign 2This tells mencoder to align the title with the bottom of the video. -subfont-autoscale 0This tells mencoder to interpret the value of the -subfont-text-scale argument as "points". -subfont-text-scale 16This tells mencoder to make the font size of the title 16 points. In order for this argument to be interpreted as a "point" size, the argument -subfont-autoscale must be set to 0 (zero).
|
|
|
All Subtitle Options for mencoder
[Re: Russ]
#58528
08/06/10 02:00 AM
08/06/10 02:00 AM
|
OP
Master Elite Member
|
Joined: Dec 1999
Posts: 30,795
Maine, USA
|
|
All Subtitle Options for mencoder -sub <subtitlefile1,subtitlefile2,...>
Use/display these subtitle files. Only one file can be dis‐
played at the same time.
-sub-bg-alpha <0-255>
Specify the alpha channel value for subtitles and OSD back‐
grounds. Big values mean more transparency. 0 means completely
transparent.
-sub-bg-color <0-255>
Specify the color value for subtitles and OSD backgrounds. Cur‐
rently subtitles are grayscale so this value is equivalent to
the intensity of the color. 255 means white and 0 black.
-sub-demuxer <[+]name> (-subfile only) (BETA CODE)
Force subtitle demuxer type for -subfile. Use a ’+’ before the
name to force it, this will skip some checks! Give the demuxer
name as printed by -sub-demuxer help. For backward compatibili‐
ty it also accepts the demuxer ID as defined in subreader.h.
-sub-fuzziness <mode>
Adjust matching fuzziness when searching for subtitles:
0 exact match
1 Load all subs containing movie name.
2 Load all subs in the current directory.
-sub-no-text-pp
Disables any kind of text post processing done after loading the
subtitles. Used for debug purposes.
-subalign <0-2>
Specify which edge of the subtitles should be aligned at the
height given by -subpos.
0 Align subtitle top edge (original behavior).
1 Align subtitle center.
2 Align subtitle bottom edge (default).
-subcc
Display DVD Closed Caption (CC) subtitles. These are not the
VOB subtitles, these are special ASCII subtitles for the hearing
impaired encoded in the VOB userdata stream on most region 1
DVDs. CC subtitles have not been spotted on DVDs from other re‐
gions so far.
-subcp <codepage> (iconv only)
If your system supports iconv(3), you can use this option to
specify the subtitle codepage.
EXAMPLE:
-subcp latin2
-subcp cp1250
-subcp enca:<language>:<fallback codepage> (ENCA only)
You can specify your language using a two letter language code
to make ENCA detect the codepage automatically. If unsure, en‐
ter anything and watch mplayer -v output for available lan‐
guages. Fallback codepage specifies the codepage to use, when
autodetection fails.
EXAMPLE:
-subcp enca:cs:latin2
Guess the encoding, assuming the subtitles are Czech,
fall back on latin 2, if the detection fails.
-subcp enca:pl:cp1250
Guess the encoding for Polish, fall back on cp1250.
-subdelay <sec>
Delays subtitles by <sec> seconds. Can be negative.
-subfile <filename> (BETA CODE)
Currently useless. Same as -audiofile, but for subtitle streams
(OggDS?).
-subfont <path to font (FreeType), font pattern (Fontconfig)> (FreeType
only)
Sets the subtitle font (see -font). If no -subfont is given,
-font is used.
-subfont-autoscale <0-3> (FreeType only)
Sets the autoscale mode.
NOTE: 0 means that text scale and OSD scale are font heights in
points.
The mode can be:
0 no autoscale
1 proportional to movie height
2 proportional to movie width
3 proportional to movie diagonal (default)
-subfont-blur <0-8> (FreeType only)
Sets the font blur radius (default: 2).
-subfont-encoding <value> (FreeType only)
Sets the font encoding. When set to ’unicode’, all the glyphs
from the font file will be rendered and unicode will be used
(default: unicode).
-subfont-osd-scale <0-100> (FreeType only)
Sets the autoscale coefficient of the OSD elements (default: 6).
-subfont-outline <0-8> (FreeType only)
Sets the font outline thickness (default: 2).
-subfont-text-scale <0-100> (FreeType only)
Sets the subtitle text autoscale coefficient as percentage of
the screen size (default: 5).
-subfps <rate>
Specify the framerate of the subtitle file (default: movie fps).
NOTE: <rate> > movie fps speeds the subtitles up for frame-based
subtitle files and slows them down for time-based ones.
-subpos <0-100> (useful with -vf expand)
Specify the position of subtitles on the screen. The value is
the vertical position of the subtitle in % of the screen height.
-subwidth <10-100>
Specify the maximum width of subtitles on the screen. Useful
for TV-out. The value is the width of the subtitle in % of the
screen width.
Source: http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.txt
|
|
|
|