LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mplayer - how to hook to the Linux file tool and Firefox (https://www.linuxquestions.org/questions/linux-newbie-8/mplayer-how-to-hook-to-the-linux-file-tool-and-firefox-870564/)

rholme 03-23-2011 03:20 PM

Mplayer - how to hook to the Linux file tool and Firefox
 
Two tries at building mplayer. First time failed with no sound, second time worked fine - NO CHANGES that I know of, BUT OK - it works nicely.

So if I click on a file in the Linux (fedora 14) file browser, I see using "Mplayer Media Player" as a second option, It does nothing, nor does it do anything from the Application tool menu. I do not know where the "I am doing nothing (and here is why)" error message is logged.

I can manually run mplayer or xmplayer on the .wmv file and it works.

How do I edit the menus (control files?) and have them use the newly installed and working mplayer (or xmplayer??).

Next, it would be nice to make mplayer the default tool to play videos in Firefox (the default for both is another tool (Movie player) which needs a plugin that I cannot find to work).

And finally, if I can get one or both of these working - it would be nice to set the default to the new player instead of "Movie player".

rholme 03-24-2011 05:08 PM

OK, I have found the menu files generated and installed when I put mplayer in
/home/local/share/applications/mplayer.desktop

It looks fine and has an exec value of "gmplayer"

When I run gmplayer from the command line with a video file, it runs fine.
When I run gmplayer from the command line without a video file, it also runs BUT
if I run it in the background with an "&", it loads half baked until I "fg" it.

When I run from the menu desktop, NOTHING happens (I think it is related to the background mode).

When I click on the file and select "Open with MPlayer Video Player", it also does nothing.

The only way I can view a movie someone sends me is to save it and then manually run gmplayer - this does not make sense to me.

I have to believe that others can run this tool properly.

I did take a "hot" current build when I did it - MPlayer SVN-r32784-4.5.1.
However it works from the command line, which makes me think that nothing is really wrong.

ANY SUGGESTIONS.

pwalden 04-03-2011 05:14 PM

It is not easy figure out what you are trying to do.

Well, if you have Fedora 14, if you do not have a reason to use the latest mplayer build, then install all of it including the gnome-mplayer firefox plugin from the rpmfusion repo. Then you do not have to worry about all this.

If you do not use rpmfusion, already then you can install it from http://rpmfusion.org. Then install the package gnome-mplayer. This installs all the other packages including a firefox plugin.

When you run something in the background and it stops, that is because the application is trying to write to the terminal, which it cannot do as it is running in the background. It hangs until you fg it, and give it access to the terminal. If you want to prevent the hang then route the terminal output to null or use nohup.

gmplayer <file> >/dev/null 2>&1 &

or

nohup gmplayer <file> &

rholme 04-04-2011 08:06 AM

I think you hit both questions, even if you claim to not know what I was trying to do.

a) I will get the firefox plugin and tryit

b) I suspect the "nohup" answer will take care of things when I run mplayer from the terminal
however the real problem is when the linux menu entry tries to fire up and/or I click on a
movie in the linux file browser tool - in both cases - I get nothing!!!!

I suspect that mplayer is being invoked (no >/dev/null on command) - I have no idea what is
happening - no tool comes up, no error or warning that I can find in the log files (maybe I
am looking in the wrong logs - using /var/log ...)

So in order to view the movie, I must save it (/tmp) and then manually invoke gmplayer
THEN it works fine.

Thanks - I can live with things as they are. Hopefully the firefox plugin will do the trick for
that part. It would have been nice to make it work from the menu and file browser, but ...

rholme 04-13-2011 05:35 PM

a little shakespeare
 
Sorry to say - much ado but nuttin.

I installed rpmfusion and sub-installed the current version of mplayer. All things went well and thanks for the info about rpmfusion - looks like a neat source. However things remain the same. I can play a file with mplayer and it works fine, but neither firefox NOR the Linux filetool can play things. NOTHING happens AT ALL. Short of replacing mplayer (the executable) with a shell script to log the command to /tmp and see what is going on, I am left with nothing. I will be trying that over the next few days when I have a little more time.

so:
nohup gmplayer /tmp/example.mpg
works fine
double clicking on this same file in an email attachment
AND/OR
double clicking on this same file in /tmp

results in NOTHING - no error, no anything.

Thanks again for your advice and sorry I got backlogged.

John VV 04-13-2011 06:58 PM

you might want to do some reading

installing proprietary/ patent encumbered / not opensource/ media programs
Requires installing A LOT - i do mean A LOT of third party programs .

a very GOOD "quick" glance page is Mjmwired
http://www.mjmwired.net/resources/mjm-fedora-f14.html

now fedora DOSE NOT use "sudo" by default and some will tell you to use it
Others will tell you NOT TO !

it is up to you to add a security hole ( my self i do not use "sudo" !)

use " su - " with out the ""
for example
http://www.mjmwired.net/resources/mj...a-f14.html#yum
use
Code:

su -
##### your root password when asked for #####
rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

rpm -ivh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

and this is a very good start for multimedia
http://www.mjmwired.net/resources/mj...l#mediaplayers
BUT the mplayer all 2010 package is OUT OF DATE use the all-2011


then there is DangerMouse's page - also a VERY GOOD READ
http://www.dnmouse.org/autoten/
??? well that page changed ???
but "autoten" IS A GOOD utility for new users

pwalden 04-13-2011 07:02 PM

I agree, Dangermouse autoten is the next step


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