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