Mplayer
From Wsms
mplayer is a free media player
rip streams with mplayer
A specific example. You want to grab a physics lecture from U.C. Berkeley. In firefox, visit http://webcast.berkeley.edu/course_details.php?seriesid=1906978373, right click on the icon for a webcast, select open link in new tab. Then save the document, titled something link 17152.rm, to disk.
The rm document is just a text file. Open it with a text editor and you will see something like:
rtsp://169.229.131.16:554//classes/f2006/phys10/20060905.rm?start=00:00:02&end=01:21:49
The mplayer command you want is:
ggeller@harrison:~$ mplayer -noframedrop -dumpfile physics10_03.rm -dumpstream "rtsp://169.229.131.16:554//classes/f2006/phys10/20060905.rm?start=00:00:02&end=01:21:49"
This gives you a new .rm file that you can play at your leisure.
Another example:
mplayer -noframedrop -dumpfile zonbu.wmv -dumpstream "mms://www.gentil.com/zonbu.wmv"
play a dvd
Sometimes you need to tell mplayer the device file:
ggeller@harrison:~$ mplayer -dvd-device /dev/scd0 dvd://
On recent debian-derived distributions like ubuntu and linuxmint, the dvd drive might be /dev/sr0. And, the xv output device can give better performance and more features including full screen.
ggeller@lincoln-wxp:~$ mplayer -dvd-device /dev/sr0 -vo xv dvd://
play a dvd image
You can copy a dvd to an image file using k3b. Then mount the dvd with something like:
ggeller@harrison:~$ sudo mount -o loop,ro image.iso dir_name
Launch mplayer with to play the image:
ggeller@harrison:~$ mplayer -dvd-device /path/dir_name dvd://
When I did this, mplayer didn't present the dvd menu, it starts on the first track of the dvd and nothing else with my dvd image. In another case, it played all of the tracks in order.
bypass some of the X driver optimization
Sometimes when you attach a second monitor to a Thinkpad T30 like Eola, you see a black rectangle on the external monitor when you try to watch a movie. Sometimes the -vo option fixes that problem:
mplayer -vo x11 zonbu.wmv
use some of the X driver optimization
Some installs of mplayer default to the x11 video out driver. That doesn't work if you want to zoom to full screen. You have to specify the xv driver.
mplayer -vo xv zonbu.wmv
some default key bindings
- 9/0 decrease/increase volume
- >/< next/previous item in playlist
- q exits mplayer
- v toggle subtitle visibility
- b / j Cycle through the available subtitles.
- + and - adjust audio delay
- # Cycle through the available audio tracks.
using the .srt subtitle files
If you have a .avi file and a .srt file with the same name in the same directory, mplayer will show the subtitles.
using the vobsub option
You can use mplayer with subtitle files. This command is copied from a dvdrip log:
cd /home/ggeller/dvdrip-data/don_giovanni_2/avi/001 && mplayer -vobsub don_giovanni_2-001-sid00 -vobsubid 0 /home/ggeller/dvdrip-data/don_giovanni_2/vob/001/*
playing mp4 files
mplayer can play mp4 files if the right libraries are installed. This command installs them along with some other packages:
ggeller@harrison:~$ sudo apt-get -y install xmms-mp4
example of geometry, loop, and nosound command line options
ggeller@roosevelt:~/Videos$ mplayer -loop 0 -ontop -nosound -geometry 99%:5% *.wmv
the -xy option
If you want to play a movie with a particular width and its original aspect ration:
mplayer -vo xv -xy 640
mplayer can't find the right codec for some flv files from youtube
This is because your version of ffmpeg is out of date. You can wait for the newer one to be packaged, you can play them in Windows, or you can build a new ffmpeg package from the source code. See: http://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html and http://www.getlifebox.org/tag/x264/ and a bug report against ubuntu that I lost the url for.
see also
man mplayer
totem
