<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.transcyberien.net/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Transcyberien - script</title>
  <link>http://www.transcyberien.net/</link>
  <description>Blog qui parle de Linux en général et Gentoo en particulier... avec un peu de musique et de photographie aussi...</description>
  <language>fr</language>
  <pubDate>Thu, 17 Jun 2010 14:34:46 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Ajout d'une radio sur le blog</title>
    <link>http://www.transcyberien.net/post/2007/08/21/Ajout-dune-radio-sur-le-blog</link>
    <guid isPermaLink="false">urn:md5:7edeac59423b6d45712370d4a301aa14</guid>
    <pubDate>Tue, 21 Aug 2007 23:25:00 +0200</pubDate>
    <dc:creator>Jérôme</dc:creator>
        <category>ce blog</category>
        <category>découverte</category><category>libre</category><category>linux</category><category>musique</category><category>script</category><category>windows</category>    
    <description>    &lt;p&gt;&lt;img src=&quot;http://www.transcyberien.net/public/img/radio.jpg&quot; alt=&quot;radio.jpg&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;
Il n'est pas toujours facile de découvrir des morceaux ou groupes de musique et on passe parfois à côté de choses intéressantes. Alors pour améliorer un peu ce blog, je viens d'ajouter le module &lt;a href=&quot;http://www.radioblogclub.fr/&quot; hreflang=&quot;fr&quot;&gt;Radio.Blog&lt;/a&gt; en bas de la barre latérale. J'ajouterai dans les différentes playlists les musiques que je trouve sympathiques.&lt;/p&gt;


&lt;p&gt;Internet favorise bien sûr l'écoute de musiques inconnues. Dommage que &lt;a href=&quot;http://www.pandora.com/&quot; hreflang=&quot;en&quot;&gt;Pandora&lt;/a&gt; ne soit plus accessible depuis l'Europe (à moins de passer par des services de &lt;a href=&quot;http://fr.wikipedia.org/wiki/Serveur_mandataire&quot; hreflang=&quot;fr&quot;&gt;proxies&lt;/a&gt;). Ce site permettait l'écoute de musiques ressemblant à celle que vous lui indiquiez. Il existe aussi &lt;a href=&quot;http://www.jamendo.com/fr/&quot; hreflang=&quot;fr&quot;&gt;Jamendo&lt;/a&gt;, site de musiques sous licence &lt;a href=&quot;http://fr.creativecommons.org/&quot; hreflang=&quot;fr&quot;&gt;Creative Commons&lt;/a&gt;, ce qui signifie que les auteurs / interprètes en permettent l'écoute, la copie et la distribution libres. Jamendo permet le téléchargement d'albums via peer-to-peer. En plus, ce site dispose désormais d'un lecteur et l'on peut donc écouter divers morceaux en ligne.&lt;/p&gt;


&lt;p&gt;En ce qui concerne, Radio.Blog, des scripts sont fournis pour ré-encoder ces fichiers mp3 en fichier rbs qui sont, en fait, des fichiers mp3 tout à fait normaux. Le but des scripts est de diminuer la taille des fichiers en diminuant la qualité : fréquence d'échantillonage à 22kHz et bitrate à 64 kbits/s. Ils sont prévus pour une utilisation sous Windows, donc j'ai fait une petite adaptation pour Linux, en incluant au passage le ré-encodage des fichier ogg. Pour que ce script soit utilisable, il faut que l'encoder &lt;a href=&quot;http://lame.sourceforge.net/index.php&quot; hreflang=&quot;en&quot;&gt;Lame&lt;/a&gt; ainsi que les &lt;a href=&quot;http://www.xiph.org/downloads/&quot; hreflang=&quot;en&quot;&gt;Vorbis Tools&lt;/a&gt; soient installés (enfin, je fais confiance à votre gestionnaire de packages favori &lt;img src=&quot;/themes/new/smilies/smile.png&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt; ).&lt;/p&gt;


&lt;p&gt;Le script en question :&lt;/p&gt;

&lt;code class=&quot;bash&quot;&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#! /bin/sh&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;OUTPUT_DIR=&lt;/span&gt;./sounds&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt; file &lt;span style=&quot;color: #b1b100;&quot;&gt;in&lt;/span&gt; *.mp3&lt;br /&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000ff;&quot;&gt;output=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;${file/mp3/rbs}&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# replace the extension&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; ! -f &lt;span style=&quot;color: #0000ff;&quot;&gt;$OUTPUT_DIR&lt;/span&gt;/&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;$output&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;then&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lame -b &lt;span style=&quot;color: #cc66cc;&quot;&gt;64&lt;/span&gt; --resample &lt;span style=&quot;color: #cc66cc;&quot;&gt;22.05&lt;/span&gt; -h &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;$file&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$OUTPUT_DIR&lt;/span&gt;/&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;$output&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;done&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt; file &lt;span style=&quot;color: #b1b100;&quot;&gt;in&lt;/span&gt; *.ogg&lt;br /&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000ff;&quot;&gt;wav=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;${file/ogg/wav}&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# replace the extension&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000ff;&quot;&gt;output=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;${file/ogg/rbs}&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# replace the extension&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; ! -f &lt;span style=&quot;color: #0000ff;&quot;&gt;$OUTPUT_DIR&lt;/span&gt;/&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;$output&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;then&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oggdec &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;$file&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# first, decoding ogg to wav&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lame -b &lt;span style=&quot;color: #cc66cc;&quot;&gt;64&lt;/span&gt; --resample &lt;span style=&quot;color: #cc66cc;&quot;&gt;22.05&lt;/span&gt; -h &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;$wav&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$OUTPUT_DIR&lt;/span&gt;/&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;$output&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;done&lt;/span&gt;&lt;/code&gt;</description>
    
    
    
          <comments>http://www.transcyberien.net/post/2007/08/21/Ajout-dune-radio-sur-le-blog#comment-form</comments>
      <wfw:comment>http://www.transcyberien.net/post/2007/08/21/Ajout-dune-radio-sur-le-blog#comment-form</wfw:comment>
      <wfw:commentRss>http://www.transcyberien.net/feed/rss2/comments/42</wfw:commentRss>
      </item>
    
</channel>
</rss>