There are some pretty cool things that you can do with mplayer/mencoder using various switches and output formats. You can produce an animated gif of your movie using the command
mplayer test.avi -vo gif89a:15.0:test.gifI suppose you could use a DVD movie (dvd://1) as the source as well, but who would want an entire movie in animated gif format? I can't show you this on my system because my mplayer isn't compiled with gif89a support.. which brings up another point about mplayer/mencoder. If you use the binary package, you will only have support for the input/output formats that the package maintainer built it, which is usually ok, but if you get more in depth with encoding and playing videos, you might want to compile your own mplayer from source at some point to make sure all of the options you want are included.
The next trick is one that I use to rotate the videos that I take with my digital camera (if they were taken in portrait orentation). Just run the command
mencoder source.avi -o dest.avi -oac copy -ovc lavc -vf rotate=1This processes for a minute and then you end up with a file dest.avi with the correct orientation. Read the man page for options on the rotate parameter.
The last trick that we'll cover is one that I use in an application that I wrote for work The command is
mplayer -quiet source.avi -vo jpeg -ao nullNow what you end up with here is a directory full of JPG images that are each frame of the video. You could also have specified PNGs or TGAs. But I use this to process videos in a Tivo like web application to allow me to serve the video back to users inside of a javascript video player in a web page at any frame rate they request and any section of the video (like from 10 secs in to 50 secs in). It works quite nicely.
I'm sure there are tons of ideas you could come up with about how to use the many many features of this set of applications as well. If you do, show me and we'll cover them in a future PCLug.
![[logo]](logo.png)