Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tutoriel:comment_creer_une_webradio [Le 14/04/2008, 00:11] – Tags, titres, orthographe, liens internes, mise en forme selon les bonnes pratiques. Ner0lph | tutoriel:comment_creer_une_webradio [Le 11/09/2022, 12:20] (Version actuelle) – Suppression des espaces en fin de ligne (détecté et corrigé via le bot wiki-corrector (https://forum.ubuntu-fr.org/viewtopic.php?id=2067892) moths-art | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | {{tag> | + | {{tag> |
| ---- | ---- | ||
| Ligne 5: | Ligne 5: | ||
| ====== Comment créer sa webradio ? ====== | ====== Comment créer sa webradio ? ====== | ||
| - | Ce tutoriel a pour but d' | + | Ce tutoriel a pour but d' |
| - | + | ||
| - | Les webradios sont des stations plus ou moins semblables aux stations de radio. La particularité d’une webradio est qu’elle est diffusée sur Internet. | + | |
| - | + | ||
| - | ===== Pré-requis ===== | + | |
| - | + | ||
| - | Vérifiez que les [[: | + | |
| ===== Installation ===== | ===== Installation ===== | ||
| - | [[apt:// | + | [[: |
| - | + | ||
| - | [[: | + | |
| ===== Configuration de MPD ===== | ===== Configuration de MPD ===== | ||
| Ligne 25: | Ligne 17: | ||
| sudo dpkg-reconfigure mpd | sudo dpkg-reconfigure mpd | ||
| - | La configuration de MPD se fait par un simple | + | La configuration de MPD se fait par un fichier texte. [[: |
| + | Avant la première utilisation de **mpd** , il est nécessaire de charger des musique dans la collection, sinon mpd n'aura aucune musique à lire. ( voir [[:mpd|Lien externe]] ) | ||
| - | Voici un exemple du fichier | + | Voici un exemple du fichier |
| - | + | ||
| - | > FIXME Préciser ce qu’il y a à modifier sans montrer l' | + | |
| < | < | ||
| - | # An example configuration file for MPD | ||
| - | # See the mpd.conf man page for a more detailed description of each parameter. | ||
| - | |||
| ######################## | ######################## | ||
| # You can put symlinks in here, if you like. Make sure that | # You can put symlinks in here, if you like. Make sure that | ||
| # the user that mpd runs as (see the ' | # the user that mpd runs as (see the ' | ||
| # can read the files in this directory. | # can read the files in this directory. | ||
| - | music_directory "/ | + | music_directory "/ |
| playlist_directory "/ | playlist_directory "/ | ||
| db_file "/ | db_file "/ | ||
| Ligne 45: | Ligne 33: | ||
| error_file "/ | error_file "/ | ||
| pid_file "/ | pid_file "/ | ||
| - | ################################################################ | ||
| - | |||
| - | |||
| - | ######################## | ||
| - | # | ||
| - | # If specified, MPD will save its current state (playlist, | ||
| - | # current song, playing/ | ||
| - | # used to restore the session the next time it is run. | ||
| - | # | ||
| - | state_file "/ | ||
| - | # | ||
| - | ################################################################ | ||
| - | |||
| - | |||
| - | ######################## | ||
| - | # | ||
| - | # If started as root, MPD will drop root privileges and run as | ||
| - | # this user instead. | ||
| - | # started by. If left unspecified, | ||
| - | # privileges at all (not recommended). | ||
| - | # | ||
| - | user " | ||
| - | # | ||
| - | # The address and port to listen on. | ||
| - | # | ||
| - | # | ||
| - | #port " | ||
| - | # | ||
| - | # Controls the amount of information that is logged. | ||
| - | # " | ||
| - | # | ||
| - | # | ||
| - | # | ||
| ################################################################ | ################################################################ | ||
| Ligne 87: | Ligne 42: | ||
| # log in with that password are allowed to do. | # log in with that password are allowed to do. | ||
| # | # | ||
| - | password | + | password |
| # | # | ||
| # Specifies what permissions a user who has not logged in with a | # Specifies what permissions a user who has not logged in with a | ||
| Ligne 100: | Ligne 55: | ||
| ########################## | ########################## | ||
| - | # | ||
| - | # MPD supports many audio output types, as well as playing | ||
| - | # through multiple audio outputs at the same time. You can | ||
| - | # specify one or more here. If you don't specify any, MPD will | ||
| - | # automatically scan for a usable audio output. | ||
| - | # | ||
| - | # See < | ||
| - | # for examples of other audio outputs. | ||
| - | # | ||
| - | # An example of an ALSA output: | ||
| - | # | ||
| - | # | ||
| - | # type " | ||
| - | # name "My ALSA Device" | ||
| - | # device | ||
| - | # format | ||
| - | #} | ||
| - | # | ||
| - | # An example of an OSS output: | ||
| - | # | ||
| - | # | ||
| - | # type " | ||
| - | # name "My OSS Device" | ||
| - | # device | ||
| - | # format | ||
| - | #} | ||
| - | # | ||
| - | # An example of a shout output (for streaming to Icecast): | ||
| - | # | ||
| audio_output { | audio_output { | ||
| type " | type " | ||
| Ligne 134: | Ligne 60: | ||
| host " | host " | ||
| port " | port " | ||
| + | |||
| mount "/ | mount "/ | ||
| - | password | + | password |
| quality | quality | ||
| # bitrate | # bitrate | ||
| Ligne 149: | Ligne 76: | ||
| # | # | ||
| # | # | ||
| - | # | ||
| - | ################################################################ | ||
| - | |||
| - | |||
| - | ############################# | ||
| - | # | ||
| - | # MPD needs to know what mixer settings to change when you | ||
| - | # adjust the volume. | ||
| - | # pick one based on which ones it was compiled with support for. | ||
| - | # | ||
| - | # An example for controlling an ALSA mixer: | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # An example for controlling an OSS mixer: | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # If you want MPD to adjust the volume of audio sent to the | ||
| - | # audio outputs, you can tell it to use the software mixer: | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ################################################################ | ||
| - | |||
| - | |||
| - | ######################### | ||
| - | # | ||
| - | # Specifies the type of ReplayGain to use. Can be " | ||
| - | # " | ||
| - | # < | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # Sets the pre-amp used for files that have ReplayGain tags. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # Enable on the fly volume normalization. | ||
| - | # volume of all songs played to be adjusted so that they sound | ||
| - | # as though they are of equal loudness. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ################################################################ | ||
| - | |||
| - | |||
| - | ########################### | ||
| - | # | ||
| - | # The size of the buffer containing decoded audio. | ||
| - | # shouldn' | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # How much of the buffer to fill before beginning to play. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # Similar options for the HTTP stream buffer. | ||
| - | # skipping while playing HTTP streams, you may wish to increase | ||
| - | # these. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | ################################################################ | ||
| - | |||
| - | |||
| - | ########################### | ||
| - | # | ||
| - | # Specifies the HTTP proxy to use for playing HTTP streams. | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| # | # | ||
| ################################################################ | ################################################################ | ||
| Ligne 239: | Ligne 86: | ||
| # restricting your usage of MPD. | # restricting your usage of MPD. | ||
| # | # | ||
| - | connection_timeout | + | connection_timeout |
| max_connections | max_connections | ||
| max_playlist_length | max_playlist_length | ||
| max_command_list_size | max_command_list_size | ||
| max_output_buffer_size | max_output_buffer_size | ||
| - | # | ||
| - | ################################################################ | ||
| - | |||
| - | |||
| - | ###################### | ||
| - | # | ||
| - | # If file or directory names do not display correctly, then you | ||
| - | # may need to change this. In most cases it should be either | ||
| - | # " | ||
| - | # after changing this (use mpd --create-db). | ||
| - | # | ||
| - | filesystem_charset | ||
| - | # | ||
| - | # The encoding that ID3v1 tags should be converted from. | ||
| - | # | ||
| - | id3v1_encoding | ||
| - | # | ||
| - | ################################################################ | ||
| - | |||
| - | |||
| - | ######################### | ||
| - | # | ||
| - | # The metadata types MPD will recognize. | ||
| - | # | ||
| - | metadata_to_use | ||
| - | # | ||
| - | # Enable this if you wish to use your MPD created playlists in | ||
| - | # other music players. | ||
| - | # | ||
| - | # | ||
| # | # | ||
| ################################################################ | ################################################################ | ||
| Ligne 282: | Ligne 99: | ||
| [[: | [[: | ||
| + | Il y a peu de choses à modifier, mis à part les mots de passe. | ||
| - | Il y a pas grand chose à modifier, à part les mots de passe. ;-) | + | <file XML> |
| - | + | ||
| - | Exemple de fichier (à adapter à votre configuration) : | + | |
| - | + | ||
| - | > FIXME Préciser ce qu’il y a à modifier sans montrer l' | + | |
| - | + | ||
| - | <code XML> | + | |
| - | <icecast> | + | |
| < | < | ||
| < | < | ||
| Ligne 299: | Ligne 110: | ||
| < | < | ||
| < | < | ||
| - | <!-- 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, | ||
| - | | ||
| - | | ||
| < | < | ||
| </ | </ | ||
| Ligne 314: | Ligne 116: | ||
| < | < | ||
| <!-- Sources log in with username ' | <!-- Sources log in with username ' | ||
| - | < | + | < |
| <!-- Relays log in username ' | <!-- Relays log in username ' | ||
| - | < | + | < |
| <!-- Admin logs in with the username given below --> | <!-- Admin logs in with the username given below --> | ||
| < | < | ||
| - | < | + | < |
| </ | </ | ||
| - | <!-- 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 can use these two if you only want a single listener --> | + | |
| - | < | + | |
| - | < | + | |
| - | + | ||
| - | <!-- 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 | + | |
| - | < | + | |
| - | < | + | |
| - | + | ||
| - | < | + | |
| - | < | + | |
| - | + | ||
| - | < | + | |
| - | <dump-file>/ | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | <option name=" | + | |
| - | <option name=" | + | |
| - | </ | + | |
| - | < | + | |
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | <option name=" | + | |
| - | <option name=" | + | |
| - | <option name=" | + | |
| - | <option name=" | + | |
| - | </ | + | |
| - | </ | + | |
| - | + | ||
| - | --> | + | |
| - | + | ||
| - | < | + | |
| - | + | ||
| - | <!-- set the mountpoint for a shoutcast source to use, the default if not | + | |
| - | | + | |
| - | | + | |
| - | < | + | |
| - | --> | + | |
| - | + | ||
| - | < | + | |
| - | <!-- 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, | + | |
| - | | + | |
| - | | + | |
| - | --> | + | |
| - | <!-- < | + | |
| - | </ | + | |
| - | + | ||
| - | < | + | |
| - | < | + | |
| - | <!-- | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | </ | + | |
| - | --> | + | |
| - | </ | + | |
| - | </ | + | |
| - | </code> | + | |
| Pour faire tourner Icecast2 en tache de fond, [[: | Pour faire tourner Icecast2 en tache de fond, [[: | ||
| < | < | ||
| - | |||
| - | Terminé ! :-D | ||
| Relancer les services mpd et icecast2 : | Relancer les services mpd et icecast2 : | ||
| Ligne 479: | Ligne 136: | ||
| sudo / | sudo / | ||
| sudo / | sudo / | ||
| - | |||
| - | Puis créer la base de donnée de MPD : | ||
| - | |||
| - | sudo mpd –create-db | ||
| < | < | ||
| Ligne 489: | Ligne 142: | ||
| La playlist se trouve à l’adresse : http:// | La playlist se trouve à l’adresse : http:// | ||
| - | Vous avez choisi le nom de cette playlist lors de la configuration du fichier « mpd.conf ». (Que vous pouvez modifier a tout moment, il faudra juste penser a relancer les services pour que les modifications soient prises en compte.</ | + | Vous avez choisi le nom de cette playlist lors de la configuration du fichier « mpd.conf ». (Que vous pouvez modifier a tout moment, il faudra juste penser a relancer les services pour que les modifications soient prises en compte. |
| + | |||
| + | Bien entendu, il vous faut ensuite installer et démarrer un client MPD avant que icecast2 ne puisse jouer quoi que ce soit</ | ||
| ===== Client de MPD ===== | ===== Client de MPD ===== | ||
| - | ==== GMPC ==== | + | ==== PhpMp2 |
| - | **GMPC** | + | PhpMp2 |
| - | + | Ainsi si vous avez un serveur web vous pouvez l' | |
| - | {{ mydoom666_gmpc2.png }} | + | |
| - | + | ||
| - | <note tip> | + | |
| - | * Plus de captures : http:// | + | |
| - | * Plus d’informations | + | |
| - | * Plus de clients pour MPD : http:// | + | |
| - | </ | + | |
| - | + | ||
| - | [[: | + | |
| + | Vous pouvez le télécharger à https:// | ||
| + | Il faut décompresser l' | ||
| + | {{tutoriel: | ||
| ===== Ouvrir le port dans le pare-feu ===== | ===== Ouvrir le port dans le pare-feu ===== | ||
| - | Dernière étape, ouvrir le port 8000 dans le pare-feu. Le port 8000 (par défaut) est celui utilisé par Icecast2 pour envoyer les flux aux clients. Pour cela, utilisez [[:Firestarter]]. | + | Dernière étape, ouvrir le port 8000 dans le [[:pare-feu]]. Le port 8000 (par défaut) est celui utilisé par Icecast2 pour envoyer les flux aux clients. Pour cela, utilisez [[:Gufw]].\\ |
| - | <note help> | + | |
| Il est possible d’administrer votre serveur a distance en ouvrant le port 6600 (par défaut). Il suffira ensuite dans GMPC de bien spécifier l’adresse distante du serveur. | Il est possible d’administrer votre serveur a distance en ouvrant le port 6600 (par défaut). Il suffira ensuite dans GMPC de bien spécifier l’adresse distante du serveur. | ||
| - | <note important> | + | <note important> |
| - | ===== Informations supplémentaires | + | ===== Ressources Supplémentaires |
| - | | + | ==== Sites officiels ==== |
| - | * http:// | + | |
| + | * https:// | ||
| * [[wpfr> | * [[wpfr> | ||
| - | ===== Source ===== | + | ==== Pour aller plus loin ==== |
| - | * http://www.mydoom666.com/2008/04/creer-sa-webradio-sous-ubuntu | + | * http://benjamin.sansinteret.info/ |
| + | * [[http:// | ||
| ---- | ---- | ||
| // | // | ||
