Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, when I start a movie in mplayer, 2 mplayer processes are started:
Code:
$ pidof mplayer
20569 20568
One is very active, normal cpu usage you are used to seeing, the other is under 1% cpu usage. When you kill the second one, the active one keeps running for a bit, then freezes. It acts like it ran out of video data from a buffer.
I do have the mplayer cache enabled (2MB). Haven't tried disabling it yet, to see if the second instance of mplayer is still started.
Ok, I disabled mplayer cache. Didn't have to restart the movie, and the second mplayer process vanished.
Interesting.
Last edited by linux_walt; 01-21-2015 at 10:08 AM.
Maybe mplayer uses a thread, after all the PIDs are sequential, so the fist one is the one you started when you invoked the command line and the second one is either a thread or a child process which mplayer chooses to use as part of it's architecture. Makes sense considering what you mention as far as usage statistics. What happens if you exit the program normally? Nothing like that? If you kill the first one, does the second one disappear right away? And if you use "ps -ef | grep mplayer" do you find that the second mplayer PID has the first one as it's parent?
My take is that this shouldn't be a gripe to you if you were concerned that it was a problem that is. It seems to be just as I was guessing, the top process forks a child or creates a worker thread. Hey if it didn't do that, then the UI widgets to control things would not work efficiently because it'd be spending too much time playing the media. Or vice-versa, the playing of the media would be interrupted whenever you do small things like adjust the sound or something.
Nope, no gripe. It was going to be a question, then decided to look a little deeper into it, and realized this must be normal behavior. Apparently, enabling buffering requires a second instance of mplayer.
You would think buffering ability would be included into a single instance of the program.
Last edited by linux_walt; 01-21-2015 at 10:13 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.