Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wiki:mplayer-nodeps [2011/05/05 17:39] – external edit 127.0.0.1wiki: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://www.linuxtutorialblog.com/post/tutorial-playing-around-with-mplayer|http://www.linuxtutorialblog.com/post/tutorial-playing-around-with-mplayer]]
-http://www.linuxtutorialblog.com/post/tutorial-playing-around-with-mplayer +
 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:
  
-<code>[[rechosen@localhost ~]]$ mplayer <somefile></code>+//rechosen@localhost// ~]$ **mplayer filename**
  
 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: Left arrow and Right arrow (10 seconds) Down arrow and Up arrow (1 minute) Page down and Page up (10 minutes)
-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:
  
-<code>mplayer dvd://<titlenumber></code>+**mplayer dvd:<nowiki>/</nowiki>/<titlenumber>**
  
 Replace <titlenumber> with a number, like 1, 2 or 3. I personally prefer xine for DVD playback, as xine does support DVD menus. Replace <titlenumber> with a number, like 1, 2 or 3. I personally prefer xine for DVD playback, as xine does support DVD menus.
  
-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:
  
-<code>[[rechosen@localhost ~]]$ mplayer -sub <somesubtitlefile> <somefile></code>+//rechosen@localhost// ~]$ **mplayer -sub <somesubtitlefile> <somefile>**
  
 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:
  
-<code>[[rechosen@localhost ~]]$ mplayer dvd://<titlenumber> -slang nl,en</code>+//rechosen@localhost// ~]$ **mplayer dvd:<nowiki>/</nowiki>/<titlenumber> -slang nl,en**
  
 The above command would try to use dutch subtitles first, and fall back on english ones if dutch subtitles weren't available. The above command would try to use dutch subtitles first, and fall back on english ones if dutch subtitles weren't available.
  
-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's man page) (note that the full list can be found in MPlayer's man page)
-"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) +  *     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) 
-"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) +      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 +  SP  Pause/resume playback 
-"q" or Esc => Quit MPlayer (Esc does not quit but only stops playback when in GUI mode) +  ESC Quit MPlayer (Esc does not quit but only stops playback when in GUI mode) 
-"/" and "*(or "9and "0"=> Decrease / increase playback volume respectively +  / *   (or //9// and //0//) Decrease/increase playback volume respectively 
-"m" => Mute sound (toggle) +      Mute sound (toggle) 
-"T(usually Shift + "t"=> Toggle stay-on-top (very useful if you don't want your video window to be overlapped by an other application) +      (usually Shift + t) Toggle stay-on-top (very useful if you don't want your video window to be overlapped by an other application) 
-"b" and "j" => Cycle through available subtitles +  b 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) +  x 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(usually Shift + "i"=> Show the filename of the movie being played (useful if you want to know that without interrupting the movie) +      (usually Shift + i) Show the filename of the movie being played (useful if you want to know that without interrupting the movie) 
-"1" and "2" => Adjust contrast* +  1 2   Adjust contrast* 
-"3" and "4" => Adjust brightness* +  3 4   Adjust brightness* 
-"5" and "6" => Adjust hue* +  5 6   Adjust hue* 
-"7" and "8" => Adjust saturation* +  7 8   Adjust saturation* 
- +<nowiki>*</nowiki> These do not always work; see the MPlayer man page.
-  These do not always work; see the MPlayer man page. +
- +
-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, MPlayer can generate the index it needs to play the file correctly. By using the -idx option, you can tell MPlayer to generate an index when necessary: 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, MPlayer can generate the index it needs to play the file correctly. By using the -idx option, you can tell MPlayer to generate an index when necessary:
  
-<code>[[rechosen@localhost ~]]$ mplayer -idx <somefile></code>+//rechosen@localhost// ~]$ **mplayer -idx <somefile>**
  
 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:
  
-<code>[[rechosen@localhost ~]]$ mplayer -forceidx <somefile></code>+//rechosen@localhost// ~]$ **mplayer -forceidx <somefile>**
  
 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/Video) sync. There are pretty much two possibilities in this case: 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
-Some videos (mainly flv files) are encoded in a horrible way, and MPlayer will have enormous trouble with the A/V (Audio/Video) sync. There are pretty much two possibilities in this case: +
-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:
  
-<code>[[rechosen@localhost ~]]$ mplayer -autosync 30 -mc 2.0 <somefile></code>+//rechosen@localhost// ~]$ **mplayer -autosync 30 -mc 2.0 <somefile>**
  
 In the second case, you shouldn't allow MPlayer to fix anything when it comes to the sync: In the second case, you shouldn't allow MPlayer to fix anything when it comes to the sync:
  
-<code>[[rechosen@localhost ~]]$ mplayer -autosync 0 -mc 0 <somefile></code>+//rechosen@localhost// ~]$ **mplayer -autosync 0 -mc 0 <somefile>**
  
 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: 
 +//rechosen@localhost// ~]$ **mplayer -framedrop <somefile>**
  
-As video playback is a CPU-intensive task, older and slower systems may have a hard time to play certain video filesMPlayer 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:+Playing Youtube or Other Flash Videos Using Mplayer-nodeps.tcz
  
-<code>[[rechosen@localhost ~]]$ mplayer -framedrop <somefile></code>+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: mplayer -zoom test.flv. Note that the -zoom allows you to resize the video by clicking-and-dragging a corner. The arrow keys allow you to "jump" forward and back in the video... plus or minus 25% for up or down arrow; plus or minus one minute for left and right arrows.
  
 +==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 /home/tc/.mplayer/config 
 +|   commandline         config     description   | 
 +| -zoom               | zoom=1             | enable fullscreen zoom or resizeing | 
 +| -monitoraspect 16:9 | monitoraspect=16:9 | for widescreen | 
 +| -af pan=2:1:1:1:   if you want downmix stereo into mono  || 
 +| -framedrop          | framedrop=1        | frame dropping (for slow machines) | 
 +-hardframedrop      | hardframedrop=1    | heavy frame dropping (for slow machines) | 
 +| -lavdopts skipframe=nonref:skiploopfilter=all:fast=1 | lavdopts=skipframe=nonref:skiploopfilter=all:fast=1 | increase processing speed twice (for slow machines) | 
 +| -softvol softvol-max 800 | softvol=yes softvol-max=800 | if you want to volume up over the limit | 
 +| -af scaletempo      | -                  | scale audio tempo while maintaining pitch | 
 +| -sws 4 |sws=4 | upscaling (nearest neighbour) for slow machines | 
 +| -novideo           |novideo=1 | turn off of video processing (for slow machines) | 
 +| -nosound              |nosound=1 | turn off audio processing (for slow machines) |
  
-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 annoyinglyHere is one way to get around that problemMplayer (without dependencies) allows this in the most efficient way possible.+For more parameters go to: https://ubuntuforums.org/archive/index.php/t-77329.html
  
-1Start 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 to play it with no stutters or pauses. Typical command: mplayer -zoom test.flv. Note that the -zoom allows you to resize the video by clicking-and-dragging a corner. The arrow keys allow you to "jump" forward and back in the video--plus or minus 25% for up or down arrow; plus or minus one minute for left and right arrows.+https://github.com/larsmagne/mplayer/blob/master/etc/example.conf
  
  
-This info from: http://forum.tinycorelinux.net/index.php?topic=5719.0 
Print/export
QR Code
QR Code wiki:mplayer-nodeps (generated for current page)