The Removers' Animator

Animator is a new video player on Atari. New, but its developement started quite 


a long time ago and a lot of work has already been spent to get it as it is now.
Animator can render AVI (Video for Windows) files with sound, MOV (Apple 
Quicktime) files without sound and FLI and FLC (Autodesk Animator) files. It 
also can play WAV sound files (from Microsoft).
If you have any suggestion or comments, the authors are reachable through email
:
	Stabylo: Benjamin.Gandon@isia.cma.fr
	Seb: Sebastien.Briais@ens-lyon.fr

Table of content
1.	What is Animator?
2.	How to use Animator?
3.	User interface
4.	Command line system
i.	Arguments
ii.	Flags
iii.	Tricks
iv.	Examples
5.	Write your own modules for Animator
6.	How to share Animator's modules between many applications
7.	Credits

What is Animator?
Animator is a multimedia player. this means that it can display movie files on 
the screen with synchronized sound. Of course, Animator also can play sound 
files and videos without sound.
One of the most burning issue about Animator is... Its speed! So? is Animator 
fast? Well, I just let you proceed to some test and make up your mind about it. 
But, if you find a movie file and a hardware configuration taht allows some 
other player to be faster, tell me. I'm intrested. The point is not that my 
player is always faster, not at all, but this helps me understanding where are 
the weak points of my player.
What kind of movie files Animator can render? Well, here are the supported file 
formats:
	AVI files (restriction: no synchro if there is no sound)
	vidos MOV (restriction: no sound, no synchro and only few video 
compression schemes are supported
	FLI and FLC files (restriction: no FLH file support)
	sons WAV (restiction : pas de support de la compression MPEG, encore 
moins la troisime couche)
You can see that there are many restrictions, but they are here just to give you 


an idea of what you're going to find in the future releases! Animator can also 
display still images. This feature is not used for the moment, but we'll take 
advantage of it.
You may now ask what hardware is supported. Here it is:
	Falcon 030 shipped with original Videl or 16 bits Nova graphic card.
	TT 030 with 16 bits Nova graphic card (other 16 bits graphic cards 
should be supported)
	Afterburner 040, Nemesis, Centurbo, etc.
	RVB/VGA switch with multisynchro monitors
Just note that for the moment, Animator looks for the best 16 bits video 
resolution available only on Falcon using the original Videl chip. When the 
current resolution is already 16 bits wide, Animator will just keep it like 
this. That's why if you have a graphic card, you shoul first switch your display 


to a large enough 16 bits resolution.
Aniatos may also be able to play sound on STe, but I can't certify this. Indeed, 


I never tested Animator on a 68000 machine and having it running on such 
hardware is not a priority for the moment (unless you ask me for such a feature, 


of course!).
Animator supports the following systems:
	TOS (4 et 3) with or without NVDI
	Magic 5 et 6 only with NVDI (automatic screen refresh is still not 
handled and VT52 complaints about modified system vectors)
	Mint (Singletos only)
I'm sorry that you must use NVDI under Magic, but I didn't had time to find a 
workaround to a vicious bug of Magic screen driver. Everything is fine with the 
one of NVDI. I would be very pleased to discuss that problem with Magic authors, 


but I didn't even try because I'm not sure they would listen to me... If you 
have their mail address, please send it to me by mail!
To finish that presentation of this player, here is a list of technologies that 
you can find in Animator, just to give you an idea of what it is to design such 
a software:
	Content negiciation
	Dynamic librairies (but i'll probably switch to LDG system in the 
future)
	Real Time programing
	Object oriented design (yes! I'm noit very far from object design when 
coding with assembly!)
	Assembly optimisation (of course)
	Finite automata (or final state machines, it's the same)
	Signal processing
	Reading English specs :)

How to use Animator
Animator uses a command line system. It's the way you can customize Animator. I 
give you here some description of this system so that you can use it without any 


pain.
Anyway, the easyest way to use Animator is of couse to drop some folder or some 
movie file on it. Folders are recursively parsed for movie files unless you 
specify '-R' in the command line.
When referring to a file in the command line, wildcards '*' and '?' are also 
available. This some time helps.
The user interface
The user interface is very basic. The mouse is just about what you need to 
control Animator. The left button usually allows you to get to the next task and 


the right button lets you quit Animator.
Before playing a video, if you asked for holding the screen until a key stroke 
('+h' option), you can immediately quit using [Esc] or just start playing the 
video with any other key or the mouse left button.
When playing a video, you can only use the mouse:
	The left button allows you to get to the next video still to be played 
or abort preprocessing sound. Animator still takes allways advantage of anything 


it had the time to preprocess.
	The right button aborts everything and quits Animator immediately.
	If the screen size is too small to display teh current video, moving the 


mouse lets you move accross the virtual screen (only on Falcon with Videl).

Command line system
Here is how you can customize Animator. Don't be afraid, you needn't know 
everything by heart. At most, you just need to set some switches in the dialog 
box when installing Animator as an application linked with AVI files.

Arguments
Some general rules about arguments:
	They are separated by spaces
	An argument not begining with '+' or '-' is considered as a file name. 
Don't be afraid if you give a bad file name: Animator only plays files that it 
understands for sure.
	Options (that begin with '+' or '-') are case sensitive
	Wildcards '*' and '?' are supported, but in the system manner. Under 
TOS, 'foobar.???' is the same as 'foobar.*'. Things like 'foo*bar*end.avi' are 
understood as 'foo*.avi' too. These are some small drawbacks of GEMDOS.
	Unknown option letters are ignored
	Option letters may appear in any order between file names.
	You can use as many spaces you like, and compress or extend the syntax: 
'+1 +s -R +t -h' is equivalent to '+1st-Rh'.
Flags
Note that the command line is parsed until Animator reaches a file that can be 
opened. Animator sums up the state of options for the first file on startup. If 
no file is found, Animator tells it to you. Flag syntax is very simple: a '+' 
activates a flag, a '-' disables it.
	1: plays files only one time (default '+1').
	e: diplays screen output in English (default '+e').
	h: activates key stroke waitings (hold) (default '-h').
	l: activates log file. Global and file specific statistics are then 
written in ANIMATOR.LOG. When log file is disabled, only global statistics are 
displayed just before Animator exits (default '-l').
	m: movie file is parsed without any synchronization and without skipping 


any frame (max speed). You should only use it to proceed to benchmarks. If the 
sound is grouped at the end of the file, it may not be played (default '-m').
	p: preprocess sound before playing movie. You can abort preprocessing 
the sound with the mouse left button. Animator will take advantage of anything 
already processed (default '+p').
	q: enforce better quality sound output (16 bits) (default '+q').
	R: parse forlders recursively for the given file (default '+R').
	r: allow Animator to reduce physical screen size. animator won't do it 
if there is no Videl. This flag may help you to solve incompatibility problems. 
with unsupported graphic cards (default '+r').
	s: synchronize video with sound. Frames may be skipped (default '+s').
	t: activates statistics computing (timings). File specific statistics 
may only be written in ANIMATOR.LOG (default '-t').
	v: allows Animator to use virtual screen on Falcon. For the moment, 
Animator may set up a virtual screen only if the Videl chip is detected. This 
flag may help you to solve incompatibility problems (default '+v').

example: +1s-th
Activates options '1' and 's', disables the rest.

Tricks
I'd like to give here some examples of case in which you may not get what you 
would like to.
+s no_sound.avi
If the video has no sound, no synchronisation scheme is available. This feature 
will be added in future versions.
-r
slows down rendering for movie files whose height is less than the height of the 


screen (on Falcon with Videl only)
+1ts-hl apollo.avi +h
If you quit with a right click, the end of the command line is not parsed: 
Animator doesn't wait for a key. If you quit with left click during the last 
movie file, the end of the command line is parsed and Animator waits for a key 
when displaying statistics.

Examples
After having presented you some tricky cases, let's see why all that stuff is 
powerfull.
-1 *.avi
waits for a left click to go from a file to another and waits for a right click 
to quit.
-1 *.avi +1
waits for a left click to go from a file to the next one and quits after all 
files has been played. You an also quit with a right click.
+1 *.avi
plays all files one time and exits at the end.
+1 *.avi -1
plays only one time every file and then start again from the first one!
+1s *.avi -s *.avi -1
plays all files with synchro, then again, but without synchro!
-h+t1 foobar.avi -1t apollo.avi +ht
doesn't wait for any key at the begining, plays foobar.avi one time and compute 
statistics, then plays apollo.avi infinitely without computing any statistics 
and without writing anyting in the logs, and write global statistics in the logs 


while waiting for a key. Anyting else? :)
Ok, I think that's enough for the command line system. Just remember that the 
most painless way to use Animator is to install it with the GEM desktop as an 
application linked to the AVI extension. Clicking on movie files is then the 
only thing you have to do. It's that easy.
5. Write your own modules for Animator
It is possible for you to write your own modules for Animator. These are just 
standards TOS programs that Animator dynamically loads when looking for a module 


