LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-23-2011, 03:20 PM   #1
rholme
Member
 
Registered: May 2008
Posts: 47

Rep: Reputation: 15
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".
 
Old 03-24-2011, 05:08 PM   #2
rholme
Member
 
Registered: May 2008
Posts: 47

Original Poster
Rep: Reputation: 15
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.
 
Old 04-03-2011, 05:14 PM   #3
pwalden
Member
 
Registered: Jun 2003
Location: Washington
Distribution: Raspbian, Ubuntu, Chrome/Crouton
Posts: 374

Rep: Reputation: 50
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> &

Last edited by pwalden; 04-03-2011 at 05:16 PM.
 
Old 04-04-2011, 08:06 AM   #4
rholme
Member
 
Registered: May 2008
Posts: 47

Original Poster
Rep: Reputation: 15
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 ...
 
Old 04-13-2011, 05:35 PM   #5
rholme
Member
 
Registered: May 2008
Posts: 47

Original Poster
Rep: Reputation: 15
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.
 
Old 04-13-2011, 06:58 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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
 
Old 04-13-2011, 07:02 PM   #7
pwalden
Member
 
Registered: Jun 2003
Location: Washington
Distribution: Raspbian, Ubuntu, Chrome/Crouton
Posts: 374

Rep: Reputation: 50
I agree, Dangermouse autoten is the next step
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Tool & Firefox Elaine Linux - Newbie 5 12-21-2010 06:17 PM
[SVN - post-commit hook] hook failed, did not exit cleanly G00fy Programming 0 01-21-2009 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration