SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

<html><head><meta http-equiv="Content-type" content="text/html; charset=iso-8859-1"> <title>AVI animation creator, AVI dumper/patcher</title> <style type="text/css"><!--
TABLE.toc {border:0px}
A:link,A:visited{text-decoration:none;color:#2A3B83} A:hover{text-decoration:underline;color:#002040} A:active{text-decoration:underline;color:#004060;background:#CCD8FF} TD.toc {font-size:80%; font-family:Tahoma; text-align:left}

H1       {font-size:250%; font-weight:bold} .level1 {text-align:center}
H2       {font-size:200%; font-weight:bold} .level2 {margin-left:1%}
H3       {font-size:160%; font-weight:bold} .level3 {margin-left:2%}
H4       {font-size:145%; font-weight:bold} .level4 {margin-left:3%}
H5       {font-size:130%; font-weight:bold} .level5 {margin-left:4%}
H6       {font-size:110%; font-weight:bold} .level5 {margin-left:5%}

BODY{background:white;color:black}
CODE{font-family:lucida console,courier new,courier;color:#105000} PRE.smallerpre{font-family:lucida console,courier new,courier;font-size:80%;color:#500010;margin-left:30px} SMALL {font-size:70%}
.nonmail { visibility:hidden;position:absolute; top:0px;left:0px } .ismail { font-weight:normal }
--></style></head>
<body>
<h1>AVI animation creator, AVI dumper/patcher</h1> <h2 class=level2> 0. Contents </h2>

This is the documentation of animmaker-0.5.1. <div class=toc><table cellspacing=0 cellpadding=0 class=toc><tr><td width="50%" valign=middle align=left nowrap class=toc>&nbsp;&nbsp;&nbsp;1. <a href="purpose">Purpose</a><br>&nbsp;&nbsp;&nbsp;2. <a href="usage">Usage</a><br>&nbsp;&nbsp;&nbsp;3. <a href="povrayexample">Povray example</a><br>&nbsp;&nbsp;&nbsp;4. <a href="limits">Limits</a><br>&nbsp;&nbsp;&nbsp;5. <a href="tgaisnotbad">TGA is not bad (tip!)</a><br>&nbsp;&nbsp;&nbsp;6. <a href="features">Nonlimits</a><br>&nbsp;&nbsp;&nbsp;7. <a href="progress">Under development</a><br></td> <td width="50%" valign=middle align=left nowrap class=toc>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.1. <a href="prog1">Streamability</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.2. <a href="prog2">Multiple stdins</a><br>&nbsp;&nbsp;&nbsp;8. <a href="todo">To do</a><br>&nbsp;&nbsp;&nbsp;9. <a href="copying">Copying</a><br>&nbsp;&nbsp;&nbsp;10. <a href="contribute">Contribute!</a><br>&nbsp;&nbsp;&nbsp;11. <a href="h0">Requirements</a><br>&nbsp;&nbsp;&nbsp;12. <a href="h1">Installation</a><br>&nbsp;&nbsp;&nbsp;13. <a href="#download">Downloading</a><br></td> </tr></table></div><H2 id="purpose" class="level2"><a name="purpose"></a>1. Purpose</H2><div class="level2" id="divpurpose">

Creates an unindexed raw AVI from a list or stream of uncompressed Targa files (the ones generated by POV-Ray are accepted perfectly).<p> After having a raw AVI file generated by animmaker, you can encode it to DivX with <a href="http://www.mplayerhq.hu/">MPlayer</a>, like this:

<pre class=smallerpre
>mencoder foo.avi -o foo2.avi -divx4opts br=800:q=5:key=25</pre>

Or if you prefer libavcodec instead of divx4linux and two-pass encoding (enhances the quality/size ratio), you can do it like this:

<pre class=smallerpre
>mencoder foo.avi -o foo2.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800:vhq:vpass=1 mencoder foo.avi -o foo2.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800:vhq:vpass=2</pre>

Refer to the mencoder documentation to see how you can add audio, use different codecs, tune the compression parameters etc. Note that not all codecs support two pass encoding, which is completely optional anyway.

<p>

<blockquote style="font-size:80%">
<em>From Arpi &lt;arpi@...&gt;<br>
Date: Mon, 11 Nov 2002 15:32:59 +0100<br> Subject: animmaker+mencoder<br>
&nbsp;<br>
Hi,<br>
&nbsp;<br>
did you notice that mencoder can encode from TGA sequence directly? :)<br> ('-mf on *.tga' or even '-mf on file%03d.tga' too)<br> &nbsp;<br>
&lt;..&gt;
</em>
</blockquote>

Oops. Didn't know that :P<br>
But since I implemented the tga streaming, this program regained its usefulness.

</div><H2 id="usage" class="level2"><a name="usage"></a>2. Usage</H2><div class="level2" id="divusage">

<pre class=smallerpre>This is animmaker-0.5.0 Copyright (C) 1992,2006 Bisqwit (http://iki.fi/bisqwit/)

Usage: animmaker [&lt;option&gt; [&lt;...&gt;]] &lt;file&gt; [&lt;...&gt;]

This software assumes the files are uncompressed rgb24 tga files.

Options
-h, --help This help. -V, --version Displays version information. -o, --outfile &lt;file&gt; Specify the output file. -f, --fps &lt;number&gt; Frame rate (default: 25). -X, --xflip Flip horizontally (not default) -Y, --yflip Flip vertically (default) -@, --list &lt;file&gt; Read input file names from the given file. -a, --audio &lt;file&gt; Specify raw audio source (can be a pipe). -u, --buffer &lt;integer&gt; Specify the output buffer size in kB. -n, --mono Audio is mono (default: stereo). -b, --byte Audio is 8-bit (default: 16-bit). -r, --rate &lt;rate&gt; Specify audio rate in hertz (default: 44100). -s, --audiochunksize &lt;s&gt; Specify audio spacing in seconds.

You can also give the tga files in stdin, example: cat *.tga | animmaker -ogruu.avi -

No warranty whatsoever.
</pre>

The program uses the colour depth and pixel resolution of the first image in the sequence (autodetected) as the parameters of the whole animation.

</div><H2 id="povrayexample" class="level2"><a name="povrayexample"></a>3. Povray example</H2><div class="level2" id="divpovrayexample">

This is an example of making an animation in povray as DivX.<br> <pre class=smallerpre
>$ cat &gt;animmakerdemo.pov &lt;&lt;EOF plane { y,-1 pigment { checker rgb 1, rgb .5 } } sphere { 0,1 pigment { rgbf .8 } finish { specular 0.3 ambient 0.3 } interior { ior 1.3 } } camera { location x10 look_at 0 angle 35 rotate y360clock } light_source { 0, 1 fade_power 2 fade_distance 10

               looks_like { sphere { 0,0.2 pigment { rgb 1 } finish { ambient 1 } } }
               translate &lt;6,1,0&gt; rotate y360clock-4
             }

EOF
$ povray +w320 +h200 +kff300 +ft +ianimmakerdemo.pov $ animmaker -f20 -oanimmakerdemo.avi animmakerdemo???.tga $ mencoder animmakerdemo.avi -o animmakerdemo1.avi -ovc lavc -lavcopts vbitrate=400:vpass=1 $ mencoder animmakerdemo.avi -o animmakerdemo2.avi -ovc lavc -lavcopts vbitrate=400:vpass=2 </pre>
<small>(See options for divx4linux in the previous section if you don't like libavcodec) </small><br>
Result is a nice looping animation (link removed due to bandwidth concerns).<br> (Time for render total: 357 seconds; time for encode total: 239 seconds.) <p>
<!--
For an example of what you might achieve when using tga streaming (stdin mode), see this example: <a href="http://bisqwit.iki.fi/kala/snap/topdevel/beladum.avi">beladum.avi</a> (1.4 MB, divx4+mp3) (recorded from <a href="http://bisqwit.iki.fi/topfin/">Tales of Phantasia</a> in <a href="http://www.snes9x.com">snes9x</a> using animmaker as a slave). -->
<p>
If you wish to include audio with your animation, you can either use <code>--audio</code> option in animmaker or add <code>-audiofile &lt;filename&gt;</code> to your mencoder commandlines.<br> See the manual pages of each programs regarding the use of them.

</div><H2 id="limits" class="level2"><a name="limits"></a>4. Limits</H2><div class="level2" id="divlimits">

<ul>
<li>All input tga files must be the same resolution.</li> <li>Only uncompressed bgr24/bgr16/bgr15 tga files are accepted.</li> <li>The resulting avi will not contain index.</li> <li>Resulting avi may not be bigger than 2 GB.</li> <li>Only raw audio is accepted, and the soundtrack can only have 1 or 2 channels and can only be 8-bit or 16-bit.</li> </ul>

</div><H2 id="tgaisnotbad" class="level2"><a name="tgaisnotbad"></a>5. TGA is not bad (tip!)</H2><div class="level2" id="divtgaisnotbad">

If you have jpeg files instead of tga, no problem!<br> Have ImageMagick installed, and do this:<pre class=smallerpre >for s in *.jpeg;do convert ./"$s" tmp.tga;cat tmp.tga;done | animmaker -Y -o tmp.avi - </pre>
<p>
This will produce an avi from jpeg files. </p>

</div><H2 id="features" class="level2"><a name="features"></a>6. Nonlimits</H2><div class="level2" id="divfeatures">

<ul>
<li>Any frame rate can be selected between 0.00023 and 1000000 fps.</li> <li>Any number of frames is accepted (though the OS may limit the number of parameters).</li> <li>tga files can be read from stdin too.</li> </ul>

</div><H2 id="progress" class="level2"><a name="progress"></a>7. Under development</H2><div class="level2" id="divprogress">

This is my program! I make what I want! :)<br> So these features are mostly for my own use, but it might be worth documenting them. Here goes...

</div><H3 id="prog1" class="level3"><a name="prog1"></a>7.1. Streamability</H3><div class="level3" id="divprog1">

I'm working on streamability.<br>
This works:<br>
<pre class=smallerpre
>cat *.tga \
| animmaker -o- -f25 - \
| mencoder - -o tmptmp.avi -ovc lavc -lavcopts vbitrate=400:vhq </pre>

<em>What use can this be for?</em><br>
Well, now programmers have a nice way to produce compressed video clips by simply popen'ing that kind of command.<br> Now, as mencoder doesn't support named pipes or multiple stdins, see <a href="#prog2">the next item</a>.

</div><H3 id="prog2" class="level3"><a name="prog2"></a>7.2. Multiple stdins</H3><div class="level3" id="divprog2">

So if you want to give the tga stream and audio <em>both</em> from stdin, try this:<br>
<pre class=smallerpre
>cat *.tga | animmaker -otest.avi -f25 - '-a-#3' 3&lt;test.raw </pre>
Okay, the syntax isn't pretty, but it works :)<br> <code>-a-#3</code> here means "read audio from file #3", and <code>3&lt;test.raw</code> tells the shell that test.raw should be redirected into file #3 of animmaker.<br> The same syntax also works for the tga stream fd and output filename.<br>
<em>What use can this be for?</em><br>
Well, you can use this feature to stream audio and video simultaneously, if you are a developer.

</div><H2 id="todo" class="level2"><a name="todo"></a>8. To do</H2><div class="level2" id="divtodo">

These features might be implemented some day: <ul>
<li>Runtime conversion of any image format

     (using <a href="http://www.imagemagick.com">ImageMagick</a>,
     obsoletes the requirement of tga files)</li>

<li><a href="http://ffmpeg.sourceforge.net/">libavcodec</a> support</li> <li>mp3 audio input support</li>
</ul>

</div><H2 id="copying" class="level2"><a name="copying"></a>9. Copying</H2><div class="level2" id="divcopying">

animmaker has been written by Joel Yliluoma, a.k.a. <a href="http://iki.fi/bisqwit/">Bisqwit</a>,<br> and is distributed under the terms of the <a href="http://www.gnu.org/licenses/licenses.html#GPL">General Public License</a> (GPL).<br> Some features contributed by <a href="http://iki.fi/warp/">Warp</a>. <p>
If you happen to see this program useful for you, I'd appreciate if you tell me :) Perhaps it would motivate me to enhance the program.

</div><H2 id="contribute" class="level2"><a name="contribute"></a>10. Contribute!</H2><div class="level2" id="divcontribute">

You can contribute!

<ul>
<li>Add new features, fix bugs! Modify the

     program (the source code!) and send me
     the patches.</li>
 <li>If you have a nice short (6-8 lines) povray
     animation scene to replace that crappy one
     of mine here on this page, you can send it
     to me too :)</li>
 <li>Tell me what you do with this program.
     I am interested.</li>

</ul>
My email address:<span id=eml23><b id=eml9 class=nonmail>@gf</b><span id=eml10 class=ismail>Joel</span><span id=eml11 class=nonmail><b>@3</b></span><span id=eml12 class=ismail> Yli</span><b id=eml13 class=nonmail>O.fifk</b><span id=eml14 class=ismail>luom</span><span id=eml15 class=nonmail><b>ggetb</b></span><span id=eml16 class=ismail>a &lt;bi</span><b id=eml17 class=nonmail>mmzzgv</b><span id=eml18 class=ismail>sqwi</span><span id=eml19 class=nonmail><b>fe1eyu</b></span><span id=eml20 class=ismail>t@ik</span><b id=eml21 class=nonmail>z/Cb.bt.</b><span id=eml22 class=ismail>i.fi&gt;</span></span><script type="text/javascript"><!-- s='';for(i=9;i<23;){document.getElementById('eml'+i++).innerHTML='';s+=document.getElementById('eml'+i++).innerHTML;}document.getElementById('eml'+i).innerHTML='<'+'a href="mailto:'+s+'">'+s+'<'+'/a>'; --></script>

</div><H2 id="h0" class="level2"><a name="h0"></a>11. Requirements</H2><div class="level2" id="divh0">

GNU make is probably required.

</div><H2 id="h1" class="level2"><a name="h1"></a>12. Installation</H2><div class="level2" id="divh1">

<pre class=smallerpre
>$ make
$ su
# make install</pre>

If you do not want to install
<a href="http://oktober.stc.cx/source/libargh.html">libargh</a> (included in the archive), do not use "make install" and edit Makefile and enable the STATIC linking instead of DYNAMIC.

</div><H2 id="download" class="level2"><a name="download"></a>13. Downloading</H2><div class="level2" id="divdownload">

The official home page of animmaker
is at <a href="http://iki.fi/bisqwit/source/animmaker.html">http://iki.fi/bisqwit/source/animmaker.html</a>.<br>; Check there for new versions.
</div> <p align=right><small>Generated from

<tt>progdesc.php</tt> (last updated: Thu, 14 Oct 2004 04:30:46 +0300)<br> with <tt>docmaker.php</tt> (last updated: Sun, 12 Jun 2005 06:08:02 +0300)<br> at Fri, 05 May 2006 11:43:00 +0300</small> </p>
</body>
</html>


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.