Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
wiki:mplayer-nodeps [2011/05/05 17:39] – external edit 127.0.0.1 | wiki:mplayer-nodeps [2024/06/20 20:17] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Mplayer with no dependencies (4.3MB) is a powerful, flexible and relatively compact media player capable of handling both video and music files. | + | ===== Mplayer ===== |
+ | Mplayer with no dependencies (~4.3MB) is a powerful, flexible and relatively compact media player capable of handling both video and music files. | ||
The information on mplayer is taken from the following web site: | The information on mplayer is taken from the following web site: | ||
- | + | * [[http:// | |
- | http:// | + | |
Tutorial: Playing around with MPlayer | Tutorial: Playing around with MPlayer | ||
- | |||
|rechosen | 07 February, 2007 19:15| | |rechosen | 07 February, 2007 19:15| | ||
Line 15: | Line 12: | ||
Note: this tutorial assumes that you have MPlayer installed & working and that you have some basic shell knowledge. | Note: this tutorial assumes that you have MPlayer installed & working and that you have some basic shell knowledge. | ||
- | Playing a file | + | == Playing a file == |
The most simple way of invoking MPlayer to play a media file is this: | The most simple way of invoking MPlayer to play a media file is this: | ||
- | < | + | //rechosen@localhost// ~]$ **mplayer |
MPlayer will try to auto-detect what kind of file you're trying to play (it usually succeeds) and play it. If it's an audio file, it'll just start playing and show its status and possible warnings on the command-line. If it's a video file, it'll open a window to play it in and then start playing. | MPlayer will try to auto-detect what kind of file you're trying to play (it usually succeeds) and play it. If it's an audio file, it'll just start playing and show its status and possible warnings on the command-line. If it's a video file, it'll open a window to play it in and then start playing. | ||
- | Seeking through a file | + | ==Seeking through a file== |
- | + | You can seek through a file with a set of 3 keyboard shortcut pairs. Each pair makes MPlayer seek a different amount of time, and the pair consists of a key for seeking backward and a one for seeking forward. Listed below are those key pairs, for seeking backward and forward respectively: | |
- | You can seek through a file with a set of 3 keyboard shortcut pairs. Each pair makes MPlayer seek a different amount of time, and the pair consists of a key for seeking backward and a one for seeking forward. Listed below are those key pairs, for seeking backward and forward respectively: | + | |
- | Left arrow and Right arrow (10 seconds) | + | |
- | Down arrow and Up arrow (1 minute) | + | |
- | Page down and Page up (10 minutes) | + | |
Knowing these will come in handy a lot of times. | Knowing these will come in handy a lot of times. | ||
- | Playing a DVD | + | ==Playing a DVD== |
MPlayer does not have DVD menu support (sadly), but it does support playing DVD's. You can play a DVD this way: | MPlayer does not have DVD menu support (sadly), but it does support playing DVD's. You can play a DVD this way: | ||
- | < | + | **mplayer dvd:<nowiki>/</nowiki>/< |
Replace < | Replace < | ||
- | Playing with subtitles | + | ==Playing with subtitles== |
You can play a movie with subtitles in multiple ways. When playing a movie file, you can specify a subtitle file this way: | You can play a movie with subtitles in multiple ways. When playing a movie file, you can specify a subtitle file this way: | ||
- | < | + | //rechosen@localhost// ~]$ **mplayer -sub < |
When playing a DVD movie, you can also use the DVD's subtitle by specifying a language code like this: | When playing a DVD movie, you can also use the DVD's subtitle by specifying a language code like this: | ||
- | < | + | //rechosen@localhost// ~]$ **mplayer dvd:< |
The above command would try to use dutch subtitles first, and fall back on english ones if dutch subtitles weren' | The above command would try to use dutch subtitles first, and fall back on english ones if dutch subtitles weren' | ||
- | Useful keyboard shortcuts | + | ==Useful keyboard shortcuts== |
A list of useful keyboard shortcuts (sometimes called hotkeys) in MPlayer: | A list of useful keyboard shortcuts (sometimes called hotkeys) in MPlayer: | ||
(note that the full list can be found in MPlayer' | (note that the full list can be found in MPlayer' | ||
- | "f" => Toggle between full-screen and windowed mode during video playback (you can set the option -fs on the command line to make MPlayer start playing in full-screen mode immediately) | + | * f |
- | "o" => Switch OSD (OnScreen Display) mode during video playback (for viewing how much time the movie has been playing and what its total lenght is) | + | |
- | "p" or Space => Pause / resume playback | + | |
- | "q" or Esc => Quit MPlayer (Esc does not quit but only stops playback when in GUI mode) | + | |
- | "/" and "*" | + | |
- | "m" => Mute sound (toggle) | + | |
- | "T" | + | |
- | "b" and "j" => Cycle through available subtitles | + | |
- | "x" and "z" => Adjust subtitle delay (useful if you have a subtitle that isn't 100% synced; you can then correct the time difference on the fly) | + | |
- | "I" | + | |
- | "1" and "2" => Adjust contrast* | + | |
- | "3" and "4" => Adjust brightness* | + | |
- | "5" and "6" => Adjust hue* | + | |
- | "7" and "8" => Adjust saturation* | + | |
- | + | < | |
- | | + | |
- | + | ||
- | Generating an index | + | |
+ | ==Generating an index== | ||
Sometimes, video files (mainly AVI files) have a corrupted index, or no index at all. This frequently is the case with incorrectly or incompletely downloaded files. Fortunately, | Sometimes, video files (mainly AVI files) have a corrupted index, or no index at all. This frequently is the case with incorrectly or incompletely downloaded files. Fortunately, | ||
- | < | + | //rechosen@localhost// ~]$ **mplayer -idx < |
Sometimes the file does contain an index, but a corrupted one. In those cases, you might need to force MPlayer to generate an index: | Sometimes the file does contain an index, but a corrupted one. In those cases, you might need to force MPlayer to generate an index: | ||
- | < | + | //rechosen@localhost// ~]$ **mplayer -forceidx < |
Generating an index can take some time, depending on the size of the video file, but after that, the file should play correctly. | Generating an index can take some time, depending on the size of the video file, but after that, the file should play correctly. | ||
- | Correcting bad audio/video sync | + | Correcting bad audio/video sync Some videos (mainly flv files) are encoded in a horrible way, and MPlayer will have enormous trouble with the A/V (Audio/ |
- | Some videos (mainly flv files) are encoded in a horrible way, and MPlayer will have enormous trouble with the A/V (Audio/ | + | |
- | MPlayer is trying to fix it but the sync is worsening too fast | + | |
- | MPlayer is trying to fix something that's already right and therefore pushes the sync away unnecessarily | + | |
In the first case, you should allow MPlayer to try harder to fix the sync: | In the first case, you should allow MPlayer to try harder to fix the sync: | ||
- | < | + | //rechosen@localhost// ~]$ **mplayer -autosync 30 -mc 2.0 < |
In the second case, you shouldn' | In the second case, you shouldn' | ||
- | < | + | //rechosen@localhost// ~]$ **mplayer -autosync 0 -mc 0 < |
You might wonder what those options mean. Well, setting autosync to a positive value allows MPlayer to gradually adapt its A/V correction algorithm. The higher the value, the faster MPlayer will try to correct it. The mc option specifies how many seconds MPlayer may correct every frame. Setting it to a high value (like 2.0) practically allows MPlayer to do whatever it thinks it should to correct the A/V sync. Setting it to 0 stops MPlayer from trying anything when it comes to syncing. | You might wonder what those options mean. Well, setting autosync to a positive value allows MPlayer to gradually adapt its A/V correction algorithm. The higher the value, the faster MPlayer will try to correct it. The mc option specifies how many seconds MPlayer may correct every frame. Setting it to a high value (like 2.0) practically allows MPlayer to do whatever it thinks it should to correct the A/V sync. Setting it to 0 stops MPlayer from trying anything when it comes to syncing. | ||
- | Using MPlayer on slow systems | + | ==Using MPlayer on slow systems== |
+ | As video playback is a CPU-intensive task, older and slower systems may have a hard time to play certain video files. MPlayer has a feature that will help them to keep up the playback with less CPU power: -framedrop. This will allow MPlayer not to render a frame here and there if the CPU can't handle it. On systems that are far too slow, it won't be a pleasure to “watch” the movie (the majority of the frames will just not be rendered at all), but on systems that are a bit faster, this will stop the playback from having hiccups here and there. You can use the -framedrop option like this: | ||
+ | // | ||
- | As video playback is a CPU-intensive task, older and slower systems may have a hard time to play certain video files. MPlayer has a feature that will help them to keep up the playback with less CPU power: -framedrop. This will allow MPlayer not to render a frame here and there if the CPU can't handle it. On systems that are far too slow, it won't be a pleasure to " | + | Playing Youtube or Other Flash Videos Using Mplayer-nodeps.tcz |
- | < | + | Most of us use our computers occasionally to play youtube videos or other flash content, but if the internet connection is not fast enough those videos can pause and stutter annoyingly. Here is one way to get around that problem. Mplayer (without dependencies) allows this in the most efficient way possible. |
+ | * Start the Youtube video in Opera and then push the pause button on the flashplayer so that the video loads in the background while you are doing something else. You can find the file wherever you have set up Opera to store its cache. Flash videos are often cached even if cache is configured to OFF. (I have mine in /tmp so that is in wholly in RAM memory and avoids writing to my SSD drive.) Use your file manager (mc or emelfm) to rename the file, giving it a *.flv suffix. Now you can use mplayer to play it with no stutters or pauses. Typical command: | ||
+ | ==Configuration and optimization== | ||
+ | There are two ways how you can configure mplayer: by editing config file or command line. | ||
- | ==== Playing Youtube or Other Flash Videos Using Mplayer-nodeps.tcz | + | Configure file is created when you run mplayer for the fist time in / |
+ | | | ||
+ | | -zoom | zoom=1 | enable fullscreen zoom or resizeing | | ||
+ | | -monitoraspect 16:9 | monitoraspect=16:9 | for widescreen | | ||
+ | | -af pan=2: | ||
+ | | -framedrop | ||
+ | | -hardframedrop | ||
+ | | -lavdopts skipframe=nonref: | ||
+ | | -softvol softvol-max 800 | softvol=yes softvol-max=800 | if you want to volume up over the limit | | ||
+ | | -af scaletempo | ||
+ | | -sws 4 |sws=4 | upscaling (nearest neighbour) for slow machines | | ||
+ | | -novideo | ||
+ | | -nosound | ||
- | Most of us use our computers occasionally | + | For more parameters go to: https:// |
- | 1. Start the Youtube video in Opera and then push the pause button on the flashplayer so that the video loads in the background while you are doing something else. You can find the file wherever you have set up Opera to store its cache. (I have mine in /tmp so that is in wholly in RAM memory and avoids writing to my SSD drive.) Use your file manager (mc or emelfm) to rename the file, giving it a *.flv suffix. Now you can use mplayer | + | https:// |
- | This info from: http:// |