that handles a given compression scheme.
Modules just follow some specific rules described in the modules documentation. 
Please refer to that document for more details. If this documentation is not 
translated into English, please let me know that you'd like to have a translated 


version by email. But keep in mind that even if the current design is quite 
efficient, it will change in the future. For example, I'm thinking about moving 
to the LDG (GEM Dynamic Libraries http://ldg.atari.org/) format.
For the moment only two modules formats out of the planned three are designed. 
AVC and AAC modules are respectively Animator Video Codec modules and Animator 
Audio Codec modules. Codec means that they should (at best) be able to decode 
and encode data in a given format. But the way codec modules can encode data is 
still not defined. AFH (Animator File Handler) modules that handle a given file 
format are also planned but their desing is still not yet defined too. Still 
planned for a future release.
6. How to share Animator modules between many applications
By default the modules directory is near Animator executable file. Though, you 
can move it elsewhere in order not to have many copies of modules on your 
harddrive, and use the same copy of those modules in every applicatio that uses 
them.
To have modules put ina given directory, you just have to copy MODPLACE near the 


modules directory and add the path where MODPLACE is to the PATH variable of 
your environment.
Example: PATH=C:\;D:\;E:\GCC;C:\ANIMATOR
Means that those files are here:
	C:\ANIMATOR\MOPLACE
	C:\ANIMATOR\MODULES\*.AVC,*.AAC

As TOS doesn't let you create environment variables, you have to use a program 
like Gemenv. The environment manager is a bit buggy but the rest is reliable and 


working fine. As far as I'm concerned, I find it very usefull.
The use of Gemenv is simple: after having read the doc, put ROOT.ENV on the root 


of your boot drive (e.g.: C:\ROOT.ENV) and GEMENV.PRG in your AUTO folder. Edit 
C:\ROOT.ENV with GEMENV.PRG and modify the PATH line. Don't change anything to 
ENV$ROOTSIZE and ENV$OPTIONS. Save the option file, quit and reboot.
Note that Animator doesn't mind if MODPLACE is an empty file. Anyway, please 
spread only the original file with Animator. Thanks.
To finish with modules, you may ask why do I use such a file to locate modules. 
The reason is that I'm using Shell_Find() to locate modules, and this system 
function may only find files. Not folders. If you don't know that, remember that 


Shell_Find() looks for the given file in the current directory, then in the 
application directory (given by Shell_Read()) and then in the directories listed 


in the PATH environment variable.

7. Credits
Stabylo has designed the kernel and many modules, and Seb has done the rest, 
which consist especially in sound modules and DSP code.
Thanks to the following pepole for their help and beta tests:
-	Pascal Ricard
-	Guillaume Tello


 Benjamin Gandon (Stabylo), March the 20th, 2001.