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 | ||
| jinzora [Le 20/01/2008, 21:28] – 82.243.195.149 | jinzora [Le 13/05/2014, 06:48] (Version actuelle) – [Paramétrage de php pour les prérequis Jinzora] 78.250.179.173 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | {{tag> | ||
| + | ---- | ||
| + | ====== Jinzora : diffuser votre musique sur internet ====== | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | Les fichiers de votre médiathèque peuvent être diffusés par un flux audio au format MP3, Ogg, Wav ou WMA ou tout simplement téléchargés. | ||
| + | |||
| + | L' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Pré-requis ===== | ||
| + | |||
| + | Pour la suite des opérations, | ||
| + | * Disposer des [[: | ||
| + | * Disposer d'une connexion à Internet configurée et activée pour télécharger le logiciel ; | ||
| + | * Un serveur [[: | ||
| + | * Installer mpd | ||
| + | |||
| + | |||
| + | ==== Paramétrage de php pour les prérequis Jinzora ==== | ||
| + | |||
| + | Editer le fichier //php.ini// pour changer les valeurs de quelques variables : | ||
| + | |||
| + | < | ||
| + | |||
| + | Rechercher les lignes ci-dessous dans le fichier puis remplacer les valeur par celles-ci : | ||
| + | |||
| + | < | ||
| + | memory_limit = 32M | ||
| + | post_max_size = 32M | ||
| + | upload_max_filesize = 32M</ | ||
| + | |||
| + | Enregistrer les modifications et redémarrer le serveur web : | ||
| + | |||
| + | < | ||
| + | |||
| + | === En cas de virtual-host === | ||
| + | |||
| + | Dans le cas d'une installation sur un virtual-host apache dédié à Jinzora, il peut être préférable de faire le paramétrage de PHP dans la configuration du virtual-host (ce qui évite de changer la configue PHP pour tout le serveur). | ||
| + | |||
| + | Dans ce cas, Editer le fichier de configuration du virtual host | ||
| + | |||
| + | < | ||
| + | |||
| + | Dans la section Directory adapté (celle dédiée au répertoire racine du virtual-host), | ||
| + | |||
| + | < | ||
| + | ... | ||
| + | php_value max_execution_time 300 | ||
| + | php_value post_max_size 32M | ||
| + | php_value upload_max_filesize 32M | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Enregistrer les modifications et redémarrer le serveur web : | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | ==== Installation du logiciel Jinzora ==== | ||
| + | |||
| + | Jinzora n'est pas dans les dépots de base ; il va donc falloir récupérer la dernière version stable du logiciel directement sur internet, à l' | ||
| + | |||
| + | Décompresser le fichier téléchargé | ||
| + | |||
| + | < | ||
| + | |||
| + | Ou bien clique droit sur le fichier puis //Extraire ici// | ||
| + | |||
| + | Déplacer le dossier contenant les fichiers de Jinzora dans le répertoire du serveur web Apache | ||
| + | |||
| + | < | ||
| + | |||
| + | Modification des permissions d' | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | < | ||
| + | sudo sh configure.sh</ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Paramétrage du logiciel Jinzora ==== | ||
| + | |||
| + | Lancer dans votre navigateur internet la page http:// | ||
| + | |||
| + | === Etape 2 / Requirements === | ||
| + | |||
| + | Il s'agit de vérifier que les indicateurs sont bien au vert ; il est normal que 'PHP PostgreSQL Support' | ||
| + | |||
| + | |||
| + | === Etape 5 / Main Settings === | ||
| + | |||
| + | Saisir le nom d' | ||
| + | |||
| + | Suivant vos goûts, choisissez le Frontend et le Style qui seront appliqués à l' | ||
| + | |||
| + | |||
| + | === Etape 6 / Backend Setup === | ||
| + | |||
| + | Saisir les identifiants du compte root de la base MySql ; choisir true dans la zone ' | ||
| + | |||
| + | |||
| + | === Etape 7 / Import media === | ||
| + | |||
| + | Il vous suffit de parcourir les répertoires de votre disque dur pour en importer les fichiers musicaux. Attention : il faut impérativement que le serveur ait les droits d' | ||
| + | |||
| + | |||
| + | Voilà, les étapes les plus sensibles ont été expliquées et c'est -déjà- la fin de l' | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | Et après avoir exécuté cette commande, accéder à Jinzora par l' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Utiliser un Lecteur flash au niveau du client ===== | ||
| + | |||
| + | **1ere solution : Le player XSPF** | ||
| + | |||
| + | Il est possible d' | ||
| + | |||
| + | Le player s' | ||
| + | |||
| + | Pour l' | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | **2eme solution : Le player d' | ||
| + | |||
| + | Player très sympa, mais moins simple a mettre en oeuvre. Démo : | ||
| + | http:// | ||
| + | |||
| + | D' | ||
| + | < | ||
| + | |||
| + | copier/ | ||
| + | |||
| + | < | ||
| + | <?php if (!defined(JZ_SECURE_ACCESS)) die (' | ||
| + | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | ||
| + | * JINZORA | Web-based Media Streamer | ||
| + | * | ||
| + | * Jinzora is a Web-based media streamer, primarily desgined to stream MP3s | ||
| + | * (but can be used for any media file that can stream from HTTP). | ||
| + | * Jinzora can be integrated into a CMS site, run as a standalone application, | ||
| + | * or integrated into any PHP website. | ||
| + | * | ||
| + | * Jinzora Author: | ||
| + | * Ross Carlson: ross@jasbone.com | ||
| + | * http:// | ||
| + | * Documentation: | ||
| + | * Support: http:// | ||
| + | * Downloads: http:// | ||
| + | * License: GNU GPL < | ||
| + | * | ||
| + | * Contributors: | ||
| + | * Please see http:// | ||
| + | * | ||
| + | * Code Purpose: Processes data for Enricolai FMP3 Embedded XSMPF Player | ||
| + | * Created: 03.03.05 by Ross Carlson | ||
| + | * | ||
| + | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
| + | |||
| + | define(' | ||
| + | |||
| + | /** | ||
| + | * Returns the player width | ||
| + | * | ||
| + | * @author Ben Dodson | ||
| + | * @version 8/23/05 | ||
| + | * @since 8/23/05 | ||
| + | */ | ||
| + | function SERVICE_RETURN_PLAYER_WIDTH_enricolai(){ | ||
| + | return 350; | ||
| + | } | ||
| + | |||
| + | /** | ||
| + | * Returns the players height. | ||
| + | * | ||
| + | * @author Ben Dodson | ||
| + | * @version 8/23/05 | ||
| + | * @since 8/23/05 | ||
| + | */ | ||
| + | function SERVICE_RETURN_PLAYER_HEIGHT_enricolai(){ | ||
| + | return 350; | ||
| + | } | ||
| + | |||
| + | |||
| + | /** | ||
| + | * Returns the data for the form posts for the player | ||
| + | * | ||
| + | * @author Ross Carlson | ||
| + | * @version 06/05/05 | ||
| + | * @since 06/05/05 | ||
| + | * @param $formname The name of the form that is being created | ||
| + | */ | ||
| + | function SERVICE_RETURN_PLAYER_FORM_LINK_enricolai($formname){ | ||
| + | return " | ||
| + | } | ||
| + | |||
| + | |||
| + | /** | ||
| + | * Returns the data for the href's to open the popup player | ||
| + | * | ||
| + | * @author Ross Carlson | ||
| + | * @version 06/05/05 | ||
| + | * @since 06/05/05 | ||
| + | */ | ||
| + | function SERVICE_RETURN_PLAYER_HREF_enricolai(){ | ||
| + | return ' target=" | ||
| + | } | ||
| + | |||
| + | |||
| + | /** | ||
| + | * Actually displays this embedded player | ||
| + | * | ||
| + | * @author Ross Carlson | ||
| + | * @version 3/03/05 | ||
| + | * @since 3/03/05 | ||
| + | * @param $list an array containing the tracks to be played | ||
| + | */ | ||
| + | function SERVICE_DISPLAY_PLAYER_enricolai($width, | ||
| + | global $root_dir, $this_site, $css; | ||
| + | |||
| + | ?> | ||
| + | < | ||
| + | window.resizeTo(<? | ||
| + | --> | ||
| + | </ | ||
| + | <?php | ||
| + | |||
| + | // Let's setup the page | ||
| + | echo '< | ||
| + | echo '< | ||
| + | |||
| + | $playlist = $this_site. $root_dir. "/ | ||
| + | $height = $height - 30; | ||
| + | ?> | ||
| + | < | ||
| + | classid=" | ||
| + | codebase=" | ||
| + | width=" | ||
| + | height="<? | ||
| + | id=" | ||
| + | align=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | |||
| + | < | ||
| + | quality=" | ||
| + | bgcolor="# | ||
| + | width=" | ||
| + | height="<? | ||
| + | name=" | ||
| + | align=" | ||
| + | allowScriptAccess=" | ||
| + | type=" | ||
| + | pluginspage=" | ||
| + | </ | ||
| + | <?php | ||
| + | exit(); | ||
| + | } | ||
| + | |||
| + | /** | ||
| + | * Processes data for the jlGui embedded player | ||
| + | * | ||
| + | * @author Ross Carlson | ||
| + | * @version 3/03/05 | ||
| + | * @since 3/03/05 | ||
| + | * @param $list an array containing the tracks to be played | ||
| + | */ | ||
| + | function SERVICE_OPEN_PLAYER_enricolai($list){ | ||
| + | global $include_path, | ||
| + | |||
| + | $display = new jzDisplay(); | ||
| + | |||
| + | // Let's set the name of this player for later | ||
| + | $player_type = " | ||
| + | |||
| + | // Now let's loop through each file | ||
| + | $list-> | ||
| + | |||
| + | $output_content = '<? | ||
| + | $output_content .= '< | ||
| + | $output_content .= ' | ||
| + | |||
| + | // Now let's loop throught the items to create the list | ||
| + | foreach ($list-> | ||
| + | // Should we play this? | ||
| + | if ((stristr($track-> | ||
| + | or stristr($track-> | ||
| + | and $_SESSION[' | ||
| + | |||
| + | // Let's get the meta | ||
| + | $meta = $track-> | ||
| + | |||
| + | // Let's get the art | ||
| + | $parent = $track-> | ||
| + | if (($art = $parent-> | ||
| + | $image = jzCreateLink($art," | ||
| + | } else { | ||
| + | $image = $this_site. $root_dir. "/ | ||
| + | } | ||
| + | |||
| + | $output_content .= ' | ||
| + | $output_content .= ' | ||
| + | $output_content .= ' | ||
| + | $output_content .= ' | ||
| + | $output_content .= ' | ||
| + | } | ||
| + | |||
| + | // Now let's finish up the content | ||
| + | $output_content .= ' | ||
| + | $output_content .= '</ | ||
| + | |||
| + | // Now that we've got the playlist, let's write it out to the disk | ||
| + | $plFile = $include_path. " | ||
| + | @unlink($plFile); | ||
| + | $handle = fopen ($plFile, " | ||
| + | fwrite($handle, | ||
| + | fclose($handle); | ||
| + | |||
| + | // Now let's display | ||
| + | $width = " | ||
| + | $height = " | ||
| + | SERVICE_DISPLAY_PLAYER_enricolai($width, | ||
| + | } | ||
| + | ?> | ||
| + | </ | ||
| + | //Attention de ne pas laisser de ligne vide avant ou après, cela créera un disfonctionnement... | ||
| + | // | ||
| + | |||
| + | Ensuite télécharger les 2 fichiers flash (zippés) en bas de ces 2 pages : | ||
| + | http:// | ||
| + | http:// | ||
| + | |||
| + | Les décompresser tous deux dans le répertoire / | ||
| + | |||
| + | Enfin, modifier le fichier / | ||
| + | < | ||
| + | |||
| + | Et voila un joli player flash ! | ||
| + | |||
| + | Forum qui traite de l' | ||
| + | http:// | ||
| + | |||
| + | |||
| + | ===== Liens ===== | ||
| + | |||
| + | |||
| + | * [[ampache|Ampache]], | ||
| + | * [[iceCast]], | ||
| + | * [[gnump3d|Gnump3d]], | ||
| + | * [[subsonic|Subsonic]] : un serveur multimédia multiplate-forme basé sur Java. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | // | ||
