Try running "./demo" to see if everything is working correctly (requires a recent version of perl). Either your mplayer must be built with libjpeg support, or you must give the path to a movie file as an argument to this script. When all tests have run you must terminate the demo with CTRL+C.
To actually do something useful, use the mplayer_wrapper and rve_wrapper scripts. They both take a "prefix" as their first argument, this is the prefix for the file names that will be used as temporary files. "test" is a fine value for this. Running the scripts with no arguments will print their usage.
Here is an example:
$ (./mplayer_wrapper test mymovie.avi&)
$ ./rve_wrapper test -- 0 hscroll_text -s 3 "Does this work?"
rve_wrapper will print out the command it's executing so that you can see what the real command line to rve is. You will find information about the available commands in the Command list section.
First create a fifo (named pipe) for talking to mplayer:
$ mkfifo myfifo.fifo
Run rve, for example like:
$ ./rve 320 240 0 hscroll_text "It works" > myfifo.fifo
Then (probably in another shell) run mplayer with
$ mplayer -vf bmovl=1:0:myfifo.fifo movie.avi
Run rve with no arguments for usage information:
Usage: rve [OPTIONS] SCREENW SCREENH LENGTH COMMAND [CMD-OPTIONS] [ARGS] Send video effects to stdout. See http://rve.sf.net. -c Text color. Specified like #123456 -f Framerate. The maximum framerate rve should output commands with. -F Font. You'll also want to set fontpath in ~/.gozerrc -q Quiet mode. Output nothing to stderr. -s Font size. Measured in percentage of screen height -S Style file. See gozer's docs for syntax -v Increase verbosity. Specify twice for debug output. -x X offset. If rve should only operate in a limited area of the screen -y Y offset. If rve should only operate in a limited area of the screen Valid commands are: bluebox clear static_text fading_text hscroll_text tile_text clock showimg simple_anim streamer rollcount vote drift See the manual for info about each command.
|-r||Max repeat count|
|-s||Speed, an integer > 0, defaults to 2|
|-a||An optional alpha value from 0 to 255|
|-s||The movement speed. Around 2-5 usually looks good.|
|(d)elay||The number of frames that the digits to the left will lag behind those to the right. This makes it look more mechanical when multiple digits are changing.|
|(D)igits||Force this number of digits to be shown, even if the number is smaller or larger.|
|(g)roupspacing||Extra space, in pixels, between pairs of digits (e.g. in a time value like 2:03:58).|
|(i)mage||background that will be shown behind the counter always. When using this, it will only look right if |
|(s)ize_of_digits||The font size for printing the digits. When it has to match a background image, this is best given as a negative value, which is interpreted as absolute.|
|(t)ext||An optional text label to be shown next to the counter.|
|x,y||Position of counter|
|X,Y||Where to place the counter inside the background image, if one is given. Otherwise these parameters are ignored.|
To make this work you need to install Driftnet and run the TOOLS/driftd script on the machine that will be capturing from the network. You may want to edit the Driftnet Makefile to disable the GUI code. Also remember to edit the configuration at the top of driftd and to create a temporary dir on the capturing machine (default: ./drift).
Instead of connecting to a host/port, the drift command can also just read from stdin if you give the "-" argument.
To create your own effects add a class to effect.h that inherits from Effect and provides the run() and step() member functions. If it takes any parameters it should do so in a param() function.
If part of the effect can be implemented as an Animation, that should be done. This ensures maximum reusability and also helps to seperate parts of your code that are independent. See Effect_move_animation for a simple example and Effect_counter for an advanced one.
Oh, and indentations are done with 4-space tabs, like God intended them to be :-)