![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Still having fun...
![]() Join Date: Dec 2006
Beans: 3,007
Ubuntu 9.10 Karmic Koala
|
Top 10 Tricks and Tips for the svn MPlayer
=====================
Introduction ===================== I have been writing guides for the installation of the svn MPlayer under Ubuntu Linux for sometime now but for this short guide I would like to move away from installation issues and deal with usage of this amazing program. Documented here are what I have somewhat cheaply described as 'Top 10 Tricks and Tips for the svn MPlayer', they are a collection of the 10 best tips and tricks that I have found either useful or fascinating in my dealings with the svn MPlayer. Perhaps you have your own favoured techniques? Please feel free to add these to this thread and with any luck we will all learn a little more. ------------------------------------- Tip 1: Using 'scaletempo'... ------------------------------------- The audio filter 'scaletempo' has many, many options but I am pretty sure that most will use it to playback their favourite media at different speed but with the same pitch. So to play your media file at half-speed and scale the sound to the same speed, without altering the pitch, you would run: Code:
mplayer -af scaletempo -speed 0.5 my_file.mp4 ------------------------------------------- Tip 2: Play from archives... ------------------------------------------- MPlayer can play from stdin thus opening the way to using any program as input that can output media to stdout. One popular usage is to play directly compressed media files directly from rar archives: Code:
unrar p -inul myarchive.rar | mplayer -cache 2048 - Code:
tar xvf test.tar.gz -O | mplayer -cache 2048 - Code:
unzip -p test.zip | mplayer -cache 2048 - ---------------------------------------- Tip 3: Convert anything to wav... ---------------------------------------- One of the biggest drawcards of MPlayer is that it will play almost any media file available. But a very valuable adjunct to this ability is MPlayer's capacity to then output audio files in wav format: Code:
mplayer input.wma -vc null -vo null -ao pcm:fast:waveheader:file=output.wav ---------------------------------------- Tip 4: Using cropdetect... ---------------------------------------- I have read manuals describing in enormous detail how to calculate cropping parameters to enable the removal of black bands from DVD movies with usually only marginal comprehension and chaotic results on encoding. But the good news for me, and perhaps for you also, is that MPlayer possesses an excellent video filter that does all of the work and all of the maths. The best way to use this filter is to start a little way into the movie as I illustrate here using the greatest movie of all time, the Matrix: Code:
mplayer -vf cropdetect=round:16 -ss 10:00 dvd:// Code:
mplayer -vf rectangle=720:416:0:80 -ss 20:00 dvd:// Code:
mplayer -vf crop=720:416:0:80,scale -zoom -xy 800 dvd:// ---------------------------------------- Tip 5: Taking screenshots... ---------------------------------------- MPlayer comes with a very nice and easy to use video filter that allows taking single or multiple screenshots. The syntax is simple: Code:
mplayer -vf screenshot my_file.mp4 Code:
mplayer -nosound -frames 5 -vo png:z=9 my_file.mp4 ---------------------------------------- Tip 6: Getting a little wacky... ---------------------------------------- Well, it is time to move away from all this serious commandline stuff and experience just a little wackiness by playing a media file converted to ascii art: Code:
mplayer -vo aa -monitorpixelaspect 0.5 myfile.mp4 Code:
mplayer -vo aa:help -frames 0 myfile.mp4 Code:
mplayer -vo caca myfile.mp4 ---------------------------------------- Tip 7: Playing audio cds... ---------------------------------------- At a time when almost everybody is getting very excited about the svn MPlayer finally getting decent access to DVD movie menus I would like to mention that MPlayer does an excellent job playing audio cds. The simplest way to play the entire music cd is: Code:
mplayer -cache 2048 cdda:// Code:
mplayer -cache 2048 -cache-min 80 cddb:// ---------------------------------------- Tip 8: Using playlists... ---------------------------------------- There is no great mystery to playlists, they are simply lists of files with each file on its own line. It is easy enough to create one and run it with MPlayer and I shall demonstrate here how I create a playlist of my own Ogg Vorbis files: Code:
find $HOME/music -name '*.ogg' > $HOME/ogg.pls Code:
mplayer -loop 2 -shuffle -playlist $HOME/ogg.pls ---------------------------------------- Tip 9: Using DVD menus... ---------------------------------------- There is vast excitement at the moment as the svn MPlayer has finally received working access to DVD menus. There is still some work to go but the structure is definitely in place and to have a quick look at the work in progress the syntax is as simple as: Code:
mplayer -mouse-movements -nocache dvdnav:// Code:
[protocol.dvdnav] profile-desc="Profile for reading DVD menus" mouse-movements=yes nocache=yes Code:
mplayer dvdnav:// Code:
$ mplayer -profile help Available profiles: protocol.dvdnav Profile for reading DVD menus Code:
mplayer -profile menus dvdnav:// --------------------------------------- Tip 10: TOOLS & DOCS/tech... ---------------------------------------- A final tip that reveals the hidden treasure of scripts and documentation available in the svn MPlayer source that is so often neglected. In the TOOLS directory is a small collection of scripts and I list a few of them below to whet your appetite:
and many more. Well worth a read as well are the many documents scattered in another subdirectory DOCS/tech and again I give a small sample here of some of those available:
And then of course there are the html docs that can be generated from DOCS/xml, but I have reached the end of this guide now so perhaps I will deal with these in another guide... ============================ And in conclusion... ============================ I have had an immensely good time writing this guide as it has allowed me to explore in some depth some of the many aspects of MPlayer that I have perhaps only glossed over in the past. I hope that the guide will allow others to gain a greater knowledge of this great program while at the same time I am ready to learn from the comments of those who have better or different ideas to contribute. And remember: "Have Fun!!". --Andrew May 15th, 2009
__________________
Do you think that's air you're breathing? Last edited by andrew.46; May 14th, 2009 at 08:54 PM.. Reason: Rewrote the dvdnav section... |
|
|
|
| Bookmarks |
| Tags |
| dvdnav, mplayer, scaletempo, svn, tips |
| Thread Tools | |
| Display Modes | |
|
|