LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mplayer with mouse bindings makes life easier. (https://www.linuxquestions.org/questions/linux-newbie-8/mplayer-with-mouse-bindings-makes-life-easier-914817/)

clifford227 11-21-2011 08:02 PM

Mplayer with mouse bindings makes life easier.
 
For anyone that uses mplayer to play their videos, but doesnt get enough usability from basic mplayer itself, and doesnt like gmplayer, or the other GUI's, I've just found that mplayer does actually do all I need, if I use mouse bindings. The bindings give me some extra quick functionality.

Heres my ~/.mplayer/input.conf

Quote:

MOUSE_BTN2 vo_fullscreen [[right mouse - actually toggles between full and window]]
MOUSE_BTN0 osd_show_property_text "${time_pos} - ${length}" 5000 [[left-mouse]]
MOUSE_BTN3 seek +70 [[scroll-wheel up]]
MOUSE_BTN4 seek -70 [[scroll-wheel down]]
MOUSE_BTN2-MOUSE_BTN0 Volume -10 [[hold down right mouse+click left mouse]]
MOUSE_BTN0-MOUSE_BTN2 Volume +10 [[hold down left mouse+click right-mouse]]
MOUSE_BTN0_DBL switch_ratio 1.3333 [[double-click left-mouse for 4:3 aspect]]
MOUSE_BTN2_DBL switch_ratio 1.7777 [[double-click right-mouse for 16:9 aspect]]
MOUSE_BTN1 quit [[middle-mouse click]]
The above is fairly explanatory.

[[]] is not needed in the above, it was just to show which buttons need to be used to get the desired result.

Here is again for easy copy/paste into '~/.mplayer/input.conf' if you want to try it quickly:

Quote:

MOUSE_BTN2 vo_fullscreen
MOUSE_BTN0 osd_show_property_text "${time_pos} - ${length}" 5000
MOUSE_BTN3 seek +70
MOUSE_BTN4 seek -70
MOUSE_BTN2-MOUSE_BTN0 Volume -10
MOUSE_BTN0-MOUSE_BTN2 Volume +10
MOUSE_BTN0_DBL switch_ratio 1.3333
MOUSE_BTN2_DBL switch_ratio 1.7777
MOUSE_BTN1 quit

For fine-grained control of the volume up/down commands above, put this in your ~/.mplayer/config' file:

Code:

volstep = 20

You can find what your mouse button names are by opening a video in mplayer in a terminal, and clicking on the video, it should say if the key has a binding. If you cant get the button name that way, check the following website for ideas on what it could be.

http://how-to.wikia.com/wiki/How_to_configure_MPlayer

Also, You can use some of the commands from the following webpage for the mouse bindings:

http://www.mplayerhq.hu/DOCS/tech/slave.txt

corp769 11-22-2011 01:57 PM

Good to know. I rarely use mplayer, but it is good to know that I can set up mouse bindings. Normally, I like to control everything and anything with a command line ;)

clifford227 11-22-2011 08:41 PM

Quote:

Originally Posted by corp769 (Post 4530890)
Normally, I like to control everything and anything with a command line ;)

I like to go as low as I can, or rather, make things as simple as possible for those things I do frequently, but I find with watching videos, its easier for me to have mplayer associated to video files via my file manager (xfe).

The real problem I have been having is that I like to stick to GTK2 apps or commandline (burning discs with a small mkisofs & cdrecord script etc, I cant bear the bloated QT apps for such simple tasks, Im sure you can appreciate that as a fellow Slackware user), and that limits me in what GUI I use, and 'Gmplayer' really is fiddly and difficult to use, because of the small, fiddly GUI.

With these mouse bindings I can do all that and more with just the mouse. I really like it now. Its taken all the pain out of watching a video :)

corp769 11-22-2011 09:15 PM

Honestly dude, I use the command line for EVERYTHING I do..... I use Fedora on my laptop, which I use all the time, and I still use the command line more than I do in slackware..... But as far as watching videos, yes, I use a terminal to play and control them. Is that bad?

clifford227 11-23-2011 06:38 AM

No its not bad if it works for you, I just wouldnt get the level of ease that I want from using the commandline for certain tasks. But definatley the CL is a very cool place to be, and a lot can be done from there. Its just that a file manager makes my life easier. I could do anything the FM does, on the commandline, but the FM does it faster for everyday tasks.

I think as regards the mplayer mouse bindings, they would compliment the playing of videos, wether started from the commandline or a file manager. Or you could use the key-bindings. I definatley think that one of those should be customized though if just using mplayer on its own.

corp769 11-23-2011 06:44 AM

Well I have a small multi-touch input pad, Bamboo Pen & Touch to be exact, and I use it for shortcuts as well (hardware buttons). I know, I'm on odd guy.... I just love to hack devices and make them do what I want them to do. On a side note, I rebinded the multimedia keys on my keyboard to take care of audio control, including changing songs and playing/pausing my music.

clifford227 11-23-2011 06:50 AM

Quote:

Originally Posted by corp769 (Post 4531572)
Well I have a small multi-touch input pad, Bamboo Pen & Touch to be exact, and I use it for shortcuts as well (hardware buttons).

So has this device replaced your mouse for everyday computing/web browsing? How does it work?

I have to say, I've had a horrible time with mice over the years, I cant get one that I feel comfortable with, the one I have at the moment is terrible.

corp769 11-23-2011 06:57 AM

Oh definitely not. Want to see my mouse? http://cyborggaming.com/prod/rat5.htm
Try not to drool.... LOL

clifford227 11-23-2011 07:02 AM

That is a nice mouse :D looks expensive though ;)

But thats gaming. Do you think a tablet could replace a mouse for everyday computing? In all honesty I'd love to get rid of the mouse..

corp769 11-23-2011 07:05 AM

Ehh, definitely not. I use it just as shortcuts, and to have fun with. And I'm not a gamer at all.... Well, yes, I do play minecraft, but I'm a geek, and I get to build T Flip-Flops out of redstone..... Doesn't get any better than that :)

But about the mouse.... I bought it because I had the same issues as you - I couldn't find a comfortable mouse. With the RAT 5, I can add counter-weights to weigh it down, and adjust the slider to fit in my palm better.


All times are GMT -5. The time now is 04:43 AM.