mpg123-mysql


Es klingt kryptisch, folgt aber einer ganz einfachen Idee: Ein Musikspieler soll herausfinden, was der Zuhörer im Moment gerne hören möchte, und mit diesem Wissen auswählen, was abgepielt wird. Und dabei natürlich ständig dazulernen, denn die Musikbibliothek verändert sich genauso, wie die Hörgewohnheiten.

Wird ein Titel während des Abspielens übersprungen, möchte der Hörer ihn gerade nicht hören, und vermutlich auch nichts, was so ähnlich ist. Wird ein Stück bis zum Ende angehört wird, dann hat es vielleicht gefallen, und man möchte mehr davon. Es bleibt die Frage: Wie legt man die Ähnlichkeit von Musikstücken zueinander fest...?

Meine derzeitige Lösung ist ein Anfang, aber weit davon entfernt, perfekt zu sein. Aber es gibt ja glücklicherweise noch genügend Ideen, wie man es besser machen könnte...


mpg123-mysql
------------

mpg123-mysql consists of some patches to mpg123 which make it support
MySQL for having some bells and whistles, i.e.

 - rating support:
    When a file is played completely, it gets some (e.g. 2) points.
    When playing is interrupted by sending the usual "INT" signal
    to mpg123, the song gets less points. After a while, you can
    build your own "Top 10" or sort out those files you don't want
    to have any longer.
    Additionally, mpg123-mysql is able to skip titles with a bad
    (negative) rating

 - playlist support:
    You can tell mpg123 to use your database as the source for your
    playlist. This also works in shuffle (-z) mode.
    
    Some examples:

	* play all files that contain "jamiroquai" (case insensitive)
	  in their filename:

		mpg123 -Q jamiroquai

	* play all files from playlist

		mpg123 --all

	* also play all files, but don't skip any of the bad ones:

		mpg123 --all --noskip

	* play all files that were at last played in April:

		mpg123 --where "month(lastmod) = 4"


In addition to that, mpg123-mysql offers the following gimmicks:

 - mpg123-mysql uses setproctitle(3) to show ps(1) which title it is
   playing at the moment. You can use this feature with the included
   "np" script.
   Unfortunately, this works on FreeBSD only at the moment.

 - by sending a SIGTSTP signal to mpg123-mysql, it stops playing and closes
   the audio device so that another process can open it temporarily.
   You can try this out with "killall -TSTP mpg123", for example.

Requirements:

 - in order to run mpg123-mysql, you must have
    * the sourcecode of mpg123, version 0.59r
      you can get it at http://www.mpg123.de
    * MySQL headers and libraries (libmysqlclient.so, mysql.h, etc.)
      (tested: MySQL 3.22.21)
    * GNU patch
    * some UNIX skills and lots of patience ;)
    * for more Information see mpg123

Tested environment:

 - mpg123-mysql has been successfully tested and developed under FreeBSD-STABLE
 - There have been some reports that it also works under Linux 2.2.

Disclaimer: 

 - this software is considered as "Alpha". 
   I'm not responsible for anything that mpg123-mysql does or does not.
   You have been warned.

Copyright:

 - see the usual BSD style license

Related software:

 - Jan-Benedict Glaw  took these patches, fixed some bugs
   and added some features. Maybe you'll enjoy his variant of database 
   support for mpg123.

Thanks

 - Many thanks to Fabian Lessle for his patience.

Contact:

 - comments, suggestions, wishes, bug reports etc. are welcome!
   you can contact me in either English, German or French language:
   

 - you can find further information (new releases etc.) on mpg123-mysql
   at http://www.brettnacher.org/users/dominik/?topic=mpg123-mysql

Download