File: Examples.doc

package info (click to toggle)
xanim 2.70.6.4-9
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 2,412 kB
  • ctags: 4,429
  • sloc: ansic: 42,227; makefile: 541; sh: 35
file content (185 lines) | stat: -rw-r--r-- 6,444 bytes parent folder | download | duplicates (4)
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185


This file lists some example of using XAnim.


1) View one:

    xanim anim.mov

2) View several:

    xanim anim1.mov anim2.avi anim3.mpg

3) View one and find out what it is:

    xanim +v anim.mov

4) For those with only a 256 color display(myself included), there
   are many options that can control how XAnim deals with the
   very limited number of colors.

 4a) Private Colormap. (the option turns of the cmap_play_nice flag).
     Now your X11 Window Manager(not XAnim) is responsible for
     changing the Colormap as the ColorFocus changes(Color Focus
     typically follows your mouse ptr. See your X11 Window Manager
     documentation for more info).

     xanim  -Cn  anim.mov

 4b) Since XAnim can only use 256 colors(usually significantly less
     because other applications are already using them), just
     how does it pick when an animation is potentially made of
     thousands of colors?   

     By default, XAnim creates an RGB332 colormap. Iterates between
     every combination of 3 bits Red, 3 bits Green and 2 bits of
     Blue(which just happens to be 256).  With the -Cn option, this
     is the colormap, without the -Cn option, this colormap is
     further reduced depending on which of those colors, XAnim
     can actually allocate.

     BUT! We can do better. If you use the +CF4 option. XAnim
     will scan a preset number of equally spaced frames from 
     the animation in order to sample what colors are being
     used and then select the "best" 256 colors from the thousands
     that are sampled.  (NOTE: you can change the number of frames
     that are prescanned with the +Cs# option).   "best" actually
     means XAnim uses a variation of the Median Cut algorithm.

     Later it utilizes a colormap  caches to help speed up remapping
     each pixel in the animation to one of the available colors
     in the colormap.

     xanim +CF4 anim.mov

     xanim +CF4 -Cn anim.mov

     xanim +Cs20 +CF4 -Cn anim.mov


     One other thing to note. The +CF4 will also trigger the -F option
     which shuts off dithering for the Video Codecs that support it.
     See 4c).  You can turn dithering back on:

     xanim +CF4 +F -Cn anim.mov

 4c) Dithering. Dithering is slow and while it increases color resolution,
     it does so at the expense of spatial resolution.  In XAnim, I've
     worked dithering into the decompression routines of several Video
     Codecs(actually it's a separate alternative routine for each one
     for speed reasons). The following Video Codecs/formats support
     this low level dithering. Cinepak, Indeo, MPEG, JPEG, MJPG
     and IJPG.

     This option (+F) is on by default if you have a 256 color display.
     As noted above in section 4b), it gets turned off by +CF4, but
     can be overridden.

     Dithering does slow things down, but since it's built into the
     decompression routines, I can take several opportunities to
     speed things up that I couldn't do if the dithering was done
     later at a higher level.

     If you have a 256 color display, you should really take the time
     to experiment with dithering, -Cn and +CF4 options to get
     a feel for how they affect video quality and playback speed for
     various formats and Video Codecs.

     To start with, find an animation that uses one of the above mentioned
     codecs and then run the following command lines:

      xanim anim		# Dithering and shared colormap

      xanim -F anim		# No dithering and shared colormap

      xanim -Cn anim		# Dithering and private colormap

      xanim -F -Cn anim		# No dithering and private colormap

      xanim +CF4  anim		# Median Cut, no dithering, shared colormap

      xanim +CF4  -Cn anim	# Median Cut, no dithering, private colormap

      xanim +CF4 +F -Cn anim	# Median Cut,   dithering,  private colormap

5) Scaling animations.  Scaling is very cpu intensive and will
   cause slow downs in playback. Also, at the moment, XAnim
   dithers before scaling and this causes/enhances artifacts in the
   image. Best to use the +CF4 option instead.

   On the fly scaling requires the +Sr option:

    xanim +Sr anim.mov

   See "xanim.readme" for a more detail discusion of image and buffer
   scaling.


6) Need for Speed!  Almost all animations formats indicate how fast
   XAnim play each frame. You can over ride this with the [-] and [+]
   buttons of the remote control  OR  you can force frame timing
   with the +j# option where # is given in milliseconds. If # is 0,
   then forced timing is turned off and the timing specified by the
   animation is used again.

   This is useful in benchmarking where you want XAnim to play as
   fast as possible(NOTE: see 7) for the +t option)

      xanim +j1 +t  +l5  anim.mov

   Or for slideshows

      xanim +bC1d  +j5000 image1.jpg  image2.jpg +j8000 image3.jpg

7) Benchmarking. The +t option will indicate how long it took XAnim
   to display the command line. Since XAnim loops on the command
   line by default, you will get the time of each of these loops.
   Typically, the +j1 option is used to force as-fast-as-possible
   playback.

    xanim +tj1  anim.mov
   
   If the animation is short, you might want to time it over a longer
   period of time. Since the timing is done over the entire command
   line, you can use the +l# option to loop the animation. In the
   example below, anim.mov is looped 5 times each time the command
   line is looped.

    xanim +tj1 +l5 anim.mov

   Since +t also reports how many frames were dropped because of
   audio/video synchronization, it's sometimes useful to not
   specific +j1.

     xanim +t anim.mov

8) Audio, what? AUDIO!   Audio is enabled by default. You can
   turn it off with -Ae

   xanim -Ae anim.mov

   You can select the speaker output with the SPEAKER env variable:

     setenv SPEAKER INTERNAL
     setenv SPEAKER HEADPHONES
     setenv SPEAKER EXTERNAL

   The above is for csh, for bourne shell(sh) do the following

     SPEAKER=INTERNAL
     export SPEAKER
 
   Note: No spaces around the "=" sign are allowed.

  
   You can also specify audio port with the +Ap# command. See xanim.readme.
 

   Currently, XAnim automatically sets the volume. This will change in
   the near future, but until then you can use the +Av# option to
   set the volume. The range is bewteen 0 and 100. You can also
   compile this in. See the DEFAULT_XA_AUDIO_VOLUME define in
   the "xa_config.h" file.