10l: comparison of char* ptrs with string literals
[mplayer.git] / TOOLS / README
blob1c6e4a64765cd1c55048f15fcbfc511085def653
1 README for the TOOLS directory
2 ==============================
4 Preamble
5 --------
7 In this directory you can find some nice scripts and code that makes
8 using MPlayer and MEncoder easier, for example scripts for DVD track
9 encoding in three pass mode or creating SVCDs from a movie.
11 FIXME: Document all the stuff in the subdirectories:
13 mpfc
14 benchmark
15 bmovl-test
16 mwallp
17 subfont-c
18 GL-test
19 TVout
20 TVout/matroxset
21 TVout/con2fb
22 benchmark-gab
23 netstream
24 realcodecs
27 MPlayer scripts in the TOOLS dir
28 --------------------------------
30 midentify
32 Author:       Tobias Diedrich
34 Description:  Runs 'mplayer -identify' for all arguments while preventing
35               video window flashing.
37 Usage:        midentify file1 [file2 ...]
40 mpconsole
42 Author:       Rich Felker
44 Description:  Script to run MPlayer on the console (fbdev/mga_vid/etc.) without
45               the console text and/or flashing cursor getting in the way.
47 Usage:        mpconsole [mplayer options]
50 mplmult.sh
52 Author:       Reimar Döffinger
54 Description:  Example how to output video on multiple windows in sync. Might
55               be even more useful in combination with -vo ggi to distribute
56               the video arbitrarily.
58 Usage:        mplmult.sh <n> <options>
59               n        Number of MPlayer instances that display the video.
60               options  Any options you would pass to MPlayer, more than
61                        one file will usually not work.
64 subsearch.sh
66 Author:       Alex Beregszaszi
68 Description:  Collects subtitle files from the directory given as argument
69               ('.' if none is given) and its subdirectories and prints
70               them as a comma separated list to stdout.
72 Usage:        subsearch.sh [directory]
73               mplayer -sub `subsearch.sh` movie
76 x2mpsub.sh
78 Author:       Gabucino
80 Description:  Converts the subtitles in the current directory into MPsub
81               format (subtitles go in ./converted-subtitles/).
83 Usage:        x2mpsub.sh
86 mp.pl
88 Author:       Felix Bünemann
90 Description:  Small helper script that allows to play multiple files with
91               MPlayer. Wildcards are supported.
93 Usage:        mp.pl <parameters> <files>
94               Where <parameters> are all possible command line switches
95               for MPlayer and <files> can be either a list of files,
96               like file1 file2 file3 and/or a wildcard definition,
97               like *.avi.
99               example: mp.pl -vo x11 /dvd/VIDEO_TS/VTS_05_*.VOB movie.asf
102 wma2ogg.pl
104 Author:       Peter Simon
106 Description:  Converts WMA files to Ogg or MP3.
108 Usage:        wma2ogg [options] <-f FILE1 | -f FILE2 ... | -a>
109               -f, -file   filename
110               -a          converts all WMA files in the current directory
111               -t          output filetype (ogg, mp3) [default=ogg]
112               -lame       I wanna use L.A.M.E. sure enough!
113               -br         bitrate (kb/s) [default=from the WMA]
114               -del        remove WMA file(s) after the transcoding
118 MEncoder scripts in the TOOLS dir
119 ---------------------------------
121 divx2svcd
123 Author:       Miklos Vajna
125 Description:  A simple utility that creates an SVCD from a video in an AVI
126               container.
128 Usage:        divx2svcd <input_avi> [options]
129               see 'divx2svcd -h' for more info
132 menc2pass
134 Author:       Felix Bünemann
136 Description:  Helper script to ease MEncoder two pass encoding. Give it all
137               the encoding parameters you would pass to mencoder, but leave
138               out the (v)pass=<n> suboption.
140 Usage:        menc2pass <options>
143 mencvcd
145 Author:       Jürgen Hammelmann
147 Description:  Converts DVD (or anything else that MPlayer plays) to (S)VCD
149 Usage:        mencvcd <basename> [mencvcd options] [mplayer options]
150               see 'mencvcd -h' for more info
152 Note:         Requires MPlayer, mjpegtools, VCDImager, cdrdao, and optionally
153               LAME, tooLAME and SoX.
156 dvd2divxscript.pl
158 Author:       Florian Schilhabel
160 Description:  Yet another DVD to divx helper script.
161               This script encodes a DVD track in three pass mode to MPEG-4 with
162               libavcodec. Optionally it writes the resulting movie file to
163               CD-ROM the corresponding audio track to MP3. It can also shut
164               down the computer when it finishes. If you like, you can
165               watch the MEncoder output on /dev/tty8.
167 Usage:        --help       show help
168               --abr        (AudioBitRate) Please enter the desired bitrate this
169                            can be either [96|128|192] kbit/sec (default: 128).
170               --lang       Specify the Language of the audio track this can be
171                            for example <en> or <de> (default: <de>).
172               --dvd        Specify the DVD track you want to encode.
173               --cdsize     Specify the size of your CD-ROM (default: 700MB).
174               --shutdown   Shutdown the system, when the encoding process has
175                            finished. Needs appropriate privileges.
176               --out        Specify the name of your encoded movie. The file
177                            extension will be appended automatically.
178               --writecd    Takes the newly created movie and writes it to a
179                            CD-ROM.
180               --writedev   cdrecord device identifier, for example 0,1,0
181               --speed      writing speed (default: 4)
182               --dvd-device device to pull the video off (default: /dev/dvd)
185 aconvert
187 Author:       Jonas Jermann
189 Description:  A hack to allow MEncoder to read respectively encode from audio
190               only files.
192 Usage:        aconvert <"input file"> <"output file"> <"options">
193               If no options are specified the following is assumed:
194               -oac lavc -lavcopts acodec=mp3:abitrate=192
196 Note:         The script is probably bash dependent and it's just a quick
197               hack, feel free to improve it (or much better: fix MEncoder ;).
201 qepdvcd.sh
203 Author:       Reynaldo H. Verdejo Pinochet
205 Description:  converter from any supported format to VCD/SVCD PAL/NTSC
207 Usage:        qepdvcd.sh file <options>
208               Run with no arguments to see the list of options.
210 Note:         You will need vcdimager/cdrecord to master/burn the resulting
211               files.
215 encode2mpeglight
217 Author:       Giacomo Comes
219 Description:  Convert anything MPlayer can play to VCD/SVCD/DVD MPEG.
221 Usage:        encode2mpeglight -o <NAME> -n <NORM> [options] <source>
222               For help and documentation run:
223                 encode2mpeglight -h
224                 encode2mpeglight -l
225                 encode2mpeglight -doc
227 Note:         This script uses only MEncode/MPlayer. Check the final log
228               file for informations/warnings about the encoding process.
231 Tech scripts in the TOOLS dir
232 -----------------------------
234 fastmem.sh
236 Author:       Arpi
238 Description:  benchmark/testbed for fastmemcpy stuff
240 Usage:        fastmem.sh
243 sws-test
245 Author:       Michael Niedermayer
247 Description:  Very simple script to generate PNG images from a video with all
248               -sws methods.
250 Usage:        sws-test <video-file> <start-pos> <res>
252               example: sws-test abc.avi 10 160:120
255 calcbpp.pl
257 Author:       Moritz Bunkus
259 Description:  A script that calculates the $bpp for a movie, mentioned in
260               DOCS/tech/encoding-tips.txt, see that document for more info.
262 Usage:        calcbpp.pl <resolution> <aspect ratio> <bitrate> <fps>
263               resolution:    the cropped but unscaled resolution
264                              (use '-vf cropdetect')
265               aspect ratio:  the encoded aspect ratio. All DVDs come at
266                              720x576 but contain a flag that tells the player
267                              wether it should display the DVD at an aspect
268                              ratio of 4/3 (1.333) or at 16/9 (1.777). Have a
269                              look at MPlayer's output - there's something
270                              about 'prescaling'. That's what you are looking
271                              for.
272               bitrate:       the video bitrate in kbit/s
273               fps:           the fps
275               example: calcbpp.pl 720x440 16/9 896 25
278 countquant.pl
280 Author:       Moritz Bunkus
282 Description:  Counts the quantizers used for the encoding, mentioned in
283               DOCS/tech/encoding-tips.txt, see that document for more info.
285 Usage:        countquant.pl < divx2pass.log
286               It will print out which quantizer was used how often. If you see
287               that e.g. the lowest quantizer (vqmin=2) gets used for > 95% of
288               the frames then you can safely increase your picture size.
291 perlbench.pl
293 Author:       Felix Bünemann
295 Description:  fastmemcpy benchmark script
297 Usage:        perlbench.pl
300 plotpsnr.pl
302 Author:       Jonas Jermann
304 Description:  Draw PSNR log graphs using gnuplot.
306 Usage:        plotpsnr.pl [options] <file>
307               -h, --help    Display this help message
308               -quant        Display quantizers
309               -size         Display size
310               -psnr         Display PSNR
311               -iframes      Display I-frames
312               -pframes      Display P-frames
313               -bframes      Display B-frames
314               -aframes      Display all frames in different colors
315               -cmp <file2>  Compare two files
316               -qs <style>   Quantizer style
317               -ss <style>   Size style
318               -ps <style>   PSNR style
320               Default: -quant -size -psnr -qs "p" -ss "i" -ps "p"
322 Note:         Requires gnuplot. Comparison is based on file2. Comparison
323               assumes that the frame numbers of both files fit.
326 psnr-video.sh
328 Author:       Matthias Wieser
330 Description:  Calculates the PSNR between two existing video files.
331               The PSNR is calculated frame by frame.
332               Also prints the overall PSNR.
333               The script can be used to:
334                * Compare different softwarescalers (should I use
335                  -sws 1 or -sws 2 ?)
336                * Compare different resolutions (is it better to scale
337                  down to 640x360 or to 560x320)
338                * Compare different deinterlacers
339                * Compare different video codecs
340                * Compare video filters (is it better to use -vf hqdn3d
341                  or lavcopts:nr=400)
342                * [...]
344 Usage:        psnr-video.sh <file1> <file2> [<frames>] [<options1>] [<options2>]
346               <file1> and <file2> are the video files for which the PSNR
347                 should be calculated.
348               [<frames>] is the number of frames to process, starting
349                 from frame 1.
350               [<options1>] are additional MPlayer options for <file1>
351               [<options2>] are additional MPlayer options for <file2>
353               A file called ./psnr.dat will be created with the following
354               content:
356               File;Y;Cb;Cr
357               00000001.ppm;34.23;39.54;40.06;35.426
358               00000002.ppm;33.03;38.71;39.26;34.271
359               00000003.ppm;33.45;38.91;39.28;34.655
360               00000004.ppm;32.72;38.69;38.85;33.972
361               [...]
362               00000247.ppm;35.55;40.84;42.15;36.785
363               PSNR:;35.9887
365 Note:         This script relies on the the tool "pnmpsnr" for the
366               frame-by-frame PSNR calculation.
367               Be aware that psnr-video.sh needs a lot of temporary space
368               in /tmp/.
371 asfinfo
373 Author:       Arpi
375 Description:  a simple ASF header display program
377 Usage:        asfinfo <filename.asf>
379 Note:         Also see MPlayer's -identify option.
382 avi-fix
384 Author:       Arpi
386 Description:  A simple tool to fix chunk sizes in RIFF AVI files.
388 Usage:        avi-fix [-fix] <badfile.avi>
390 Note:         It does not check or fix the index, to do this use
391               'mencoder -forceidx -oac copy -ovc copy'.
394 bios2dump
396 Author:       Nick Kurshev
398 Description:  Extract your PC BIOS and save it to file.
400 Usage:        As argument requires DOS interrupt number in hexadecimal form.
401               As output - will write 64KB file which will named:
402               SSSS_OOOO.intXX
403       where:  SSSS - segment of BIOS interrupt handler
404               OOOO - offset of BIOS interrupt handler
405               XX   - interrupt number which was passed as argument
408 checktree.sh
410 Author:       Ivo van Poorten
412 Description:  Check the source tree for anomalies.
414 Usage:        checktree.sh -help
416 Note:         This script is meant for developers to check the current
417               source tree and/or the patches they are working on.
420 mphelp_check.py
422 Author:       Uoti Urpala
424 Description:  Check console message translations for common errors.
426 Usage:        mphelp_check.py [--missing] <master file> <files to check>
428 Note:         Compares MPlayer translation files against a master file and
429               reports conflicting arguments, extra strings not present in
430               the base file and (optionally) missing strings.
433 cpuinfo
435 Author:       Jürgen Keil
437 Description:  the prototype ../cpuinfo.c
439 Note:         Used by configure to emulate /proc/cpuinfo on non-Linux systems.
442 dump_mp4
444 Author:       Arpi
446 Description:  MPEG4-ES stream inspector, dumps the stream startcodes.
449 fastmemcpybench
451 Author:       Felix Bünemann
453 Description:  benchmark/testbed for fastmemcpy stuff
455 Note:         Also see fastmem.sh.
458 mem2dump
460 Author:   Nick Kurshev
462 Description:  Dump memory block to file.
464 Usage:        As argument requires absolute address of memory dump and its
465               length (in hexadecimal form).
466               As output - will write file which will be named:
467               memADDR_LEN.dump
468        where: ADDR - given address of memory
469               LEN  - given length of memory
472 movinfo
474 Author:       Arpi
476 Description:  Show QuickTime MOV file structure.
478 Usage:        movinfo <filename.mov>
481 png2raw
483 Author:       Arpi
485 Description:  PNG to RAW image converter, used by .raw font creators.
487 Usage:        png2raw <file1> [file2...]
490 vivodump
492 Author:       Arpi
494 Description:  Dump H.263 frame headers from VIVO files.
496 Usage:        vivodump <input_file> <output_file>
500 Miscellaneous scripts in the TOOLS dir
501 --------------------------------------
503 subedit.pl
505 Author:       Michael Klepikov
507 Description:  A script for pipelined editing of subtitle files.
509 Usage:        subedit.pl [switches]
510     -if,--input-format <fmt>   input format; supported: SRT (default: SRT)
511     -of,--output-format <fmt>  output format; supported: SRT
512                                (default: input format)
513     -s,--shift <time>          shift all subtitles by <time>
514                                (format: [-]hh:mm:ss,fraction)
515     -c,--scale <time>          scale by adding <time> to overall duration
516     -f,--split-from <time>     drop subtitles that end before <time>
517     -t,--split-to <time>       drop subtitles that start after <time> (will
518                                truncate timing if it overlaps a boundary)
519     -r,--renumber              renumber SRT subtitles in output
520     -d,--debug                 enable debug output
521     -h,--help                  help message
524 w32codec_dl.pl
526 Author:       Tom Lees
528 Description:  This script will use the Windows Media Player codec download
529               infrastructure to aquire the codecs listed in codecs.conf and put
530               them in a directory named "codecs/" below the current directory.
532 Usage:        w32codec_dl.pl <codecs.conf location>
534 Note:         You will need the libwww-perl stuff and the cabextract utility
535               which can be found at http://www.kyz.uklinux.net/cabextract.php3.
538 install-w32codecs.sh
540 Author:       Andrea Menucci, thuglife
542 Description:  Downloads binary codecs from mplayerhq.hu and installs them
543               on a Debian system.
545 Usage:        install-w32codecs.sh install
546               install-w32codecs.sh uninstall
549 vobshift.py
551 Author:       Gábor Farkas
553 Description:  Adjust the time-info in vobsub files
555 Usage:        vobshift.py in.idx out.idx +8.3
556               Will shift the time by 8.3 seconds
559 subrip.c
561 Author:       Kim Minh Kaplan
563 Description:  Transform VOBsub subtitles into Subrip text subtitles using
564               GOCR/JOCR.
566 Usage:        subrip <vobsub basename> [subid [output filename] ]
568 Note:         Requires at least JOCR/GOCR 0.37.
569               You will have to change the 'vobsub_id' value if you want a
570               subtitle different from number 0. Hint: You can view the
571               subtitle that is being decoded with "display subtitle-*.pgm".
574 alaw-gen.c
576 Author:       Arpi
578 Description:  Generates alaw/ulaw tables.
580 Note:         Created to work around a past license issue, no longer useful.
583 avisubdump.c
585 Author:       Tobias Diedrich
587 Description:  Dumps vobsub soft subtitles streams embedded in AVI files.
589 Usage:        avisubdump <movie.avi>
593 Format conversion scripts in the TOOLS dir
594 ------------------------------------------
596 302m_convert.c
598 Author:       Reimar Döffinger
600 Description:  Converts D-Cinema Audio (SMPTE 302M?) to WAV.
602 Usage:        302m_convert <in.302> <out.wav>
605 360m_convert.c
607 Author:       Reimar Döffinger
609 Description:  Converts D-Cinema Video (MPEG-2 in GXF, SMPTE 360M) to MPEG-ES.
610               Use -demuxer mpeges to play the converted file.
612 Usage:        360m_convert <in.gxf> <out.m2v>