home *** CD-ROM | disk | FTP | other *** search
/ ST-Computer Leser 1998 October / STC_CD_10_1998.iso / MUSIK / MPLAYER / SLIDSHOW.DOC < prev   
Text File  |  1998-09-26  |  14KB  |  400 lines

  1. M_PLAYER: SLIDE-SHOWS and MOVIE-MAKER section (Quick Time, AVI, FLM or GIF)
  2. ╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  3.  
  4. How to run a slideshow?
  5. ╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  6.     Just choose your batch file instead of an animation (please, keep
  7. BAT as the batch extension).
  8.  
  9. Slideshow of animations
  10. ╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  11.     See at the end of this file...
  12.  
  13. How to run a movie-maker?
  14. ╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  15.     It's the same as before, but the batch file must contain the line
  16. 'o=file_path' to know witch file to create. If you simply clic on 'Go!', it
  17. will act as a slide-show, to get the Movie-Creation, you must use the key
  18. 'Alt' while clicking on the 'Go!' button. Easy, no?
  19.     It's the type of images you give that will determine the type of
  20. movie created:
  21.     tga -> Quick Time movie with RLE16 compression (and sound)
  22.     img -> Quick Time movie with RLE8 compression (and sound)
  23.         -> (*) Video AVI movie with RLE8 compression (and sound)
  24.     gif -> Gif movie (no sound)
  25.     Degas -> Extended FLM
  26.     Neochrome -> Extended FLM
  27.  
  28.     (*) with 'img', the default format is MOV (Quick Time), but if the
  29. file specification in 'o=file_path' starts with a '#', an AVI file will
  30. be created instead.
  31.  
  32. How to create a BATCH FILE for a SLIDESHOW?
  33. ╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  34.  
  35.     A batch file is a simple ascii text files that contains 3 parts:
  36.     - the identifier
  37.     - the header
  38.     - the datas
  39.  
  40.     Only the first line must start ont the leftmost row, for the
  41. others, spaces and tab to indent are allowed, there must be only one
  42. command per line, lines starting with ';' are considered as comments.
  43.     The size of the file is limited to 12488 bytes (I think it's
  44. enough...).
  45.  
  46.     The identifier
  47.     ╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  48.  
  49.     It must be on the first line, first character and is always:
  50.         M_PLAYER or m_player (or m_PlAYer if you prefer!)
  51.  
  52.     The header
  53.     ╣╣╣╣╣╣╣╣╣╣
  54.     Starts on the second line (or after some comments lines) and gives
  55. general infos on the slideshow:
  56.  
  57.     w=xxxx    the width of the movie
  58.     h=xxxx    the height of the movie
  59.     c=xxxx    the compression (the type of file):
  60.             tga2 for TGA 2 uncompressed (24 or 16 bits)
  61.             ximg for IMG with 'XIMG' extension and 256 colors
  62.             gif8 for either gif87a or gif89a
  63.             dega for Degas 320x200x16
  64.             neoc for Neochrome 320x200x16
  65.     b=xxxx    size of the buffer to load the entire largest image file
  66.  
  67.     Those first 4 infos can't be ommited! The following can (for a
  68. slide show, but must appear for a MOVIE-create):
  69.  
  70.     t=xxxx    time for one frame (number of 1/200sec), with a GIF it is
  71.         the time to wait between two frames (without the display
  72.         time), with 0, no delay block will be added.
  73.     f=xxxx    number of frames in the whole slideshow
  74.     o=file_path    path and name of the file to create (MOV, RLE16,
  75.             RLE8 or GIF, or FLM compression), if file_path
  76.             starts with '#' (with ximg only), the AVI format
  77.             will be outputed instead of the Quick Time format.
  78.     s=file_path    path and name of the sound file to add to the MOV
  79.             (WAV or AVR, 8/16 bits, mono/stereo). For MOV/AVI
  80.             the frequencies are 11025, 22050, 44100, for FLM
  81.             12517, 25033, 50066 +/-2%. For FLM, 16 bits is
  82.             forbidden.
  83.             * not used with GIF movies *
  84.  
  85.     If 's=' is present, then 't=' is ignored and the frame rate is
  86. computed according to the sound duration.
  87.  
  88.     q=x    quality, default value is 5 (5 bits per color), but you
  89.         can reduce it to 4,3,2 or even 1 to get a more efficient
  90.         compression, but with a lost of quality. I've tried 'q=2'
  91.         on some frames, it seems to be correct (better
  92.         compression, good quality). 'q=' is only useful when a MOV
  93.         is created, it fixes the number of signifiant bits to know
  94.         if the color of a pixel has changed or not.
  95.         * not used with GIF, FLM movies *
  96.     k=xxxx    specifies the rate of the key frames (for example, with
  97.         k=5, frames #5, 10, 15, 20 ... will be key frames). See
  98.         below: "Key frames use".
  99.         * not used with GIF, FLM movies *
  100.     r=xxxx    for GIF files only, fixes the number of loops for that
  101.         movie, the range is 0 to 65535. This will add the NETSCAPE
  102.         extension as follows:
  103.         $21, $ff, $0b, 'NETSCAPE', '2.0', $03, $01, Intel word=xxxx,
  104.         $00.
  105.         A value of 0 indicated an infinite loop.
  106.  
  107.     The order of those infos is not fixed, but you musn't put spaces
  108. between the characters (w = 320 is wrong!).
  109.  
  110.     The datas
  111.     ╣╣╣╣╣╣╣╣╣
  112.     Starts immediately after the header with a key word:
  113.     data
  114.  
  115.     Then, every line is read and:
  116.     if starting with a '.' --> it's a command, executes it
  117.     else               --> it's the name of a file, displays it,
  118.                    and its name becomes the current name.
  119.  
  120.     commands are:
  121.     .rept xxxx
  122.     .endr
  123.         repeat xxxx times what's between rept and endr. Loops can
  124.         be nested.
  125.  
  126.     .disp
  127.         displays the file corresponding to the current name
  128.     .getp
  129.         uses the palette of the next file (only applied with
  130.         palette based images). If '.getp' is not specified, then
  131.         the palette will be ignored (for example when all of the
  132.         frames share the same palette that is loaded once), this
  133.         speeds up the display when running in NOVA 256c (because
  134.         the palette must be passsed to the VDI).
  135.         * not used with GIF movies *
  136.     .incr
  137.         increments a number found into the current name (example,
  138.         if name was: C:\IMAGES\FRM00001.TGA it becomes
  139.                  C:\IMAGES\FMR00002.TGA)
  140.     .decr
  141.         same as above with a decrementation.
  142.     .stop
  143.         end of the slideshow. This command MUST appear, else the
  144.         program crashes.
  145.     .keyf
  146.         forces the next frame to be a key-frame (if k=xxxx is
  147.         used, then this auto key counter will be reset). See below
  148.         at "Key frames use".
  149.         * not used with GIF,FLM movies *
  150.  
  151. GIF movies
  152. ╣╣╣╣╣╣╣╣╣╣
  153.     A GIF movie can only be created from GIF images, those images must
  154. have the same global size and the same global palette (if a local palette
  155. is present, it will be stored).
  156.     Every other bloc than $2C (the images) are skipped (for example
  157. copyrights, infos, etc...). Only one bloc is always added, the one defined
  158. by myself that indicates the number of frames:
  159.     $21, $ff, $0b, 'M_PLAYER', 'FRM', $04, Intel Long Frames, $00
  160.  
  161.     This bloc must be located just after the local palette (and, if
  162. present, after the Netscape extension concerning the looping).
  163.  
  164.     The delay time between two frames is stored into an unsigned word,
  165. so it is limited to 65535, this means no more than 655.35 seconds (and so
  166. 131070 for 't=' as it a number of 1/200 of second). If the value is
  167. greater than this limit, 0 will be used instead (meaning no delay!).
  168.  
  169.     M_Player can be used to modify an existing GIF-Animation (for
  170. example to add the M_PLAYER extension, the Netscape extension or to modify
  171. the delays between two frames,...).
  172.     Example, I have an animation NUKE01.GIF that has no M_Player
  173. extension, with a infinite loop and that is played too fast, I run it once
  174. to get the infos:
  175.     size 64x64, 9 frames displayed (in the stats box at the end. When
  176. an anim has a loop, SHIFT stops it!).
  177.     Then I create the following batch file:
  178.  
  179. m_pLaYeR
  180. w=64            the size I noted
  181. h=64
  182. c=gif8
  183. b=16000               the file is only 15xxx bytes long
  184. t=11                 11/200 = 0,055s of delay
  185. f=9                   9 frames into my initial anim
  186. r=3                  will repeat only 3 times (instead of infinite)
  187. o=C:\TGA\nuke.GIF     the output file
  188. data
  189. C:\TGA\nuke01.GIF       only one file!
  190. .stop
  191.  
  192.     Upon exit, I'll have a new anim NUKE.GIF with the M_PLAYER
  193. extension, with different delays and with 3 loops only. The output file is
  194. shorter, because M_Player has skipped very info bloc!
  195.  
  196. FLM Movies
  197. ╣╣╣╣╣╣╣╣╣╣
  198.     As they are created from ST-Low images (c=dega or c=neoc), you can
  199. omit 'w=', 'h=' and 'b=', they will be filled with the following default
  200. values:
  201.     w=320
  202.     h=200
  203.     b=33000 (PI1 32034 or 32066, NEO 32128)
  204.  
  205.     A FLM file hasn't the 'key frame' capability, and so, be sure that
  206. the frame rate you specify will be possible on your machine. Else, as no
  207. frame is skipped, the images could last longer than the sound.
  208.  
  209.  
  210. Example of a BATCH FILE:
  211. ╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  212.     (The comments starting with ** don't appear in the file!)
  213.  
  214. ** start of file
  215. M_Player                        ** Id
  216. ; comes from a FLI            ** comment
  217. w=320                           ** width
  218. h=200                ** height
  219. ; 67/200 means 3 f/s        ** comment
  220. t=67                ** time for one frame
  221. f=29                ** number of frames
  222. c=tga2                ** files are TGA 2 uncompressed
  223. b=192018            ** size of one file (320x200x3 + 18)
  224. data                ** end of header/start of data
  225. E:\imprimer\mou00001.tga    ** first frame, display it
  226. .rept 2                ** twice the whole
  227.   .rept 7            ** 7 times
  228.     .incr            ** increment name of file (00002 to 00008)
  229.     .disp            ** and display it
  230.   .endr                ** loop
  231.   .rept 7            ** another 7 times
  232.     .decr            ** dec name of file (00007 to 00001)
  233.     .disp            ** and display it
  234.   .endr                ** loop
  235. .endr                ** twice!
  236. .stop                ** end of slideshow
  237.  
  238.  
  239.     Well, this example has displayed:
  240.     mou00001.tga
  241.     mou00002.tga
  242.     ...
  243.     mou00007.tga
  244.     mou00008.tga
  245.     mou00007.tga
  246.     ...
  247.     mou00001.tga
  248.     And this twice! The images came from a FLI that I saved using the
  249. Step by Step mode.
  250.  
  251.     INCR and DECR commands can only work correctly if the names of the
  252. files END with digits! (for example 00001BB.TGA won't work because it
  253. ends with BB).
  254.  
  255. Another example:
  256. ╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  257.     You can specify each file if you don't want to use commands:
  258.  
  259. M_PLAYER
  260. w=184
  261. h=240
  262. b=50000
  263. c=ximg                ** t= ommited because there's a sound
  264. f=5
  265. o=#C:\ANIM\US.AVI        ** will create an AVI if Alt+GO ('#')
  266. s=C:\SOUNDS\KISS.AVR        ** will add this sound if Alt+GO
  267. data
  268. .getp                ** supposing that all have the same
  269. C:\IMAGES\I.IMG            ** palette, we load it once!
  270. C:\IMAGES\YOU.IMG
  271. C:\IMAGES\I.IMG
  272. C:\IMAGES\YOU.IMG
  273. C:\IMAGES\YOU_N_I.IMG
  274. .stop
  275.  
  276.     '.stop' is the only command that must appear.
  277.  
  278.  
  279. Common errors (those I made...)
  280. ╣╣╣╣╣╣╣╣╣╣╣╣╣
  281.     * The header is built BEFORE adding the frames, so the number of
  282. frames that you specify (f=xxxx) must be exact! Else you'll get a totally
  283. corrupted MOV file. To ensure that it's the right value, launch a
  284. slide-show before encoding, if total_frames=frames_displayed, it's Ok.
  285.     * this is the same for 'w=' and 'h='. Be sure that all of the
  286. images have the same size, the one you specified.
  287.     * the 'supported' message into the graphic box is based upon your
  288. 'c=xxxx'. The program hasn't read a file to verify that, ensure that it's
  289. the good fromat.
  290.     * The sound frequencies accepted are those from the PC world:
  291. 11025, 22050 and 44100 KHz, or the closest possible to them. Else, you get
  292. an 'Unsupported' message in the sound box.
  293.     * if using IMG images you get the RLE8 compression that uses a
  294. palette. But, the MOV can contain only ONE palette, so you must be sure
  295. that all the images share the same colors, else, it's the last palette
  296. read (with .getp) that will be saved. The same with AVI files.
  297.  
  298. Key-Frames use
  299. ╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  300.  
  301.     Here is a brief introduction to the utility of inserting
  302. key-frames into a movie. There are two cases:
  303.     - your machine is fast and no frame will be skipped when playing,
  304.     then you don't need to use the key frames.
  305.     - your machine isn't so fast and there may be some frames skipped,
  306.     the use of key-frames is highly recommended!
  307.  
  308.     What happens when a frame is skipped?
  309.  
  310.     In order to increase the compression, only the differencies
  311. between two frames are stored, this means that one frame is only a partial
  312. display. If one frame is skipped (because of the synchronisation) the next
  313. one won't have the background expected! You'll get a wrong display.
  314.  
  315.     A key frame is used to solve this problem, it is a complete
  316. reconstruction of the screen. So, when a frame is skipped, M_PLAYER just
  317. has to wait for the next key-frame to go on displaying.
  318.  
  319.     An example:
  320.  
  321.     Suppose you have used k=5 and t=40 (5 frames per second) into the
  322. header and that your machine can only display 3 images /second. Here is
  323. what will happen:
  324.  
  325.     second #1: frames 1,2,3
  326.     second #2: frames 5,6,7
  327.     second #3: frames 10,11,12
  328.     etc...
  329.  
  330.     Every key frame will be at its exact position (in time), and
  331. between 2 key-frames, the player does as much as it can. If you play this
  332. same movie with a faster machine, you'll get maybe:
  333.     second #1: frames 1,2,3,4
  334.     second #2: frames 5,6,7,8
  335.     second #3: frames 10,11,12,13
  336.     etc...
  337.     And with a very fast machine, you'll get every frame.
  338.  
  339.     The best is to put 2 key-frames per second, this way, the display
  340. will be synchro with the sound twice a second.
  341.  
  342.     You must know that a key frame is larger than a normal one,
  343. because it rebuilds every pixel, and that inserting too few key-frames
  344. will lead to a poor synchro quality. It's a question of balance. Make some
  345. tests to find the best solution.
  346.  
  347.     Idea: it's a good idea to choose the frames where the background
  348. changes suddenly, because anyway most of the pixels will be rebuilt!
  349.  
  350.  
  351. Slideshow of animations
  352. ╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣
  353.     The batch file is a simple text file and must begin with this
  354. identifier on the leftmost row of the first line:
  355.  
  356.     SLIDEANI or slideani
  357.  
  358.     Then, each line contains either a command (starting with a '.'),
  359. or a valid file name. The file MUST end with the ".stop" command.
  360.  
  361.     Example:
  362.  
  363. SLIDEANI
  364. e:\anim\intro.avi
  365. .rept 5
  366. e:\anim\me.avi
  367. e:\anim\you.avi
  368. .endr
  369. e:\anim\end.avi
  370. .stop
  371.  
  372.     This file will start with 'intro.avi', then will display 5 times
  373. me.avi and you.avi, finally it will display end.avi.
  374.     Valid commands are:
  375.     .rept xxx, .endr, .incr, .decr, .disp, .stop
  376.  
  377.     For example:
  378.  
  379. SLIDEANI
  380. e:\anim\intro.avi
  381. e:\anim\scene000.avi
  382. .rept 50
  383.     .incr
  384.     .disp
  385. .endr
  386. e:\anim\end.avi
  387. .stop
  388.  
  389.     This file will start with 'intro.avi', then it will display 51
  390. scenes named 'scene000.avi' to 'scene050.avi', and it will end with
  391. 'end.avi'.
  392.  
  393.     IMPORTANT NOTE
  394.     --------------
  395.  
  396.     No resolution switch is made between two animations, no 'clear
  397. screen' either. So, you must be sure that all of your animations will be
  398. displayed into the same resolution and that every new one will cover the
  399. last image of the previous one to avoid garbage on the screen and crashes
  400. of the system.