linux:services:musik
Differences
This shows you the differences between two versions of the page.
| linux:services:musik [2020/02/18 14:48] – created stone | linux:services:musik [2020/02/18 14:49] (current) – removed stone | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== MPD und Icecast2 Service ====== | ||
| - | Wurde installiert unter Ubuntu 10.04 und selbst kompiliert. | ||
| - | |||
| - | **1.) Als erstes brauchen wir Software...** | ||
| - | < | ||
| - | apt-get install build-essential libcurl4-gnutls-dev libshout3-dev libmp3lame-dev libmad0-dev libglib2.0-dev libjack-dev libmms-dev libpulse-dev libvorbis-dev libfaad-dev libogg-dev libmpg123-dev libid3tag0-dev mpd icecast2 libapache2-mod-php5 apache2 php5 apache2.2-common php5-common | ||
| - | </ | ||
| - | |||
| - | Nach dem wir mal alles von Ubuntu installiert haben müssen wir uns jetzt entscheiden ob wir mit OGG zufrieden sind oder ob wir auch in MP3 streamen wollen. (Flash unterstützt kein OGG also wer auch einen Flashplayer haben will muss hier den Punkt 2 auch machen. Wenn nicht dann kann man den 2. Punkt auslassen). | ||
| - | |||
| - | ---- | ||
| - | |||
| - | **2.) MPD zusätzlich mit MP3 Support kompilieren Ab Version 0.14.x hat MPD auch einen MP3-Support inkl. Stream-Support** | ||
| - | |||
| - | Backup vom originalen MPD erstellen | ||
| - | < | ||
| - | cp / | ||
| - | </ | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | (Link bitte neu suchen da diese Version vielleicht schon alt sein könnte) | ||
| - | |||
| - | < | ||
| - | tar -xvzf mpd-0.16.2.tar.gz | ||
| - | cd mpd-0.16.2 | ||
| - | ./configure --enable-curl --enable-lastfm --enable-mad --enable-lame-encoder --enable-jack --enable-httpd-output --enable-shout | ||
| - | make | ||
| - | cp src/mpd / | ||
| - | </ | ||
| - | |||
| - | Nun haben wir einen MPD mit MP3-Stream-Support | ||
| - | |||
| - | ---- | ||
| - | |||
| - | **3.) MPD konfigurieren** | ||
| - | Hier meine mpd.conf zum Vergleich: | ||
| - | < | ||
| - | # An example configuration file for MPD | ||
| - | # See the mpd.conf man page for a more detailed description of each parameter. | ||
| - | |||
| - | |||
| - | # Files and directories ####################################################### | ||
| - | # | ||
| - | # This setting controls the top directory which MPD will search to discover the | ||
| - | # available audio files and add them to the daemon' | ||
| - | # setting defaults to the XDG directory, otherwise the music directory will be | ||
| - | # be disabled and audio files will only be accepted over ipc socket (using | ||
| - | # file:// protocol) or streaming files over an accepted protocol. | ||
| - | # | ||
| - | music_directory | ||
| - | # | ||
| - | # This setting sets the MPD internal playlist directory. The purpose of this | ||
| - | # directory is storage for playlists created by MPD. The server will use | ||
| - | # playlist files not created by the server but only if they are in the MPD | ||
| - | # format. This setting defaults to playlist saving being disabled. | ||
| - | # | ||
| - | playlist_directory | ||
| - | # | ||
| - | # This setting sets the location of the MPD database. This file is used to | ||
| - | # load the database at server start up and store the database while the | ||
| - | # server is not up. This setting defaults to disabled which will allow | ||
| - | # MPD to accept files over ipc socket (using file:// protocol) or streaming | ||
| - | # files over an accepted protocol. | ||
| - | # | ||
| - | db_file | ||
| - | # | ||
| - | # These settings are the locations for the daemon log files for the daemon. | ||
| - | # These logs are great for troubleshooting, | ||
| - | # settings. | ||
| - | # | ||
| - | # The special value " | ||
| - | # setting defaults to logging to syslog, otherwise logging is disabled. | ||
| - | # | ||
| - | log_file | ||
| - | # | ||
| - | # This setting sets the location of the file which stores the process ID | ||
| - | # for use of mpd --kill and some init scripts. This setting is disabled by | ||
| - | # default and the pid file will not be stored. | ||
| - | # | ||
| - | pid_file | ||
| - | # | ||
| - | # This setting sets the location of the file which contains information about | ||
| - | # most variables to get MPD back into the same general shape it was in before | ||
| - | # it was brought down. This setting is disabled by default and the server | ||
| - | # state will be reset on server start up. | ||
| - | # | ||
| - | state_file | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # General music daemon options ################################################ | ||
| - | # | ||
| - | # This setting specifies the user that MPD will run as. MPD should never run as | ||
| - | # root and you may use this setting to make MPD change its user ID after | ||
| - | # initialization. This setting is disabled by default and MPD is run as the | ||
| - | # current user. | ||
| - | # | ||
| - | user " | ||
| - | # | ||
| - | # This setting sets the address for the daemon to listen on. Careful attention | ||
| - | # should be paid if this is assigned to anything other then the default, any. | ||
| - | # This setting can deny access to control of the daemon. | ||
| - | # | ||
| - | # For network | ||
| - | bind_to_address | ||
| - | # | ||
| - | # And for Unix Socket | ||
| - | # | ||
| - | # | ||
| - | # This setting is the TCP port that is desired for the daemon to get assigned | ||
| - | # to. | ||
| - | # | ||
| - | port " | ||
| - | # | ||
| - | # This setting controls the type of information which is logged. Available | ||
| - | # setting arguments are " | ||
| - | # argument is recommended for troubleshooting, | ||
| - | # available resources on limited hardware storage. | ||
| - | # | ||
| - | log_level | ||
| - | # | ||
| - | # If you have a problem with your MP3s ending abruptly it is recommended that | ||
| - | # you set this argument to " | ||
| - | # the problem, it is highly recommended to fix the MP3 files with vbrfix | ||
| - | # (available from < | ||
| - | # point gapless MP3 playback can be enabled. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # This setting enables MPD to create playlists in a format usable by other | ||
| - | # music players. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # This setting defines a list of tag types that will be extracted during the | ||
| - | # audio file discovery process. Optionally, ' | ||
| - | # list. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # Symbolic link behavior ###################################################### | ||
| - | # | ||
| - | # If this setting is set to " | ||
| - | # symbolic links outside of the configured music_directory. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # If this setting is set to " | ||
| - | # symbolic links inside of the configured music_directory. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # Zeroconf / Avahi Service Discovery ########################################## | ||
| - | # | ||
| - | # If this setting is set to " | ||
| - | # Zeroconf / Avahi. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # The argument to this setting will be the Zeroconf / Avahi unique name for | ||
| - | # this MPD server on the network. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # Permissions ################################################################# | ||
| - | # | ||
| - | # If this setting is set, MPD will require password authorization. The password | ||
| - | # can setting can be specified multiple times for different password profiles. | ||
| - | # | ||
| - | # | ||
| - | password | ||
| - | # | ||
| - | # This setting specifies the permissions a user has who has not yet logged in. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # Input ####################################################################### | ||
| - | # | ||
| - | |||
| - | input { | ||
| - | plugin " | ||
| - | # proxy " | ||
| - | # | ||
| - | # | ||
| - | } | ||
| - | |||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | # Audio Output ################################################################ | ||
| - | # | ||
| - | # MPD supports various audio output types, as well as playing through multiple | ||
| - | # audio outputs at the same time, through multiple audio_output settings | ||
| - | # blocks. Setting this block is optional, though the server will only attempt | ||
| - | # autodetection for one sound card. | ||
| - | # | ||
| - | # See < | ||
| - | # other audio outputs. | ||
| - | |||
| - | |||
| - | # Shout OGG Output | ||
| - | audio_output { | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | # | ||
| - | | ||
| - | | ||
| - | # | ||
| - | | ||
| - | | ||
| - | | ||
| - | } | ||
| - | |||
| - | |||
| - | # Shout MP Output | ||
| - | audio_output { | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | # | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | } | ||
| - | |||
| - | |||
| - | # | ||
| - | # An example of an ALSA output: | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | #} | ||
| - | # | ||
| - | # An example of an OSS output: | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | #} | ||
| - | # | ||
| - | # An example of a shout output (for streaming to Icecast): | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | #} | ||
| - | # | ||
| - | # An example of a httpd output (built-in HTTP streaming server): | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | #} | ||
| - | # | ||
| - | # An example of a pulseaudio output (streaming to a remote pulseaudio server) | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | #} | ||
| - | # | ||
| - | ## Example " | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ## Or if you're want to use AudioCompress | ||
| - | # | ||
| - | ## Or to send raw PCM stream through PCM: | ||
| - | # | ||
| - | # | ||
| - | #} | ||
| - | # | ||
| - | ## An example of a null output (for no audio output): | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | #} | ||
| - | # | ||
| - | # This setting will change all decoded audio to be converted to the specified | ||
| - | # format before being passed to the audio outputs. By default, this setting is | ||
| - | # disabled. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # If MPD has been compiled with libsamplerate support, this setting specifies | ||
| - | # the sample rate converter to use. Possible values can be found in the | ||
| - | # mpd.conf man page or the libsamplerate documentation. By default, this is | ||
| - | # setting is disabled. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # Volume control mixer ######################################################## | ||
| - | # | ||
| - | # These are the global volume control settings. By default, this setting will | ||
| - | # be detected to the available audio output device, with preference going to | ||
| - | # hardware mixing. Hardware and software mixers for individual audio_output | ||
| - | # sections cannot yet be mixed. | ||
| - | # | ||
| - | # An example for controlling an ALSA, OSS or Pulseaudio mixer; If this | ||
| - | # setting is used other sound applications will be affected by the volume | ||
| - | # being controlled by MPD. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # An example for controlling all mixers through software. This will control | ||
| - | # all controls, even if the mixer is not supported by the device and will not | ||
| - | # affect any other sound producing applications. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # This example will not allow MPD to touch the mixer at all and will disable | ||
| - | # all volume controls. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # Normalization automatic volume adjustments ################################## | ||
| - | # | ||
| - | # This setting specifies the type of ReplayGain to use. This setting can have | ||
| - | # the argument " | ||
| - | # details. This setting is disabled by default. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # This setting sets the pre-amp used for files that have ReplayGain tags. By | ||
| - | # default this setting is disabled. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # This setting enables on-the-fly normalization volume adjustment. This will | ||
| - | # result in the volume of all playing audio to be adjusted so the output has | ||
| - | # equal " | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # MPD Internal Buffering ###################################################### | ||
| - | # | ||
| - | # This setting adjusts the size of internal decoded audio buffering. Changing | ||
| - | # this may have undesired effects. Don't change this if you don't know what you | ||
| - | # are doing. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # This setting controls the percentage of the buffer which is filled before | ||
| - | # beginning to play. Increasing this reduces the chance of audio file skipping, | ||
| - | # at the cost of increased time prior to audio playback. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # Resource Limitations ######################################################## | ||
| - | # | ||
| - | # These settings are various limitations to prevent MPD from using too many | ||
| - | # resources. Generally, these settings should be minimized to prevent security | ||
| - | # risks, depending on the operating resources. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ############################################################################### | ||
| - | |||
| - | |||
| - | # Character Encoding ########################################################## | ||
| - | # | ||
| - | # If file or directory names do not display correctly for your locale then you | ||
| - | # may need to modify this setting. After modification of this setting mpd | ||
| - | # --create-db must be run to change the database. | ||
| - | # | ||
| - | filesystem_charset | ||
| - | # | ||
| - | # This setting controls the encoding that ID3v1 tags should be converted from. | ||
| - | # | ||
| - | id3v1_encoding | ||
| - | # | ||
| - | ############################################################################### | ||
| - | </ | ||
| - | |||
| - | Verzeichnise erstellen | ||
| - | < | ||
| - | mkdir -p / | ||
| - | mkdir -p / | ||
| - | mkdir -p / | ||
| - | chown -R mpd / | ||
| - | </ | ||
| - | |||
| - | MPD zum ersten Mal starten | ||
| - | < | ||
| - | / | ||
| - | </ | ||
| - | |||
| - | Mounten der Storage (in meinem Fall so...) | ||
| - | < | ||
| - | mount -t nfs 192.168.0.10:/ | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | **4.) Icecast2 konfiguerieren** | ||
| - | |||
| - | Hier meine icecast.xml: | ||
| - | Im grunde wurde nichts geändet ausser der den Port auf 8080 gestellt und die Streams gemountet. | ||
| - | Passwörter müssen/ | ||
| - | |||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | <!-- If enabled, this will provide a burst of data when a client | ||
| - | first connects, thereby significantly reducing the startup | ||
| - | time for listeners that do substantial buffering. However, | ||
| - | it also significantly increases latency between the source | ||
| - | | ||
| - | might want to disable this. --> | ||
| - | < | ||
| - | <!-- same as burst-on-connect, | ||
| - | | ||
| - | | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | <!-- Sources log in with username ' | ||
| - | < | ||
| - | <!-- Relays log in username ' | ||
| - | < | ||
| - | |||
| - | <!-- Admin logs in with the username given below --> | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | <!-- set the mountpoint for a shoutcast source to use, the default if not | ||
| - | | ||
| - | | ||
| - | < | ||
| - | --> | ||
| - | |||
| - | <!-- Uncomment this if you want directory listings --> | ||
| - | <!-- | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | | ||
| - | |||
| - | <!-- This is the hostname other people will use to connect to your server. | ||
| - | It affects mainly the urls generated by Icecast for playlists and yp | ||
| - | listings. --> | ||
| - | < | ||
| - | |||
| - | <!-- You may have multiple < | ||
| - | < | ||
| - | < | ||
| - | <!-- < | ||
| - | <!-- < | ||
| - | </ | ||
| - | <!-- | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | --> | ||
| - | |||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | |||
| - | <!-- setting this makes all relays on-demand unless overridden, this is | ||
| - | | ||
| - | The default is 0 --> | ||
| - | < | ||
| - | |||
| - | < | ||
| - | < | ||
| - | |||
| - | <!-- | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | |||
| - | < | ||
| - | </ | ||
| - | --> | ||
| - | |||
| - | <!-- Only define a < | ||
| - | like alternative usernames or passwords | ||
| - | < | ||
| - | < | ||
| - | |||
| - | < | ||
| - | < | ||
| - | |||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | <option name=" | ||
| - | <option name=" | ||
| - | </ | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | < | ||
| - | < | ||
| - | <option name=" | ||
| - | <option name=" | ||
| - | <option name=" | ||
| - | <option name=" | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | --> | ||
| - | |||
| - | < | ||
| - | |||
| - | < | ||
| - | <!-- basedir is only used if chroot is enabled --> | ||
| - | < | ||
| - | |||
| - | <!-- Note that if < | ||
| - | be relative to the new root, not the original root --> | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | <!-- < | ||
| - | |||
| - | <!-- Aliases: treat requests for ' | ||
| - | May be made specific to a port or bound address using the " | ||
| - | and " | ||
| - | --> | ||
| - | <!-- | ||
| - | <alias source="/ | ||
| - | --> | ||
| - | <!-- Aliases: can also be used for simple redirections as well, | ||
| - | this example will redirect all requests for http:// | ||
| - | the status page | ||
| - | --> | ||
| - | <alias source="/" | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | < | ||
| - | < | ||
| - | <!-- < | ||
| - | < | ||
| - | < | ||
| - | <!-- If logarchive is enabled (1), then when logsize is reached | ||
| - | the logfile will be moved to [error|access|playlist].log.DATESTAMP, | ||
| - | | ||
| - | | ||
| - | --> | ||
| - | <!-- < | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | < | ||
| - | <!-- | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | --> | ||
| - | </ | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | vim / | ||
| - | ENABLE=true | ||
| - | </ | ||
| - | |||
| - | Icecast2 starten | ||
| - | < | ||
| - | / | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | **6.) Flashplayer** | ||
| - | |||
| - | Wenn ein Flashplayer gebraucht wird dann kann man diesen auch ganz einfach einbauen. | ||
| - | Die benötigten Files sind anbei. Man muss in der playlist.xspf die URL's und Pfade anpassen. | ||
| - | Danach sollte das Radio per Flashplayer zu hören sein. | ||
| - | |||
| - | {{: | ||
linux/services/musik.1582037290.txt.gz · Last modified: by stone
