Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I am looking for an mp3 player and I don't quite understand the concepts of clients and daemons as they apply here. What I *think* it means is that a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! Artesia's Avatar
    Join Date
    Feb 2008
    Location
    Southern California
    Posts
    85

    Understanding client-based media players


    I am looking for an mp3 player and I don't quite understand the concepts of clients and daemons as they apply here.

    What I *think* it means is that a daemon, such as GTK2, is the tool the machine uses to play the media, but you need a client, such as Sonata, to make use of it and to provide a GUI.

    Following this logic, once I install GTK2, I can try out different players that use it, but if I install just the client, it won't run without the daemon.

    Is this correct? And is this a common phenomenon in Linux applications? And are there stand-alone players, too?

    I'd really appreciate it if someone could shed some light on this for me. I seek enlightenment!

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    I think I follow you: Do you mean how many of the media players use a backend to play their music/video and the graphical frontend is really just a control system?

    Take Amarok for instance. It can use most backends but generally people use the xine backend. Xine isn't part of Amarok but is both a media player itself and a set of libraries/codecs to play various media. Amarok gives you all of the front end controls , desktop integration and collection management through sqlite or MySQL.

    Now Xine isn't running as a daemon, it is simply called to manage the media. This is sharing out the resources and stopping us from reinventing the wheel with another media engine.

    Another very common backend is Gstreamer, which itself is a kind of wrapper around many other engines. It may have Win32 codecs plugged in, Mplayer, Xine etc. so that thereis one interface for applications to call to instead of multiple engines for different media types. This also helps prevent the soundcard from being hogged by one engine as far as I know.

    There are stand alone players. The engines above as mentioned usually can be called themselves;Mplayer has the command line mplayer or the graphical gMplayer;xine has gxine as a front end and of course there are other small dedicated players like mp3blaster. The Unix philosophy to writing applications is to write something that does one thing and does it well. That way we see a lot of dedicated engines, dedicated frontends and for the likes of Amarok using database functionality through sqllite, window drawing through QT (or for Gnome apps GTK2). If it wasn't for that applications would each be bigger and would replicate functionality of each other and waste resources. In the open source world where everyone can see each others work it only makes sense.

    Lastly to answer your question about just installing the client...I'd expect that a package manager would have the engines as a dependancy and to build from source you would also require development headers at least to build the front end. In short, they wouldn't be able to play anything.

  3. #3
    Just Joined! Artesia's Avatar
    Join Date
    Feb 2008
    Location
    Southern California
    Posts
    85
    Tom, thank you kindly for the detailed response. It does answer my question. I was on the right track, but there was more to it than I thought (and I still don't have a lot of the terminology down).

    I'm surprised that a player can also use different backends, but that's really cool. I can see how all this inter-usage and sharing of resources makes for a faster system. And why packages have dependencies.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! {-n()rx-}'s Avatar
    Join Date
    Jan 2007
    Location
    London
    Posts
    10

    Thumbs up

    Hi Artesia. Just to clear up the daemon stuff.
    Daemons are just background processes, usually started when your OS is loaded. An example of this would be the dhcpcd daemon, used to start your DHCP internet connection as a background process at OS startup. Rather than having to load it manually, under user control from the desktop.

  6. #5
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    Could you be referring to Music Player Daemon (MPD)? This is an actual daemon and more resembles the client/server relationship you describe. The nice thing about MPD is you can set it up on your computer at home and stream it over the Internet so you could really listen to your music from anywhere, provided you have a client to access it with. It's also highly configurable and there are tons of clients (front-ends) to choose from.

    The other nice thing about MPD is it's not as resource-intensive as most media players. For instance, I like Amarok but it struggles with a large library. You can create playlists to cut down on the size but I want to be able to play any song at any time and Amarok significantly slowed my system down when it was forced to handle my entire library.

    Just thought I'd mention it in case you were interested. It's a bit more work to set up initially but well worth it if you have the need.

  7. #6
    Just Joined! Artesia's Avatar
    Join Date
    Feb 2008
    Location
    Southern California
    Posts
    85
    Hi {-n()rx-} Can I call you nrx? I read that as nrx. Thanks for the clarification on daemons.

    Trillhouse, yeah, I think coming across MPD is what initially got me started on the whole thought process of daemons and clients.

    I'm not crazy about Amarok... In fact I don't like any media player that insists on "managing my library." To add insult to injury, they only read ID3 tags, and I'm a filename kind of person. Back in my Windows life, my favorite player was Sonique. There just isn't anything that even compares. Sigh.

  8. #7
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Quote Originally Posted by Artesia View Post
    I'm not crazy about Amarok... In fact I don't like any media player that insists on "managing my library." To add insult to injury, they only read ID3 tags, and I'm a filename kind of person. Back in my Windows life, my favorite player was Sonique. There just isn't anything that even compares. Sigh.
    I know where you're coming from, that was my stand on it too. If you are looking for something simple beep is good, it's kind of like an updated xmms. Don't forget that Totem and Kaffeine will happily play your music for you and has a simple playlist format.

    Back to the library thing though...I was a staunch filename collection supporter. I started toying with Amarok around 1.0.x I think and I started fixing my mp3 tags. It was a horribly arduous task but once done there was a huge amount of satisfaction in seeing everything indexed by artist, track number, genre or whatever else. And of course then I found it had tools for bulk updating tags and actually renaming and moving your files into order. So right now all my music is in folders for Artist > Album and then sorted by track number. It's certainly useful with a big collection and a lot faster than the effort than the older Windows Media Player library tools.
    Last edited by bigtomrodney; 05-30-2008 at 09:44 AM.

  9. #8
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Just to add some clarification (and to entertain myself while doing it :P ).

    A toolkit is a set of programming libraries that ties together a lot of components. GTK is the Gimp Toolkit, because it was initially programmed as a set of libreries for the gimp photo retouch program. It has mostly stuff related to the user interface: widgets and functions to control them.

    QT is another toolkit and is the foundation for KDE, it has lots of additional stuff, much more than GTK. There are many others like tk, motif, fltk, fox...

    Widget toolkit - Wikipedia, the free encyclopedia

    A daemon is what in windows/dos old terminology would be called a resident program (just like an antivirus and the like). Linux has a strong tradition in which regards daemons because of its client/server nature. You can run a server daemon on one machine and then use it in all your machines without adding the same overhead on each machine. Strictly speaking, daemon is not equal to server, there are daemons like cron or ntp which have a very concrete task and don't (necessaryly) act as servers.

    A client is a program that consumes the data generated by a server (a server is always a daemon, the opposite is not always true as I said above). So, to run the client for mpd you need to have mpd running in a machine which is accessible for you. Another example: to run a client for mldonkey (a p2p sharing program), like sancho or kmldonkey, you need to be running mldonkey as a daemon. So, kmldonkey can connect to it and serve as an interface to the daemon.

    The clients can be considered as frontends or interfaces to a given server. But not all the frontends are clients of a server. Amarok or gxine are frontends to xine, but are not clients for xine (amarok is -can be- a client for mysql, but that's another matter).

    I hope this helps in any way.

    Cheers.

    EDITED: If you don't mind using text only interfaces you might want to check music on console (moc):

    MOC - music on console | console audio player for Linux/UNIX

    It has a client/server nature, but you don't have to start the daemon when you start your system. It's launched when you invoke mocp (the player). Anyway, the ram it takes is ridiculous compared to any other player (around 7mb for the player and another 7mb for the server). The server will be stoped when you quit the player if you exit with 'Q', but it will continue playing in the background your music if you exit with "q" (lowecase), which is a good thing for me because I don't have to have a silly terminal window lying around just to play an album. You can reattach mocp to a currently running server by using mocp -y. A good thing is that it doesn't manage collections (just file names or id3 tags I think). It's extremely light and the behaviour and interface can be customized to a big extent (well, it's a text program... :P ).

  10. #9
    Just Joined! Artesia's Avatar
    Join Date
    Feb 2008
    Location
    Southern California
    Posts
    85
    Thanks for furthering my education. I am happy to report that this is actually making sense to me. This is definitely a whole new way of thinking, like learning a new language.

    I have been trying out different players bit by bit and actually using them for a while to see if I can get used to the interface. So far, every time I just need a player *now* I turn to Totem. But I'm not that crazy about it because I really like having an always-on-top mini mode on top of my screen (but not one as tiny as the XMMS clones). I'm sure I'll settle on something eventually.

    The thing with filenames is that I've been an avid downloader since '99 and my tastes are for music from all over the world. So one, tags in those days were not that well written, and two, if tags were present they were often in a character set not easily recognized by an English-speaking computer. So early on, I learned to just ignore them and kept up my filenames, instead.

    But I've already resigned myself to the eventuality of having to clean up the tags because I got an iPod last Christmas and that horrid little creature is completely tag centric. I do see the appeal of tags, for sure, and I'm already formulating a plan for using the genre tag for my needs. I'm sure I'll love it, after I go through all of my 128 GB of music. Sigh.

    /laughs at self and crawls into a corner with her laptop

  11. #10
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Quote Originally Posted by Artesia View Post
    ...after I go through all of my 128 GB of music. ...
    WHOAH! And I thought 65GB was big. Yeah you're going to feel a lot better when you get those tags sorted!

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •