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 | ||
| mythtv [Le 07/07/2009, 19:26] – 213.95.41.13 | mythtv [Le 01/09/2022, 00:00] (Version actuelle) – Passage de http à https sur les liens externes (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>Hardy vidéo audio multimédia télévision réseau | + | {{tag> |
| + | ====== MythTV ====== | ||
| - | ---- | + | MythTV est un logiciel d' |
| + | {{: | ||
| - | ====== Mythtv ====== | + | {{: |
| + | Son architecture basée sur un (ou plusieurs) // | ||
| + | ===== Installation ===== | ||
| + | MythTV peut être installé sur n' | ||
| - | MYTHTV est une suite de logiciels de type centre | + | ===== Configuration ===== |
| + | FIXME | ||
| + | \\ | ||
| + | Lancer le centre de contrôle Mythbuntu (Système → Administration → Centre | ||
| + | ==== Sur Ubuntu Server ==== | ||
| + | En Anglais : https:// | ||
| - | ===== Différentes solutions ===== | + | ===== Voir aussi ===== |
| - | + | * [[https:// | |
| - | Pour disposer de cette suite logicielle multimedia, vous pouvez : | + | * [[http:// |
| - | + | ||
| - | - Installer uniquement le logiciel **Mythtv** | + | |
| - | + | ||
| - | - Installer simplement des paquets supplémentaires dans votre installation ubuntu pour la transformer, | + | |
| - | + | ||
| - | - Faire une installation complète d' | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ===== Installations ===== | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | ==== Mythtv ==== | + | |
| - | + | ||
| - | + | ||
| - | Il suffit d' | + | |
| - | + | ||
| - | + | ||
| - | ==== Mythtv + Ubuntu = Mythbuntu | + | |
| - | + | ||
| - | Il existe de nombreuses versions de Ubuntu : Ubuntu, Kubuntu, Xubuntu, Edubuntu et ... Mythbuntu. Cette version est une solution gnu-linux spécialement développée pour Ubuntu permettant de transformer **facilement** son ordinateur en enregistreur de salon. | + | |
| - | + | ||
| - | + | ||
| - | Il suffit d' | + | |
| - | + | ||
| - | L' | + | |
| - | + | ||
| - | Pour plus de détails voir [[http://mythtv-fr.tuxfamily.org/ | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | ==== Installation ubuntu optimisée Mythtv ==== | + | |
| - | + | ||
| - | >Guide d' | + | |
| - | + | ||
| - | >Pour les puristes je mettrai le signe (!) pour ce qu'il n'est pas recommandé de faire. | + | |
| - | + | ||
| - | === Partitions (système) === | + | |
| - | Lors de l' | + | |
| - | + | ||
| - | Pour ma part, je me simplifie la vie en voyant large. | + | |
| - | + | ||
| - | ^taille^nom^commentaire^ | + | |
| - | |10 Go| / (dit " | + | |
| - | |100 Go| /home| (en cas de problème, cela permet de garder ses paramètres)| | + | |
| - | |2 Go| swap| (à partir de 1Go mettre la taille de la ram ou ne pas en mettre(!) )| | + | |
| - | + | ||
| - | **Activer les pilotes** pour NVIDIA ou ATI : cocher une case dans | + | |
| - | Menu-> | + | |
| - | + | ||
| - | Redémarrer et... attention au plantage. Plus Ubuntu évolue moins il y en a, mais au besoin noter cette ligne de commande : | + | |
| - | + | ||
| - | sudo dpkg-reconfigure xserver-xorg | + | |
| - | ou | + | |
| - | sudo dpkg-reconfigure -phigh xserver-xorg | + | |
| - | + | ||
| - | **Activer l' | + | |
| - | + | ||
| - | + | ||
| - | === Packages (initiaux) === | + | |
| - | + | ||
| - | ^commandes^commentaires^ | + | |
| - | |sudo apt-get install| pour installer les packets (pour sélectionner appuyer en même temps sur Ctrl sur firefox) | | + | |
| - | |mplayer gxine vlc libdvdread3 ogle|lecteur vidéo et codec| | + | |
| - | |flashplugin-nonfree |lecteur video (flash)| | + | |
| - | |tvtime|permet de tester la carte TV (existe aussi zaptv)| | + | |
| - | |startupmanager| permet de modifier le démarrage de l' | + | |
| - | |lirc| pour la télécommande (" | + | |
| - | |filezilla|client ftp (ça peut toujours servir)| | + | |
| - | |samba |partage réseau pour Windows| | + | |
| - | |openssh-server |indispensable pour utiliser putty| | + | |
| - | |synergy |trop bien si vous avez plus d'un PC côte à côte (un clavier/ | + | |
| - | |nvidia-settings |pour configurer sa carte vidéo NVIDIA (exit aussi " | + | |
| - | |dmraid|si vous utilisez du raid| | + | |
| - | |gparted |pour partitionner ses disques (si vous en avez plus d' | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | === Souris & Clavier bluetooth === | + | |
| - | Pour l' | + | |
| - | + | ||
| - | Appuyer sur le petit bouton et taper la commande (pour chacun) : | + | |
| - | + | ||
| - | sudo hidd --connect AA: | + | |
| - | + | ||
| - | ( AA:BB:... étant l' | + | |
| - | + | ||
| - | Après je vous recommande le GUI (l' | + | |
| - | Menu-> | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | === Ecran (carte NVIDIA) === | + | |
| - | Rechercher les spécifications techniques (balayage horizontal et vertical) sur le site web du constructeur de l' | + | |
| - | + | ||
| - | sudo gedit / | + | |
| - | + | ||
| - | Section " | + | |
| - | Identifier | + | |
| - | HorizSync | + | |
| - | VertRefresh | + | |
| - | Option | + | |
| - | EndSection | + | |
| - | + | ||
| - | (Option " | + | |
| - | + | ||
| - | Ensuite utiliser le GUI (beaucoup plus simple, mais maintenant vous pouvez cliquer sur Apply et quitter) | + | |
| - | + | ||
| - | sudo nvidia-settings | + | |
| - | + | ||
| - | Préférer cette ligne de commande à Menu-> | + | |
| - | + | ||
| - | (Pour les cartes NVIDIA le mode " | + | |
| - | + | ||
| - | + | ||
| - | === Disques durs === | + | |
| - | + | ||
| - | Pour plusieurs disques durs : | + | |
| - | + | ||
| - | Utiliser gparted pour les identifier et les modifier (!!!). Menu-> | + | |
| - | + | ||
| - | Utiliser la commande mount...profiter...redémarrer... et c'est comme si rien n' | + | |
| - | Donc à moins que ce ne soit temporaire modifier le fichier fstab: | + | |
| - | sudo gedit / | + | |
| - | + | ||
| - | et ajouter les lignes nécessaires : | + | |
| - | / | + | |
| - | / | + | |
| - | UUID=cdd75cda-8147-41c6-923a-32dac89083d8 / | + | |
| - | + | ||
| - | + | ||
| - | Explications pour chaque ligne : | + | |
| - | + | ||
| - | 1- grâce à gparted j' | + | |
| - | + | ||
| - | 2- même chose sauf que le disque est en raid (d'où le nom plus long) et le type est NTFS (pour Windows) (petit "sudo mkdir / | + | |
| - | + | ||
| - | 3- version moderne avec le UUID (genre " | + | |
| - | + | ||
| - | Pour identifier les UUID : | + | |
| - | sudo blkid | + | |
| - | sudo vol_id -u /dev/sda1 | + | |
| - | + | ||
| - | Il est possible de renseigner les différents emplacements dans mythtv en les séparant par ":" | + | |
| - | Avant j' | + | |
| - | / | + | |
| - | + | ||
| - | J'ai évolué et j' | + | |
| - | ln -s / | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | === MYTHTV === | + | |
| - | + | ||
| - | ^commandes^commentaires^ | + | |
| - | |sudo apt-get install| pour installer les packets (pour sélectionner appuyer en même temps sur Ctrl sur firefox) | | + | |
| - | |ubuntu-mythtv-frontend mythtv | les 2 packages principaux (installeront également mysql et bien d' | + | |
| - | |mysql-query-browser| pour ceux qui s'y connaissent en sql| | + | |
| - | |mythvideo < | + | |
| - | |mythweather| la météo| | + | |
| - | |mythweb|Interface web pour contrôler presque tout mythtv| | + | |
| - | |mythstream|écouter et voir du streming| | + | |
| - | |mythnews|rapide pour avoir des informations sur l' | + | |
| - | |mythmusic| gérer et écouter ses MP3| | + | |
| - | |mythgame| jouer| | + | |
| - | |mythgallery|voir ses photos| | + | |
| - | |mythbrowser|navigateur internet optimisé télécommande| | + | |
| - | |lame gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly| différents codec| | + | |
| - | |< | + | |
| - | + | ||
| - | Après leurs installations, | + | |
| - | + | ||
| - | Renseigner les paramètres (les mêmes que ceux mis lors de l' | + | |
| - | + | ||
| - | Puis : Menu-> | + | |
| - | + | ||
| - | + | ||
| - | == En cas de problèmes, saisir les lignes de commandes suivantes == | + | |
| - | + | ||
| - | sudo dpkg-reconfigure mythtv-common | + | |
| - | sudo dpkg-reconfigure mythtv-database | + | |
| - | + | ||
| - | Pour ceux qui apprécient les jolies animations en écoutant de la musique je recommande (par ordre descroissant) les plugins suivants : | + | |
| - | + | ||
| - | sudo apt-get install libvisual-0.4-plugins | + | |
| - | + | ||
| - | libvisual-projectm doit être très beau mais personnellement, | + | |
| - | + | ||
| - | Mes préférés : Goom; BumpScope; LibVisual-jakdaw; | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | === Télécommande (spécificité pour Audigy Platinum eX) === | + | |
| - | + | ||
| - | Bon nombre de télécommandes fonctionnent toutes seules et le package suivant vous y aidera. | + | |
| - | + | ||
| - | sudo apt-get install mythbuntu-lirc-generator | + | |
| - | + | ||
| - | Ce n'est pas mon cas avec la carte son Audigy Platinum eX, pour la faire fonctionner je dois modifier certains fichiers : | + | |
| - | + | ||
| - | < | + | |
| - | + | ||
| - | Et ajouter la ligne suivante : | + | |
| - | DEVICE="/ | + | |
| - | + | ||
| - | Dans le fichier / | + | |
| - | changer la ligne : | + | |
| - | name rm1000 --> name Creative_RM900 | + | |
| - | + | ||
| - | sudo gedit / | + | |
| - | Ajouter : | + | |
| - | options snd-emu10k1 index=0 enable_ir=1 | + | |
| - | + | ||
| - | Pour la RM900 (comme il l' | + | |
| - | modifier le fichier suivant : | + | |
| - | sudo gedit / | + | |
| - | Par celui ci: {{lircd.conf: | + | |
| - | + | ||
| - | Par défaut les paramètres de lirc sont dans $HOME/ | + | |
| - | rm $HOME/ | + | |
| - | ln -s $HOME/ | + | |
| - | + | ||
| - | + | ||
| - | == En cas de problème == | + | |
| - | + | ||
| - | Pour tester la télécommande : irw (appuyer des touches de la télécommande) | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | Pour lancer (dans mon cas) : sudo lircd --driver=livedrive_midi --device=/ | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | === Menus === | + | |
| - | + | ||
| - | Les menus se situent dans / | + | |
| - | + | ||
| - | Le principal est " | + | |
| - | + | ||
| - | //En éditant le premier on remarque un menu caché le Shutdown (" | + | |
| - | + | ||
| - | Il est donc possible possible de modifier le texte et l' | + | |
| - | Exemple : | + | |
| - | ^code^commentaire^ | + | |
| - | |< | + | |
| - | | < | + | |
| - | | < | + | |
| - | | <text lang=" | + | |
| - | | < | + | |
| - | |</ | + | |
| - | + | ||
| - | + | ||
| - | //Je recommande un backup avant de les modifier, mais une réinstallation du package " | + | |
| - | + | ||
| - | + | ||
| - | Petite astuce pour lancer un programme extérieur : | + | |
| - | ^code^commentaire^ | + | |
| - | |< | + | |
| - | | < | + | |
| - | | < | + | |
| - | | <text lang=" | + | |
| - | | < | + | |
| - | |</ | + | |
| - | + | ||
| - | //(voir exemple dans : | + | |
| - | + | ||
| - | === MYTHVIDEO === | + | |
| - | == Lire un DVD protégé == | + | |
| - | (c'est malheureux de ne pas pouvoir lire un DVD que l'on a acheté en toute légalité) | + | |
| - | sudo apt-get install libdvdcss2 | + | |
| - | + | ||
| - | == Désactiver le lancement automatique à l' | + | |
| - | + | ||
| - | Lancer Nautilus : | + | |
| - | + | ||
| - | Edition-> | + | |
| - | + | ||
| - | + | ||
| - | == Réduire la taille des sous-titres == | + | |
| - | Dans Mythtv : Paramètres-> | + | |
| - | + | ||
| - | Lecteur : | + | |
| - | + | ||
| - | mplayer -fs -zoom -quiet -vo xv -subfont-text-scale 2 %s | + | |
| - | + | ||
| - | Internal : | + | |
| - | + | ||
| - | mplayer vcd:// -cdrom-device %d -fs -zoom -vo xv | + | |
| - | + | ||
| - | + | ||
| - | == Reconnaissance des films (affiches, résumé et casting) == | + | |
| - | Pour l' | + | |
| - | + | ||
| - | / | + | |
| - | -> | + | |
| - | / | + | |
| - | + | ||
| - | / | + | |
| - | -> | + | |
| - | / | + | |
| - | + | ||
| - | / | + | |
| - | -> | + | |
| - | / | + | |
| - | + | ||
| - | + | ||
| - | == Petit bug la fenêtre IMDB reste affichée == | + | |
| - | + | ||
| - | find / | + | |
| - | + | ||
| - | == Petit bug dans allocine.pl lorsqu' | + | |
| - | + | ||
| - | sudo gedit / | + | |
| - | + | ||
| - | + | ||
| - | En fait le script n'est plus tenu à jour. | + | |
| - | Remplacer le fichier par ceci: | + | |
| - | # | + | |
| - | + | ||
| - | # | + | |
| - | # This perl script is intended to perform movie data lookups in french based on | + | |
| - | # the www.allocine.fr website | + | |
| - | # | + | |
| - | # For more information on MythVideo' | + | |
| - | # the README file in this directory. | + | |
| - | # | + | |
| - | # Author: Xavier Hervy (maxpower44 AT tiscali DOT fr) | + | |
| - | # | + | |
| - | + | ||
| - | # changes: | + | |
| - | # 9-10-2006: Anduin Withers | + | |
| - | # | + | |
| - | # Made -u option a dummy for this release, it is deprecated and will be | + | |
| - | # | + | |
| - | + | ||
| - | use LWP:: | + | |
| - | use HTML:: | + | |
| - | use URI:: | + | |
| - | + | ||
| - | use vars qw($opt_h $opt_r $opt_d $opt_i $opt_v $opt_D $opt_M $opt_P $opt_originaltitle $opt_casting $opt_u_dummy); | + | |
| - | use Getopt:: | + | |
| - | + | ||
| - | $title = " | + | |
| - | $version = " | + | |
| - | $author = " | + | |
| - | + | ||
| - | binmode(STDOUT, | + | |
| - | + | ||
| - | # display usage | + | |
| - | sub usage { | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | # display 1-line of info that describes the version of the program | + | |
| - | sub version { | + | |
| - | print " | + | |
| - | } | + | |
| - | + | ||
| - | # display 1-line of info that can describe the type of query used | + | |
| - | sub info { | + | |
| - | print " | + | |
| - | } | + | |
| - | + | ||
| - | # display detailed help | + | |
| - | sub help { | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | # returns text within ' | + | |
| - | sub parseBetween { | + | |
| - | my ($data, $beg, $end)=@_; # grab parameters | + | |
| - | + | ||
| - | my $ldata = lc($data); | + | |
| - | my $start = index($ldata, | + | |
| - | my $finish = index($ldata, | + | |
| - | + | ||
| - | if ($start != (length($beg) -1) && $finish != -1) { | + | |
| - | my $result = substr($data, | + | |
| - | # dont use decode entities &npsp; => spécial characters bug in html:: | + | |
| - | # | + | |
| - | | + | |
| - | } | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | # use to replace by " " (instead of decode_entities) | + | |
| - | sub removenbsp { | + | |
| - | my ($data)=@_; # grab parameters | + | |
| - | + | ||
| - | my $ldata = lc($data); | + | |
| - | my $start = index($ldata, | + | |
| - | while ($start != -1){ | + | |
| - | $data = substr($data, | + | |
| - | $ldata = lc($data); | + | |
| - | $start = index($ldata, | + | |
| - | } | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | + | ||
| - | # returns text within ' | + | |
| - | sub removeTag { | + | |
| - | my ($data)=@_; # grab parameters | + | |
| - | my $ldata = lc($data); | + | |
| - | my $start = index($ldata, | + | |
| - | my $finish = index($ldata, | + | |
| - | while ($start != -1 && $finish != -1){ | + | |
| - | $data = substr($data, | + | |
| - | $ldata = lc($data); | + | |
| - | $start = index($ldata, | + | |
| - | $finish = index($ldata, | + | |
| - | } | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | # get Movie Data | + | |
| - | sub getMovieData { | + | |
| - | my ($movieid)=@_; | + | |
| - | if (defined $opt_d) { printf("# | + | |
| - | + | ||
| - | # get the search results | + | |
| - | my $request = " | + | |
| - | if (defined $opt_d) { printf("# | + | |
| - | my $response = get $request; | + | |
| - | + | ||
| - | # parse title and year | + | |
| - | my $title = parseBetween($response, | + | |
| - | # remove the "- Allocin.*" | + | |
| - | | + | |
| - | my $original_title = parseBetween($response, | + | |
| - | | + | |
| - | if (defined $opt_originaltitle){ | + | |
| - | if ($original_title | + | |
| - | $title = $title . " (" . $original_title . " | + | |
| - | } | + | |
| - | } | + | |
| - | + | ||
| - | # | + | |
| - | | + | |
| - | my $year = parseBetween($response,"> | + | |
| - | + | ||
| - | # parse director | + | |
| - | my $director = parseBetween(parseBetween($response," | + | |
| - | | + | |
| - | + | ||
| - | # parse writer | + | |
| - | # (Note: this takes the ' | + | |
| - | my $writer = parseBetween($response, | + | |
| - | | + | |
| - | + | ||
| - | # parse plot | + | |
| - | my $plot = parseBetween($response,"< | + | |
| - | $plot =~ s/\n//g; | + | |
| - | $plot = removeTag($plot); | + | |
| - | + | ||
| - | # parse user rating | + | |
| - | my $userrating; | + | |
| - | my $rating = parseBetween($response," | + | |
| - | my $nbvote = 0; | + | |
| - | my $sommevote = 0; | + | |
| - | | + | |
| - | if (!($rating eq "" | + | |
| - | $sommevote += $rating - 1; | + | |
| - | $nbvote ++; | + | |
| - | } | + | |
| - | | + | |
| - | | + | |
| - | if (!($rating eq "" | + | |
| - | $sommevote += $rating - 1; | + | |
| - | $nbvote ++; | + | |
| - | } | + | |
| - | if ($nbvote==0){$userrating=0}; | + | |
| - | if ($nbvote==1){$userrating=$sommevote*2; | + | |
| - | if ($nbvote==2){$userrating=$sommevote; | + | |
| - | + | ||
| - | + | ||
| - | # parse rating | + | |
| - | my $movierating = parseBetween($response," | + | |
| - | if (!($movierating eq "" | + | |
| - | { $movierating = " | + | |
| - | | + | |
| - | { | + | |
| - | $movierating = parseBetween($response," | + | |
| - | if (!($movierating eq "" | + | |
| - | } | + | |
| - | + | ||
| - | + | ||
| - | # parse movie length | + | |
| - | my $runtime = parseBetween($response," | + | |
| - | my $heure; | + | |
| - | my $minutes; | + | |
| - | | + | |
| - | if (!$heure){ $heure = 0; } | + | |
| - | if (!$minutes){ | + | |
| - | $runtime = $heure * 60; | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | # parse cast | + | |
| - | + | ||
| - | my $cast = parseBetween($response, | + | |
| - | $cast = removeTag($cast); | + | |
| - | if (defined $opt_casting){ | + | |
| - | my $responsecasting = get " | + | |
| - | my $fullcast = parseBetween($responsecasting, | + | |
| - | my $oneactor; | + | |
| - | $fullcast = parseBetween($fullcast," | + | |
| - | my @listactor = split(" | + | |
| - | my @cleanlistactor ; | + | |
| - | for $oneactor (@listactor ) { | + | |
| - | $oneactor = parseBetween($oneactor,"< | + | |
| - | $oneactor = removeTag($oneactor ); | + | |
| - | push(@cleanlistactor, | + | |
| - | } | + | |
| - | my $finalcast = join (", ", | + | |
| - | if ($finalcast | + | |
| - | } | + | |
| - | + | ||
| - | + | ||
| - | # | + | |
| - | my $genres = parseBetween($response,"> | + | |
| - | | + | |
| - | + | ||
| - | # | + | |
| - | my $countries = parseBetween($response,"> | + | |
| - | | + | |
| - | + | ||
| - | # output fields (these field names must match what MythVideo is looking for) | + | |
| - | print " | + | |
| - | if (!(defined $opt_originaltitle)){ | + | |
| - | print " | + | |
| - | | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print " | + | |
| - | print "Cast: $cast\n"; | + | |
| - | print " | + | |
| - | print " | + | |
| - | } | + | |
| - | + | ||
| - | # dump Movie Poster | + | |
| - | sub getMoviePoster { | + | |
| - | my ($movieid)=@_; | + | |
| - | if (defined $opt_d) { printf("# | + | |
| - | + | ||
| - | # get the search results | + | |
| - | + | ||
| - | my $request = " | + | |
| - | if (defined $opt_d) { printf("# | + | |
| - | my $response = get $request; | + | |
| - | my $page=parseBetween($response,"& | + | |
| - | my @pages = split (" | + | |
| - | | + | |
| - | + | ||
| - | my $uri = ""; | + | |
| - | my $furi = ""; | + | |
| - | my $first= 1; | + | |
| - | for $page (@pages ) { | + | |
| - | $request = $page; | + | |
| - | + | ||
| - | # | + | |
| - | # get only the page number | + | |
| - | # | + | |
| - | $request = substr($request, | + | |
| - | + | ||
| - | if (!($request eq "" | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | $uri = parseBetween($response,"< | + | |
| - | $uri = parseBetween($uri ,"< | + | |
| - | if ($first && ! ($uri eq "" | + | |
| - | { | + | |
| - | $furi = $uri; | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | } | + | |
| - | # | + | |
| - | # stop when we have an poster... | + | |
| - | # | + | |
| - | last if (($uri =~ /affiche/) or ($uri =~ /_af/)) | + | |
| - | } | + | |
| - | + | ||
| - | # if $uri =~ affiche or _af then get the first poster if exist | + | |
| - | + | ||
| - | if (($uri !~ /affiche/) or ($uri !~ /_af/)) | + | |
| - | { | + | |
| - | if ($first == 0) | + | |
| - | { | + | |
| - | $uri = $furi; | + | |
| - | } | + | |
| - | } | + | |
| - | + | ||
| - | # | + | |
| - | # in case nothing was found fall back to the little poster... | + | |
| - | # | + | |
| - | if ($uri eq "" | + | |
| - | { | + | |
| - | $request = " | + | |
| - | $response = get $request; | + | |
| - | $response = parseBetween($response, | + | |
| - | $uri = parseBetween($response, | + | |
| - | + | ||
| - | # | + | |
| - | # in case no little poster was found get the small DVD poster | + | |
| - | # if exists ! | + | |
| - | # | + | |
| - | if ($uri =~ / | + | |
| - | { | + | |
| - | $request = " | + | |
| - | $response = get $request; | + | |
| - | $response = parseBetween($response, | + | |
| - | $uri = parseBetween($response, | + | |
| - | return if ($uri eq "" | + | |
| - | } | + | |
| - | } | + | |
| - | + | ||
| - | print " | + | |
| - | } | + | |
| - | + | ||
| - | # dump Movie list: 1 entry per line, each line as ' | + | |
| - | sub getMovieList { | + | |
| - | my ($filename, $options)=@_; | + | |
| - | + | ||
| - | # If we wanted to inspect the file for any reason we can do that now | + | |
| - | + | ||
| - | # | + | |
| - | # Convert filename into a query string | + | |
| - | # (use same rules that Metadata:: | + | |
| - | my $query = $filename; | + | |
| - | | + | |
| - | # Strip off the file extension | + | |
| - | if (rindex($query, | + | |
| - | $query = substr($query, | + | |
| - | } | + | |
| - | # Strip off anything following ' | + | |
| - | if (rindex($query, | + | |
| - | $query = substr($query, | + | |
| - | } | + | |
| - | # Strip off anything following ' | + | |
| - | if (rindex($query, | + | |
| - | $query = substr($query, | + | |
| - | } | + | |
| - | # Strip off anything following ' | + | |
| - | if (index($query, | + | |
| - | $query = substr($query, | + | |
| - | } | + | |
| - | + | ||
| - | # IMDB searches do better if any trailing ,The is left off | + | |
| - | | + | |
| - | if ($1) { $query = $1; } | + | |
| - | + | ||
| - | # prepare the url | + | |
| - | | + | |
| - | if (!$options) { $options = "" | + | |
| - | if (defined $opt_d) { | + | |
| - | printf("# | + | |
| - | } | + | |
| - | my $count = 0; | + | |
| - | my $typerecherche = 3; | + | |
| - | + | ||
| - | while (($typerecherche <=5) && ($count ==0)){ | + | |
| - | # get the search results | + | |
| - | my $request = " | + | |
| - | if (defined $opt_d) { printf("# | + | |
| - | my $response = get $request; | + | |
| - | + | ||
| - | # | + | |
| - | # don't try to invent if it doesn' | + | |
| - | # | + | |
| - | | + | |
| - | + | ||
| - | # extract possible matches | + | |
| - | # | + | |
| - | # | + | |
| - | my $exact_matches = $response; | + | |
| - | # parse movie list from matches | + | |
| - | my $beg = "< | + | |
| - | my $end = "</ | + | |
| - | + | ||
| - | my @movies; | + | |
| - | + | ||
| - | my $data = $exact_matches; | + | |
| - | if ($data eq "" | + | |
| - | if (defined $opt_d) { printf("# | + | |
| - | | + | |
| - | | + | |
| - | my $start = index($data, | + | |
| - | my $finish = index($data, | + | |
| - | + | ||
| - | my $title; | + | |
| - | while ($start != -1) { | + | |
| - | | + | |
| - | my $sub = substr($data, | + | |
| - | my ($movienum, $moviename) = split(" | + | |
| - | | + | |
| - | | + | |
| - | my ($movieyear)= $moviename =~/ | + | |
| - | if ($movieyear){$title = $title." | + | |
| - | | + | |
| - | + | ||
| - | # advance data to next movie | + | |
| - | $data = substr($data, | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | # add to array | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | # display array of values | + | |
| - | for $movie (@movies) { | + | |
| - | print " | + | |
| - | } | + | |
| - | } | + | |
| - | } | + | |
| - | } | + | |
| - | + | ||
| - | # | + | |
| - | # Main Program | + | |
| - | # | + | |
| - | + | ||
| - | # parse command line arguments | + | |
| - | + | ||
| - | GetOptions( " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | ); | + | |
| - | + | ||
| - | + | ||
| - | # print out info | + | |
| - | if (defined $opt_v) { version(); exit 1; } | + | |
| - | if (defined $opt_i) { info(); exit 1; } | + | |
| - | + | ||
| - | # print out usage if needed | + | |
| - | if (defined $opt_h || $# | + | |
| - | + | ||
| - | if (defined $opt_D) { | + | |
| - | # take movieid from cmdline arg | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | elsif (defined $opt_P) { | + | |
| - | # take movieid from cmdline arg | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | elsif (defined $opt_M) { | + | |
| - | # take query from cmdline arg | + | |
| - | # | + | |
| - | my $query; | + | |
| - | my $options = ''; | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | === MYSQL === | + | |
| - | Base de données assez primaire mais tout à fait fonctionnelle. | + | |
| - | + | ||
| - | Pour lancer un script (ne pas oublier les < >): | + | |
| - | mysql db_name < script.sql > output.tab | + | |
| - | + | ||
| - | Pour se connecter à la base de mythtv | + | |
| - | mysql --user=root --password=**** mythconverg (**** est à remplacer par son mot de passe) | + | |
| - | + | ||
| - | == Où est la base par défaut? | + | |
| - | + | ||
| - | cd / | + | |
| - | + | ||
| - | == Un petit script pour améliorer la base == | + | |
| - | (**** est à remplacer par son mot de passe). | + | |
| - | #!/bin/bash | + | |
| - | ### mysql-settings | + | |
| - | HOST=localhost | + | |
| - | USER=// | + | |
| - | PASSW=// | + | |
| - | DATABASE=// | + | |
| - | SCRIPTDIR=`dirname $0` | + | |
| - | + | ||
| - | echo " | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | mysql --user=${USER} --password=${PASSW} ${DATABASE} -B -e " | + | |
| - | SELECT concat(' | + | |
| - | union | + | |
| - | SELECT concat(' | + | |
| - | union | + | |
| - | SELECT concat(' | + | |
| - | union | + | |
| - | SELECT concat(' | + | |
| - | echo " | + | |
| - | mysql --user=${USER} --password=${PASSW} ${DATABASE} < | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | + | ||
| - | == Un petit script pour automatiser la gestion des fichiers audios == | + | |
| - | # | + | |
| - | ### mysql-settings | + | |
| - | HOST=localhost | + | |
| - | USER=// | + | |
| - | PASSW=// | + | |
| - | DATABASE=// | + | |
| - | SCRIPTDIR=`dirname $0` | + | |
| - | + | ||
| - | echo " | + | |
| - | echo " | + | |
| - | # Efface les playlist sauf celles par défaut | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | # Ajoute les playlist : premier dossier | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | select if(left(md.path, | + | |
| - | FROM music_songs ms, | + | |
| - | where md.directory_id=ms.directory_id group by play;" | mysql -u $USER --password=$PASSW -D $DATABASE -h $HOST | + | |
| - | + | ||
| - | # Ajout des musiques aux playlist | + | |
| - | echo " | + | |
| - | # echo " | + | |
| - | # FROM music_songs ms, | + | |
| - | # where md.directory_id=ms.directory_id | + | |
| - | # and (left(md.path, | + | |
| - | # group by left(md.path, | + | |
| - | + | ||
| - | mysql --user=$USER --password=$PASSW $DATABASE < | + | |
| - | echo " | + | |
| - | mysql --user=$USER --password=$PASSW $DATABASE < | + | |
| - | + | ||
| - | # Ajoute les playlist : doublon | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | inner join music_directories cc on ms.directory_id=cc.directory_id | + | |
| - | left join music_directories c on c.directory_id=cc.parent_id | + | |
| - | inner join (SELECT m.name, | + | |
| - | where m.playlist_name=' | + | |
| - | # Ajoute les playlist : doublon | + | |
| - | + | ||
| - | echo " | + | |
| - | echo " | + | |
| - | + | ||
| - | Avec son petit script sql | + | |
| - | SELECT concat(' | + | |
| - | m.playlist_name=''', | + | |
| - | FROM music_songs ms, | + | |
| - | where m.directory_id=ms.directory_id and left(m.path, | + | |
| - | select ' | + | |
| - | SELECT concat(' | + | |
| - | FROM music_songs ms, | + | |
| - | where m.directory_id=ms.directory_id and left(m.path, | + | |
| - | select ' | + | |
| - | + | ||
| - | == Un petit script pour automatiser la gestion des fichiers vidéos == | + | |
| - | (enchainement des vidéos, classement des genres en fonction des dossiers et création des minin affiches pour les videos qui n'en n'ont pas) | + | |
| - | + | ||
| - | # | + | |
| - | ### Pour MYSQL 5.0 peut être moins | + | |
| - | ### mysql-settings | + | |
| - | HOST=localhost | + | |
| - | USER=// | + | |
| - | PASSW=// | + | |
| - | DATABASE=// | + | |
| - | SCRIPTDIR=`dirname $0` | + | |
| - | THUMB_TIME=00: | + | |
| - | THUMB_NB=40 | + | |
| - | THUMB_DIR=/ | + | |
| - | + | ||
| - | ### initialise le champ coverfile si fichier inexistante | + | |
| - | VERIF_COVER() | + | |
| - | { | + | |
| - | if [ ! -f " | + | |
| - | echo ' | + | |
| - | fi | + | |
| - | } | + | |
| - | + | ||
| - | ### Crée et affecte les couvertures | + | |
| - | AJOUT_COVER() | + | |
| - | { | + | |
| - | filename=" | + | |
| - | THUMB_PATH=" | + | |
| - | mplayer -ss $THUMB_TIME -nosound -frames 3 -vo png:z=9 " | + | |
| - | if [ ! -f " | + | |
| - | mplayer -nosound -frames $THUMB_NB -vo png:z=9 " | + | |
| - | | + | |
| - | if [ -f " | + | |
| - | echo " | + | |
| - | fi | + | |
| - | rm 000000?? | + | |
| - | } | + | |
| - | + | ||
| - | ### MAIN ### | + | |
| - | echo " "> $SCRIPTDIR/ | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | ### RAZ des couvertures inexistantes | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | WHERE coverfile<>' | + | |
| - | while read ligne | + | |
| - | do | + | |
| - | | + | |
| - | done < | + | |
| - | + | ||
| - | ### Recherche des couvertures manquantes | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | WHERE v.coverfile=' | + | |
| - | and LOWER(right(v.filename, | + | |
| - | and LOWER(right(v.filename, | + | |
| - | ### Creation et affectation des couvertures manquantes | + | |
| - | # incompatible avec mplayer | + | |
| - | # do | + | |
| - | # | + | |
| - | # | + | |
| - | # done < | + | |
| - | echo " | + | |
| - | oldIFS=$IFS | + | |
| - | IFS=$' | + | |
| - | for ligne in $(cat $SCRIPTDIR/ | + | |
| - | do | + | |
| - | | + | |
| - | done | + | |
| - | IFS=$old_IFS | + | |
| - | + | ||
| - | echo " | + | |
| - | mysql --user=$USER --password=$PASSW $DATABASE < | + | |
| - | echo " | + | |
| - | mysql --user=$USER --password=$PASSW $DATABASE < | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | exit | + | |
| - | + | ||
| - | Avec son petit script sql (qui efface toutes les playlists!!!) : | + | |
| - | # Efface les categories de video | + | |
| - | truncate videocategory; | + | |
| - | + | ||
| - | # Ajout des categories | + | |
| - | # 14 = CHAR_LENGTH('/ | + | |
| - | START TRANSACTION; | + | |
| - | insert into videocategory (category) select distinct mid(videometadata.filename, | + | |
| - | COMMIT; | + | |
| - | + | ||
| - | # création du second script sql | + | |
| - | + | ||
| - | # Affectation des categories | + | |
| - | # 14 = CHAR_LENGTH('/ | + | |
| - | select concat(' | + | |
| - | from videometadata, | + | |
| - | select ' | + | |
| - | + | ||
| - | # Enchainement des videos (recherche de la derniere) (avec le debut de transaction) | + | |
| - | SELECT | + | |
| - | FROM videometadata v where LOWER(right(v.filename, | + | |
| - | and LOWER(right(v.filename, | + | |
| - | and v.filename=(select min(vv.filename) from videometadata vv); | + | |
| - | # Enchainement des videos | + | |
| - | SELECT | + | |
| - | FROM videometadata v where LOWER(right(v.filename, | + | |
| - | and LOWER(right(v.filename, | + | |
| - | order by v.filename desc; | + | |
| - | # Enchainement des videos (recherche de la derniere) | + | |
| - | SELECT | + | |
| - | FROM videometadata v where LOWER(right(v.filename, | + | |
| - | and LOWER(right(v.filename, | + | |
| - | and v.filename=(select max(vv.filename) from videometadata vv); | + | |
| - | # pour la fin de transaction | + | |
| - | select ' | + | |
| - | quit | + | |
| - | + | ||
| - | //(Pourquoi c'est long ? il y a beaucoup de fichiers et la machine n'est pas rapide)// | + | |
| - | + | ||
| - | //(Pourquoi ça plante ? erreur de lecture/ | + | |
| - | + | ||
| - | + | ||
| - | == Intégration dans un menu == | + | |
| - | sudo vi / | + | |
| - | Ajouter à l' | + | |
| - | + | ||
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | == Autre méthode == | + | |
| - | faire dans le dossier des vidéos | + | |
| - | dir * > all_videos.pls | + | |
| - | ou | + | |
| - | find / | + | |
| - | (fait la liste de tout les videos qui se trouve dans / | + | |
| - | + | ||
| - | Pour créer sa playlist. | + | |
| - | + | ||
| - | Ajouter au Paramètres→Paramètres médias→Paramètres Vidéos→Type de fichiers | + | |
| - | une extension pls et la commande : | + | |
| - | mplayer -fs -zoom -quiet -vo xv -playlist %s | + | |
| - | + | ||
| - | === DEMARRAGE AUTO === | + | |
| - | Dans Système-> | + | |
| - | + | ||
| - | mythbackend (est parfois inutile : ps -ef |grep mythbackend) | + | |
| - | + | ||
| - | mythfrontend - -service | + | |
| - | + | ||
| - | irexec –d (à rajouter à la fin, voire à enlever et remettre...) | + | |
| - | + | ||
| - | + | ||
| - | == Rien à voir mais ça peut toujours servir == | + | |
| - | + | ||
| - | Arrêter démarrer le backend : | + | |
| - | sudo / | + | |
| - | sudo / | + | |
| - | + | ||
| - | Arrêter démarrer mysql : | + | |
| - | sudo / | + | |
| - | sudo / | + | |
| - | + | ||
| - | + | ||
| - | === SAMBA === | + | |
| - | Avoir une bibliothèque multimédia c'est bien, la partager c'est mieux... | + | |
| - | + | ||
| - | sudo smbpasswd -a `whoami` | + | |
| - | + | ||
| - | < | + | |
| - | + | ||
| - | === MYTHTV GALERIE === | + | |
| - | Pas grand chose à faire, à part le setup : indiquer l' | + | |
| - | Pour son utilisation regarder " | + | |
| - | + | ||
| - | + | ||
| - | === ARRET et REBOOT de Mythtv (!) === | + | |
| - | La commande pour rebooter ou arrêter l' | + | |
| - | + | ||
| - | Pour remédier à cela ajouter // | + | |
| - | + | ||
| - | (problème : le fichier doit être en lecture seul. Solution : l' | + | |
| - | + | ||
| - | sudo cp / | + | |
| - | sudo chmod 777 / | + | |
| - | sudo gedit / | + | |
| - | ajouter en fin de fichier (// | + | |
| - | mythtv ALL=NOPASSWD:/ | + | |
| - | Puis écraser par le nouveau fichier | + | |
| - | sudo chmod 440 / | + | |
| - | sudo cp / | + | |
| - | + | ||
| - | En cas de problème redémarrer en mode (recovery mode) et supprimer cette ligne précédemment ajoutée. | + | |
| - | + | ||
| - | Cette methode n'a plus l'air de fonctionner sur Jaunty, pour y remédier : | + | |
| - | sudo chmod u+s / | + | |
| - | sudo chmod u+s / | + | |
| - | + | ||
| - | //(la différence avec la précédente méthode est dans le premier cas seul un utilisateur peut executer la commande, dans la seconde c'est permis pour tout le monde)// | + | |
| - | + | ||
| - | ===== Liens ===== | + | |
| - | + | ||
| - | - Toutes les informations de la mise en place de [[http:// | + | |
| - | + | ||
| - | http:// | + | |
| - | + | ||
| - | http:// | + | |
| - | + | ||
| - | http:// | + | |
| - | + | ||
| - | http:// | + | |
| - | + | ||
| - | http:// | + | |
| - | + | ||
| - | https:// | + | |
| - | + | ||
| - | http:// | + | |
| - | + | ||
| - | Merci, thank you, vielen Dank aux autres | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | Contributeurs : [[utilisateurs: | + | |
