home *** CD-ROM | disk | FTP | other *** search
- M_PLAYER: SLIDE-SHOWS and MOVIE-MAKER section (Quick Time, AVI, FLM or GIF)
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
-
- How to run a slideshow?
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- Just choose your batch file instead of an animation (please, keep
- BAT as the batch extension).
-
- Slideshow of animations
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- See at the end of this file...
-
- How to run a movie-maker?
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- It's the same as before, but the batch file must contain the line
- 'o=file_path' to know witch file to create. If you simply clic on 'Go!', it
- will act as a slide-show, to get the Movie-Creation, you must use the key
- 'Alt' while clicking on the 'Go!' button. Easy, no?
- It's the type of images you give that will determine the type of
- movie created:
- tga -> Quick Time movie with RLE16 compression (and sound)
- img -> Quick Time movie with RLE8 compression (and sound)
- -> (*) Video AVI movie with RLE8 compression (and sound)
- gif -> Gif movie (no sound)
- Degas -> Extended FLM
- Neochrome -> Extended FLM
-
- (*) with 'img', the default format is MOV (Quick Time), but if the
- file specification in 'o=file_path' starts with a '#', an AVI file will
- be created instead.
-
- How to create a BATCH FILE for a SLIDESHOW?
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
-
- A batch file is a simple ascii text files that contains 3 parts:
- - the identifier
- - the header
- - the datas
-
- Only the first line must start ont the leftmost row, for the
- others, spaces and tab to indent are allowed, there must be only one
- command per line, lines starting with ';' are considered as comments.
- The size of the file is limited to 12488 bytes (I think it's
- enough...).
-
- The identifier
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨
-
- It must be on the first line, first character and is always:
- M_PLAYER or m_player (or m_PlAYer if you prefer!)
-
- The header
- ¨¨¨¨¨¨¨¨¨¨
- Starts on the second line (or after some comments lines) and gives
- general infos on the slideshow:
-
- w=xxxx the width of the movie
- h=xxxx the height of the movie
- c=xxxx the compression (the type of file):
- tga2 for TGA 2 uncompressed (24 or 16 bits)
- ximg for IMG with 'XIMG' extension and 256 colors
- gif8 for either gif87a or gif89a
- dega for Degas 320x200x16
- neoc for Neochrome 320x200x16
- b=xxxx size of the buffer to load the entire largest image file
-
- Those first 4 infos can't be ommited! The following can (for a
- slide show, but must appear for a MOVIE-create):
-
- t=xxxx time for one frame (number of 1/200sec), with a GIF it is
- the time to wait between two frames (without the display
- time), with 0, no delay block will be added.
- f=xxxx number of frames in the whole slideshow
- o=file_path path and name of the file to create (MOV, RLE16,
- RLE8 or GIF, or FLM compression), if file_path
- starts with '#' (with ximg only), the AVI format
- will be outputed instead of the Quick Time format.
- s=file_path path and name of the sound file to add to the MOV
- (WAV or AVR, 8/16 bits, mono/stereo). For MOV/AVI
- the frequencies are 11025, 22050, 44100, for FLM
- 12517, 25033, 50066 +/-2%. For FLM, 16 bits is
- forbidden.
- * not used with GIF movies *
-
- If 's=' is present, then 't=' is ignored and the frame rate is
- computed according to the sound duration.
-
- q=x quality, default value is 5 (5 bits per color), but you
- can reduce it to 4,3,2 or even 1 to get a more efficient
- compression, but with a lost of quality. I've tried 'q=2'
- on some frames, it seems to be correct (better
- compression, good quality). 'q=' is only useful when a MOV
- is created, it fixes the number of signifiant bits to know
- if the color of a pixel has changed or not.
- * not used with GIF, FLM movies *
- k=xxxx specifies the rate of the key frames (for example, with
- k=5, frames #5, 10, 15, 20 ... will be key frames). See
- below: "Key frames use".
- * not used with GIF, FLM movies *
- r=xxxx for GIF files only, fixes the number of loops for that
- movie, the range is 0 to 65535. This will add the NETSCAPE
- extension as follows:
- $21, $ff, $0b, 'NETSCAPE', '2.0', $03, $01, Intel word=xxxx,
- $00.
- A value of 0 indicated an infinite loop.
-
- v=max_x,max_y,start_x,start_y,img_cell,loop_x
- for MOV files only, this allows you to generate a
- QuickTime VR file (an interactive movie).
- max_x=number of columns (start at 1)
- max_y=number of lines (start at 1)
- start_x=horiz. index of the first cell (0 to max_x-1)
- start_y=verti. index of the first cell (0 to max_y-1)
- img_cell=number of images per cell
- loop_x=1 for horizontal looping, 0 to stop at boundaries
- See 'QuickTime VR' below for more details.
-
- m=xxxx
- if you call M_Player as a movie maker (MOV,AVI,FLM,GIF)
- from your own program and you don't want to fill your hard
- drive with TGAs, you can send to M_Player the images ones
- by one using a kind of dialog through this stucture:
- xxxx is an address that points to three longs:
- LONG your_routine
- LONG frame number requiered by m_player
- LONG the adress where your pixels are
- WORD flag for pixel format
- Each time my compressor needs an image file, it fills the
- frame number and then calls your routine. Your routine
- must fill the buffer address and the flag format.
- Supported values are (for now):
- FLAG=$0000 -> pixels are NOVA 15 bits VVVBBBBB xRRRRRVV
- FLAG=$FFFF -> pixels are FALC 16 bits RRRRRVVV VVVBBBBB
- For both formats, the output is MOV/RLE16 as if TGA files
- were used.
- The FILE names given in the "data" section
- are dummy but must appear, for example, with 100 images
- you can write:
- data
- DUMMY.TGA
- .rept 99
- .disp
- .endr
- .stop
-
- Then you call M_Player with:
- m_player -d-a my_batch.bat
- (no dialogs, ALT on to create the movie).
-
- The order of those infos is not fixed, but you musn't put spaces
- between the characters (w = 320 is wrong!).
-
- The datas
- ¨¨¨¨¨¨¨¨¨
- Starts immediately after the header with a key word:
- data
-
- Then, every line is read and:
- if starting with a '.' --> it's a command, executes it
- else --> it's the name of a file, displays it,
- and its name becomes the current name.
-
- commands are:
- .rept xxxx
- .endr
- repeat xxxx times what's between rept and endr. Loops can
- be nested.
-
- .disp
- displays the file corresponding to the current name
- .getp
- uses the palette of the next file (only applied with
- palette based images). If '.getp' is not specified, then
- the palette will be ignored (for example when all of the
- frames share the same palette that is loaded once), this
- speeds up the display when running in NOVA 256c (because
- the palette must be passsed to the VDI).
- * not used with GIF movies *
- .incr
- increments a number found into the current name (example,
- if name was: C:\IMAGES\FRM00001.TGA it becomes
- C:\IMAGES\FMR00002.TGA)
- .decr
- same as above with a decrementation.
- .stop
- end of the slideshow. This command MUST appear, else the
- program crashes.
- .keyf
- forces the next frame to be a key-frame (if k=xxxx is
- used, then this auto key counter will be reset). See below
- at "Key frames use".
- * not used with GIF,FLM movies *
-
- QuickTime VR movies
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- As the viewer will access the images in a random order, every
- first frame of each cell must be a 'key frame', so you have to use
- k=img_cell (for example, k=1 for fixed images).
- The number of frames (found at f=xxxx) must be the same as
- max_x*max_y*img_cell.
- Note that the indexes (start_x and start_y) start at 0, the
- first line isn't #1.
- The order of the images in the data section is a bit strange. For
- example, I want to create a VR with 3 lines of 4 columns, id 12 fixed images
- numbered 0 to 11:
-
- 3 2 1 0 <- X indexes
- -----------
-
- 11 10 9 8 | 2 <- Y indexes
- 7 6 5 4 | 1
- 3 2 1 0 | 0
-
- When replaying, suppose I fixed start_x=2 and start_y=1 (image
- #6), with UP arrow I will access #10, with DOWN #2, with LEFT #7 and with
- RIGHT #5. The line would be:
- v=4,3,2,1,1,0 for non looping (eg: stops at images #7 and #4)
- v=4,3,2,1,1,1 for x looping (eg: image #7 is linked to image #4).
-
-
- GIF movies
- ¨¨¨¨¨¨¨¨¨¨
- A GIF movie can only be created from GIF images, those images must
- have the same global size and the same global palette (if a local palette
- is present, it will be stored).
- Every other bloc than $2C (the images) are skipped (for example
- copyrights, infos, etc...). Only one bloc is always added, the one defined
- by myself that indicates the number of frames:
- $21, $ff, $0b, 'M_PLAYER', 'FRM', $04, Intel Long Frames, $00
-
- This bloc must be located just after the local palette (and, if
- present, after the Netscape extension concerning the looping).
-
- The delay time between two frames is stored into an unsigned word,
- so it is limited to 65535, this means no more than 655.35 seconds (and so
- 131070 for 't=' as it a number of 1/200 of second). If the value is
- greater than this limit, 0 will be used instead (meaning no delay!).
-
- M_Player can be used to modify an existing GIF-Animation (for
- example to add the M_PLAYER extension, the Netscape extension or to modify
- the delays between two frames,...).
- Example, I have an animation NUKE01.GIF that has no M_Player
- extension, with a infinite loop and that is played too fast, I run it once
- to get the infos:
- size 64x64, 9 frames displayed (in the stats box at the end. When
- an anim has a loop, SHIFT stops it!).
- Then I create the following batch file:
-
- m_pLaYeR
- w=64 the size I noted
- h=64
- c=gif8
- b=16000 the file is only 15xxx bytes long
- t=11 11/200 = 0,055s of delay
- f=9 9 frames into my initial anim
- r=3 will repeat only 3 times (instead of infinite)
- o=C:\TGA\nuke.GIF the output file
- data
- C:\TGA\nuke01.GIF only one file!
- .stop
-
- Upon exit, I'll have a new anim NUKE.GIF with the M_PLAYER
- extension, with different delays and with 3 loops only. The output file is
- shorter, because M_Player has skipped very info bloc!
-
- FLM Movies
- ¨¨¨¨¨¨¨¨¨¨
- As they are created from ST-Low images (c=dega or c=neoc), you can
- omit 'w=', 'h=' and 'b=', they will be filled with the following default
- values:
- w=320
- h=200
- b=33000 (PI1 32034 or 32066, NEO 32128)
-
- A FLM file hasn't the 'key frame' capability, and so, be sure that
- the frame rate you specify will be possible on your machine. Else, as no
- frame is skipped, the images could last longer than the sound.
-
-
- Example of a BATCH FILE:
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- (The comments starting with ** don't appear in the file!)
-
- ** start of file
- M_Player ** Id
- ; comes from a FLI ** comment
- w=320 ** width
- h=200 ** height
- ; 67/200 means 3 f/s ** comment
- t=67 ** time for one frame
- f=29 ** number of frames
- c=tga2 ** files are TGA 2 uncompressed
- b=192018 ** size of one file (320x200x3 + 18)
- data ** end of header/start of data
- E:\imprimer\mou00001.tga ** first frame, display it
- .rept 2 ** twice the whole
- .rept 7 ** 7 times
- .incr ** increment name of file (00002 to 00008)
- .disp ** and display it
- .endr ** loop
- .rept 7 ** another 7 times
- .decr ** dec name of file (00007 to 00001)
- .disp ** and display it
- .endr ** loop
- .endr ** twice!
- .stop ** end of slideshow
-
-
- Well, this example has displayed:
- mou00001.tga
- mou00002.tga
- ...
- mou00007.tga
- mou00008.tga
- mou00007.tga
- ...
- mou00001.tga
- And this twice! The images came from a FLI that I saved using the
- Step by Step mode.
-
- INCR and DECR commands can only work correctly if the names of the
- files END with digits! (for example 00001BB.TGA won't work because it
- ends with BB).
-
- Another example:
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- You can specify each file if you don't want to use commands:
-
- M_PLAYER
- w=184
- h=240
- b=50000
- c=ximg ** t= ommited because there's a sound
- f=5
- o=#C:\ANIM\US.AVI ** will create an AVI if Alt+GO ('#')
- s=C:\SOUNDS\KISS.AVR ** will add this sound if Alt+GO
- data
- .getp ** supposing that all have the same
- C:\IMAGES\I.IMG ** palette, we load it once!
- C:\IMAGES\YOU.IMG
- C:\IMAGES\I.IMG
- C:\IMAGES\YOU.IMG
- C:\IMAGES\YOU_N_I.IMG
- .stop
-
- '.stop' is the only command that must appear.
-
-
- Common errors (those I made...)
- ¨¨¨¨¨¨¨¨¨¨¨¨¨
- * The header is built BEFORE adding the frames, so the number of
- frames that you specify (f=xxxx) must be exact! Else you'll get a totally
- corrupted MOV file. To ensure that it's the right value, launch a
- slide-show before encoding, if total_frames=frames_displayed, it's Ok.
- * this is the same for 'w=' and 'h='. Be sure that all of the
- images have the same size, the one you specified.
- * the 'supported' message into the graphic box is based upon your
- 'c=xxxx'. The program hasn't read a file to verify that, ensure that it's
- the good fromat.
- * The sound frequencies accepted are those from the PC world:
- 11025, 22050 and 44100 KHz, or the closest possible to them. Else, you get
- an 'Unsupported' message in the sound box.
- * if using IMG images you get the RLE8 compression that uses a
- palette. But, the MOV can contain only ONE palette, so you must be sure
- that all the images share the same colors, else, it's the last palette
- read (with .getp) that will be saved. The same with AVI files.
-
- Key-Frames use
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨
-
- Here is a brief introduction to the utility of inserting
- key-frames into a movie. There are two cases:
- - your machine is fast and no frame will be skipped when playing,
- then you don't need to use the key frames.
- - your machine isn't so fast and there may be some frames skipped,
- the use of key-frames is highly recommended!
-
- What happens when a frame is skipped?
-
- In order to increase the compression, only the differencies
- between two frames are stored, this means that one frame is only a partial
- display. If one frame is skipped (because of the synchronisation) the next
- one won't have the background expected! You'll get a wrong display.
-
- A key frame is used to solve this problem, it is a complete
- reconstruction of the screen. So, when a frame is skipped, M_PLAYER just
- has to wait for the next key-frame to go on displaying.
-
- An example:
-
- Suppose you have used k=5 and t=40 (5 frames per second) into the
- header and that your machine can only display 3 images /second. Here is
- what will happen:
-
- second #1: frames 1,2,3
- second #2: frames 5,6,7
- second #3: frames 10,11,12
- etc...
-
- Every key frame will be at its exact position (in time), and
- between 2 key-frames, the player does as much as it can. If you play this
- same movie with a faster machine, you'll get maybe:
- second #1: frames 1,2,3,4
- second #2: frames 5,6,7,8
- second #3: frames 10,11,12,13
- etc...
- And with a very fast machine, you'll get every frame.
-
- The best is to put 2 key-frames per second, this way, the display
- will be synchro with the sound twice a second.
-
- You must know that a key frame is larger than a normal one,
- because it rebuilds every pixel, and that inserting too few key-frames
- will lead to a poor synchro quality. It's a question of balance. Make some
- tests to find the best solution.
-
- Idea: it's a good idea to choose the frames where the background
- changes suddenly, because anyway most of the pixels will be rebuilt!
-
-
- Slideshow of animations
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- The batch file is a simple text file and must begin with this
- identifier on the leftmost row of the first line:
-
- SLIDEANI or slideani
-
- Then, each line contains either a command (starting with a '.'),
- or a valid file name. The file MUST end with the ".stop" command.
-
- Example:
-
- SLIDEANI
- e:\anim\intro.avi
- .rept 5
- e:\anim\me.avi
- e:\anim\you.avi
- .endr
- e:\anim\end.avi
- .stop
-
- This file will start with 'intro.avi', then will display 5 times
- me.avi and you.avi, finally it will display end.avi.
- Valid commands are:
- .rept xxx, .endr, .incr, .decr, .disp, .stop
-
- For example:
-
- SLIDEANI
- e:\anim\intro.avi
- e:\anim\scene000.avi
- .rept 50
- .incr
- .disp
- .endr
- e:\anim\end.avi
- .stop
-
- This file will start with 'intro.avi', then it will display 51
- scenes named 'scene000.avi' to 'scene050.avi', and it will end with
- 'end.avi'.
-
- IMPORTANT NOTE
- --------------
-
- No resolution switch is made between two animations, no 'clear
- screen' either. So, you must be sure that all of your animations will be
- displayed into the same resolution and that every new one will cover the
- last image of the previous one to avoid garbage on the screen and crashes
- of the system.