News you won't see in controlled mainstream media.

Who's Online Now
1 members (Russ), 940 guests, and 176 robots.
Key: Admin, Global Mod, Mod
ShoutChat
October
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
Left Sidebar Ad
Popular Topics(Views)
402,628 DOES GOD EXIST?
312,063 Please HELP!!!
Support Our Forum
Herbs/Nutrition
Only The Best HerbsOnly The Best Herbs!
Your best source of world-class herbal information! More...
Mercury Detox
Amalgam Illness: Diagnosis and Treatment by Dr. Andrew Cutler#1 Book We've Found!
"Silver" fillings, mercury detox, & much more. More...
Algin
AlginFor Mercury Detox
Prevent mercury reabsorption in the colon during detox. More...
Mercury Poisoning
DMSA, 25mg.Softcover & Kindle
Excellent resource for mercury detox. More...
EDTA 500mg
DMSA, 25mg.For Mercury Chelation
For calcium chelation and heart health. More...
Vaccine Safety?
Vaccines: The Risks, The Benefits, The Choices by Dr. Sherri TenpennyMust for Every Parent
The most complete vaccine info on the planet. More...
Stop Candida!
Candida ClearFinally.
Relief! More...
Saying NO To Vaccines
Saying No To Vaccines by Dr. Sherri TenpennyDr. Sherri Tenpenny
Get the info you need to protect yourself. More...
Nano-Silver
Amalgam Illness: Diagnosis and Treatment by Dr. Andrew CutlerWhat everyone's talking about!
Safe, powerful, timely! More...
World's Best Vitamin E
Vitamin E wih SeleniumThere is a difference!
A powerful brain antioxidant for use during Hg detox. More...
It's All In Your Head
It's All In Your Head by Dr. Hal HugginsThis changed my life!
This book convinced me remove my fillings. More...
World's Best Multi
Super Supplemental - Full-Spectrum Multivitamin/Mineral/Herbal SupplementThis is what we use!
The only multi where you feel the difference. More...
Understand Hair Tests
Hair Test Interpretation: Finding Hidden Toxicities by Dr. Andrew CutlerHair Tests Explained!
Discover hidden toxicities, easily. More...
GABA
GABA (gamma-aminobutyric acid)Have Racing Thoughts?
Many use GABA for anxiety and better sleep. More...
Pet Health Charts
Pet Health Charts for Dogs, Cats, Horses, and BirdsHelp Them!
Natural health for pets. More...
The Companion Bible (Hardcover)
The Companion BibleThe Bible We Use!
King James with study notes by Bullinger. More...
The Companion Bible (Softcover)
The Companion BibleThe Bible We Use!
King James with study notes by Bullinger. More...
Sweet Remedy
Sweet RemedyFood Additives
Protect your family from toxic food! More...
Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 1999
Posts: 30,867
Master Elite Member
****
Using mencoder to add captions to video

I 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 Video

This puts a title on the screen for the first few seconds of the video.

Code
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.ttf

The -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.srt

The -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:

Code
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:

Code
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 2

This tells mencoder to align the title with the bottom of the video.

-subfont-autoscale 0

This tells mencoder to interpret the value of the -subfont-text-scale argument as "points".

-subfont-text-scale 16

This 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).


The Captian
Today they call you "crazy". Tomorrow they call you "ahead of your time."
Global Skywatch Learn about Chemtrails - You're breathing them now!
OnlyTheBestHerbs.com World-class supplements
Mercury Talk Why you are sick.
OneUp Domains Domains, Hosting, Email
1-800-358-4278 (U.S. & Canada)
Joined: Dec 1999
Posts: 30,867
Master Elite Member
****
All Subtitle Options for mencoder

Code
      -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


The Captian
Today they call you "crazy". Tomorrow they call you "ahead of your time."
Global Skywatch Learn about Chemtrails - You're breathing them now!
OnlyTheBestHerbs.com World-class supplements
Mercury Talk Why you are sick.
OneUp Domains Domains, Hosting, Email
1-800-358-4278 (U.S. & Canada)

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 8.0.1