<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anthony Dahanne's blog &#187; open source</title>
	<atom:link href="http://blog.dahanne.net/category/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dahanne.net</link>
	<description>Open Source Software, Java, Ruby, Agility</description>
	<lastBuildDate>Tue, 20 Jul 2010 13:11:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>G2Android 1.5.0 is available : major release !</title>
		<link>http://blog.dahanne.net/2010/07/20/g2android-1-5-0-is-available-major-release/</link>
		<comments>http://blog.dahanne.net/2010/07/20/g2android-1-5-0-is-available-major-release/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 13:09:29 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=368</guid>
		<description><![CDATA[Finally !
During a long period of calm, I finally rele [...]]]></description>
			<content:encoded><![CDATA[<p>Finally !<br />
During a long period of calm, I finally released a new version (with new features) of the Android client for remote galleries Gallery2 (your photos on your website), G2Android.<br />
If you have a look at the <a href="http://code.google.com/p/g2android/"> G2Android project homepage</a>, you will see that the following issues (bug and enhancements) have been closed :<br />
Version 1.5.0, 19th of July 2010 Major release</p>
<ul>
<li>issue #33  Enable uploaded photo title modification</li>
<li>issue #41  Malformed Gallery 2 URL leads to G2Android forced close</li>
<li>issue #37  Uploaded photo looses .jpg file extension</li>
<li>issue #42  Feature Suggestion: Provide automatic login when started</li>
<li> issue #20  Share via camera app?</li>
<li>issue #15  Enhancement: Add multiple photo uploading </li>
</ul>
<p>The major new feature is clearly the &laquo;&nbsp;add photo to gallery&nbsp;&raquo; feature : I created a new Activity, <a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/src/net/dahanne/android/g2android/activity/UploadPhoto.java">UploadPhoto</a> , which can be called from 2 external intents : </p>
<p><a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/AndroidManifest.xml">AndroidManifest.xml </a></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activity</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;.activity.UploadPhoto&quot;</span> <span style="color: #000066;">android:label</span>=<span style="color: #ff0000;">&quot;@string/upload_photo_title&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;intent</span> -filter<span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.action.SEND&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.action.SEND_MULTIPLE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.category.DEFAULT&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">android:mimeType</span>=<span style="color: #ff0000;">&quot;image/*&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/intent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activity<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>So now the user can send a new photo or a batch of photos from another application, the android gallery app for example; the big work was then to decode the URIs of the photos to find the photo file on the phone, and then send it to the gallery; also I had to make sure that the user is still connected to the gallery, if not, he must login again.</p>
<p>Also, the user is now able to take a picture and send it to his gallery, without leaving g2android; this has been done adding the camera permission in the <a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/AndroidManifest.xml">AndroidManifest.xml </a>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;uses</span> -permission <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.permission.CAMERA&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/uses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This is the easy part <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Then, when your app receive a photo from the Camera, it does not receive an URI pointing to a photo file; nope, you get a Bitmap  object you have transform into a file, to be able to send it to the remote gallery : </p>
<p><a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/src/net/dahanne/android/g2android/activity/UploadPhoto.java">UploadPhoto</a></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">                                                Bundle extras <span style="color: #339933;">=</span> intent.<span style="color: #006633;">getExtras</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                Bitmap bm <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                                                <span style="color: #003399;">Object</span> o <span style="color: #339933;">=</span> extras.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;data&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>o <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> o <span style="color: #000000; font-weight: bold;">instanceof</span> Bitmap<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                                        bm <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>Bitmap<span style="color: #009900;">&#41;</span> o<span style="color: #339933;">;</span>
                                                        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
                                                                StringBuilder stringBuilder <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> StringBuilder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilder.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span>Settings
                                                                                .<span style="color: #006633;">getG2AndroidPath</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilder.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                StringBuilder stringBuilderFileName <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> StringBuilder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilderFileName.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span>fileName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilderFileName
                                                                                .<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">System</span>.<span style="color: #006633;">currentTimeMillis</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilderFileName.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilder.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span>stringBuilderFileName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                imageFromCamera <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">File</span><span style="color: #009900;">&#40;</span>
                                                                                stringBuilder.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                <span style="color: #003399;">FileOutputStream</span> fos <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">FileOutputStream</span><span style="color: #009900;">&#40;</span>
                                                                                imageFromCamera<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                bm.<span style="color: #006633;">compress</span><span style="color: #009900;">&#40;</span>CompressFormat.<span style="color: #006633;">JPEG</span>, <span style="color: #cc66cc;">100</span>, fos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                fos.<span style="color: #006633;">flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                fos.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                                                                mImageUri<span style="color: #339933;">=</span>Uri.<span style="color: #006633;">fromFile</span><span style="color: #009900;">&#40;</span>imageFromCamera<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                fileName <span style="color: #339933;">=</span> stringBuilderFileName.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                                                        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">FileNotFoundException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                                                ShowUtils.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">alertFileProblem</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,<span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                                                ShowUtils.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">alertFileProblem</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,<span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                        <span style="color: #009900;">&#125;</span>
&nbsp;
                                                <span style="color: #009900;">&#125;</span></pre></div></div>

<p>I also optimized the application, issue #37 (Uploaded photo looses .jpg file extension) was in fact due to the fact that I re created the photo file before sending it; instead of using a projection of the URI to get its path on the phone :</p>
<p><a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/src/net/dahanne/android/g2android/utils/UriUtils.java">UriUtils</a></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #003399;">String</span> getFileNameFromUri<span style="color: #009900;">&#40;</span>Uri uri, Activity activity<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> projection <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> MediaStore.<span style="color: #006633;">Images</span>.<span style="color: #006633;">ImageColumns</span>.<span style="color: #006633;">DISPLAY_NAME</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">String</span> fileName<span style="color: #339933;">=</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">Cursor</span> c <span style="color: #339933;">=</span> activity.<span style="color: #006633;">managedQuery</span><span style="color: #009900;">&#40;</span>uri, projection, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> c.<span style="color: #006633;">moveToFirst</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        fileName <span style="color: #339933;">=</span> c.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000000; font-weight: bold;">return</span> fileName<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Also shipping with this new version, <a href="http://goapk.com">Chinese i18n thanks to the chinese android market, GoAPK</a> and also new art from <a href="http://www.gdl3d.com/">Dan</a>, who just posted a comment to the blog proposing to add new art; thanks again to you both ! You make the application richer !</p>
<p>So now, what remains to be done ? well, the compatibility with Gallery3, as the G3 remote API is almost stable now, thanks to the work of Bharat, Tim, and many others; a java implementation is already under work, I will check if I can use it instead of&#8230; re inventing the wheel !<br />
More details to come, for sure !</p>
<p>You can download G2Android from the Android Market, SlideMe, Applibs, etc.. and also from the <a href="http://code.google.com/p/g2android/"> G2Android project homepage</a><br />
.<br />
Enjoy this app as much as I enjoy working on it, and if you like it, don&#8217;t forget to flattr me <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2010/07/20/g2android-1-5-0-is-available-major-release/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Encoder vos videos en Webm (vp8) avec ffmpeg sous Ubuntu</title>
		<link>http://blog.dahanne.net/2010/06/19/encoder-vos-videos-en-webm-vp8-avec-ffmpeg-sous-ubuntu/</link>
		<comments>http://blog.dahanne.net/2010/06/19/encoder-vos-videos-en-webm-vp8-avec-ffmpeg-sous-ubuntu/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 00:02:26 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[montage video]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=356</guid>
		<description><![CDATA[Depuis la libération du codec VP8 (et de son conteneur [...]]]></description>
			<content:encoded><![CDATA[<p>Depuis la libération du codec VP8 (et de son conteneur WebM) de ON2 technologies par Google en Mai 2010, la communauté open source (et les amateurs de video !) a trouvé le digne remplaçant de theora, finalement peu performant, et surtout un adversaire de poids face au codec video breveté et certainement pas standard h264.<br />
Cet article a pour but d&#8217;expliquer comment :</p>
<ul>
<li>installer ffmpeg avec le support de webm sur Ubuntu</li>
<li>encoder une vidéo au format webm</li>
<li>lire une vidéo au format webm</li>
</ul>
<h3>Installer ffmpeg avec le support de webm sur Ubuntu</h3>
<p>Pour cela, je vais reprendre en quasi intégralité cet<a href="http://www.webdevonlinux.fr/2010/06/ffmpeg-0-6-0-ajoute-le-support-du-codec-webm"> excellent article de Steph sur l&#8217;installation de ffmpeg avec support de Webm sur Ubuntu 10.04 (lucid Lynx)</a>.<br />
On enlève les versions originales de ffmpeg et eventuellement de  x264 :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> remove <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> x264 libx264-dev</pre></div></div>

<p>On met à jour le système de paquets et on installe les librairies nécessaires sur le système :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev</pre></div></div>

<p>Récupération des sources, compilation et installation de x264 (optionnel, si vous voulez aussi encoder en x264) sous forme de paquets pour votre système (checkinstall wrappe &laquo;&nbsp;make install&nbsp;&raquo; en installant en plus le binaire obtenu sous forme de paquets debian dans votre système)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span>
git clone git:<span style="color: #000000; font-weight: bold;">//</span>git.videolan.org<span style="color: #000000; font-weight: bold;">/</span>x264.git
<span style="color: #7a0874; font-weight: bold;">cd</span> x264
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> checkinstall <span style="color: #660033;">--pkgname</span>=x264 <span style="color: #660033;">--pkgversion</span> <span style="color: #ff0000;">&quot;2:0.<span style="color: #780078;">`grep X264_BUILD x264.h -m1 | cut -d' ' -f3`</span>.<span style="color: #780078;">`git rev-list HEAD | wc -l`</span>+git<span style="color: #780078;">`git rev-list HEAD -n 1 | head -c 7`</span>&quot;</span> <span style="color: #660033;">--backup</span>=no <span style="color: #660033;">--default</span></pre></div></div>

<p>Récupération des sources, compilation et installation de VP8, librairie nommée libvpx sous forme de paquets pour votre système (checkinstall wrappe &laquo;&nbsp;make install&nbsp;&raquo; en installant en plus le binaire obtenu sous forme de paquets debian dans votre système)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span>
git clone git:<span style="color: #000000; font-weight: bold;">//</span>review.webmproject.org<span style="color: #000000; font-weight: bold;">/</span>libvpx.git
<span style="color: #7a0874; font-weight: bold;">cd</span> libvpx
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> checkinstall <span style="color: #660033;">--pkgname</span>=libvpx <span style="color: #660033;">--pkgversion</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`date +%Y%m%d%k%M`</span>-git&quot;</span> <span style="color: #660033;">--backup</span>=no <span style="color: #660033;">--nodoc</span> <span style="color: #660033;">--default</span></pre></div></div>

<p>Récupération des sources, compilation et installation de ffmpeg (enfin!)sous forme de paquets pour votre système (checkinstall wrappe &laquo;&nbsp;make install&nbsp;&raquo; en installant en plus le binaire obtenu sous forme de paquets debian dans votre système, à noter que pour ffmpeg vous aurez une erreur lors du checkinstall, qui n&#8217;empêchera pas l&#8217;installation d&#8217;aboutir)<br />
Si vous avez installé x264, vous pouvez ajouter comme ci dessous ajouter le support x264 à ffmpeg  : &#8211;enable-libx264 ; à noter que l&#8217;option &#8211;enable-libvpx vous donnera accès à l&#8217;encodage webm</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span>
<span style="color: #c20cb9; font-weight: bold;">svn</span> checkout <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #000000; font-weight: bold;">//</span>svn.ffmpeg.org<span style="color: #000000; font-weight: bold;">/</span>ffmpeg<span style="color: #000000; font-weight: bold;">/</span>trunk <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-gpl</span> <span style="color: #660033;">--enable-version3</span> <span style="color: #660033;">--enable-nonfree</span> <span style="color: #660033;">--enable-postproc</span> <span style="color: #660033;">--enable-pthreads</span> <span style="color: #660033;">--enable-libfaac</span> <span style="color: #660033;">--enable-libfaad</span> <span style="color: #660033;">--enable-libmp3lame</span> <span style="color: #660033;">--enable-libopencore-amrnb</span> <span style="color: #660033;">--enable-libopencore-amrwb</span> <span style="color: #660033;">--enable-libtheora</span> <span style="color: #660033;">--enable-libvorbis</span> <span style="color: #660033;">--enable-libvpx</span> <span style="color: #660033;">--enable-libx264</span> <span style="color: #660033;">--enable-libxvid</span> <span style="color: #660033;">--enable-x11grab</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> checkinstall <span style="color: #660033;">--pkgname</span>=<span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">--pkgversion</span> <span style="color: #ff0000;">&quot;4:SVN-r<span style="color: #780078;">`svn info | grep Revision | awk '{ print $NF }'`</span>&quot;</span> <span style="color: #660033;">--backup</span>=no <span style="color: #660033;">--default</span>
<span style="color: #7a0874; font-weight: bold;">hash</span> x264 <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> ffplay</pre></div></div>

<p>Alors il est vrai que c&#8217;est toujours plus simple d&#8217;installer des paquets avec apt-get install que de compiler des sources, mais le support de webm dans ffmpeg est à ce jour tellement récent que vous ne trouverez pas de paquets pour votre distribution !</p>
<h3>Encoder vos vidéos en webm avec ffmpeg</h3>
<p>Rien de plus simple !</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> input.avi <span style="color: #660033;">-threads</span> <span style="color: #000000;">2</span> output.webm</pre></div></div>

<p>(sauf qu&#8217;il semnlearait que le -threads 2, supposé donner 2 threads à ffmpeg, utile pour les dual core, ne soit pas supporté, à ce jour, pour webm)</p>
<h3>Lire vos vidéos encodées en webm</h3>
<h2>Avec ffplay</h2>
<p>Vous avez déjà installé précédemment ffmplay :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ffplay output.webm</pre></div></div>

<h2>Avec vlc</h2>
<p>Vous pouvez aussi les lire avec la dernière version de VLC, à date, la version 1.1.0; il vous faut ajouter un nouveau repo avec les dernières version de vlc, enlever votre version actuelle et ré installer vlc :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> add-apt-repository ppa:c-korn<span style="color: #000000; font-weight: bold;">/</span>vlc
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> remove vlc
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> vlc mozilla-plugin-vlc videolan-doc</pre></div></div>

<p>Depuis la sortie officielle de VLC en 1.1.0, VLC lit parfaitement les fichiers webm, toutes plateformes confondues !</p>
<h2>Avec votre navigateur web</h2>
<p>Mais le véritable intérêt de webm, c&#8217;est le web, aussi à cette page, <a href="http://www.youtube.com/html5">vous sont listées les navigateurs compatibles webm</a>.<br />
Vous y trouverez un paquet debian/ubuntu pour chrome, et en <a href="http://nightly.mozilla.org/">téléchargeant et détarrant un firefox nightly build</a>, vous pourrez aussi les lire avec firefox.</p>
<p>Si vous pouvez lire la video ci dessous, c&#8217;est qu&#8217;alors vous utilisez un navigateur compatible webm !<br />
<video width="854" height="480" controls preload="none"><br />
       <source src="http://blog.dahanne.net/wp-content/uploads/sample.webm" type="video/webm" /><br />
</video></p>
<p>Avec chrome version 6.0.437.3 dev , j&#8217;ai pu la lire avec succès !</p>
<p>Vous pouvez aussi télécharger la vidéo en enregistrant cette url :</p>
<p><a href="http://blog.dahanne.net/wp-content/uploads/sample.webm">Exemple de vidéo webm à télécharger</a></p>
<p>Bon encodage Webm à tous !</p>
<h3>Sources :</h3>
<ul>
<li><a href="http://linuxfr.org//2010/06/17/27005.html">annonce de l&#8217;intégration de webm sur linuxfr.org</a></li>
<li><a href="http://www.webdevonlinux.fr/2010/06/ffmpeg-0-6-0-ajoute-le-support-du-codec-webm">installer webm sur ubuntu 10.04 64 bits</a></li>
<li><a href="http://ubuntuforums.org/showthread.php?t=786095">install webm on ubuntu</a></li>
<li><a href="http://www.mirovideoconverter.com/">Encoder vos videos webm sous windows</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2010/06/19/encoder-vos-videos-en-webm-vp8-avec-ffmpeg-sous-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging any Java Application</title>
		<link>http://blog.dahanne.net/2010/06/03/debugging-any-java-application/</link>
		<comments>http://blog.dahanne.net/2010/06/03/debugging-any-java-application/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 18:18:47 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=351</guid>
		<description><![CDATA[As long as you're using a java application (ie an appli [...]]]></description>
			<content:encoded><![CDATA[<p>As long as you&#8217;re using a java application (ie an application calling your JVM), you can enable the debug mode with these parameters :</p>
<p><code>-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</code></p>
<p>So for example, if you want to debug an ant launch (launched via &laquo;&nbsp;ant -f myBuild.xml&nbsp;&raquo; for example), you simply have to set ANT_OPTS; on windows :</p>
<p><code>set ANT_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</code></p>
<p>Another example, with JBoss :</p>
<p><code>set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</code></p>
<p>and then you can debug your launch with Eclipse, for example, creating a new debug configuration (remote java application on port 8787) !<br />
Option : you can choose whether or not the application should wait for your debugger setting suspend to y or n.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2010/06/03/debugging-any-java-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>G2Android v. 1.4.2 : now it is really stable !</title>
		<link>http://blog.dahanne.net/2009/12/23/g2android-v-1-4-2-now-it-is-really-stable/</link>
		<comments>http://blog.dahanne.net/2009/12/23/g2android-v-1-4-2-now-it-is-really-stable/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 23:46:54 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=337</guid>
		<description><![CDATA[Sorry, no new features in this release :-(
But a lot o [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry, no new features in this release <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /><br />
But a lot of bug fixes <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
These bugs specially appeared in CyanogenMod running Android phones, because, for some reason, CyanogenMod kills really rapidly applications loosing focus.<br />
For example, when trying to upload a photo, Android, under Cyanogenmod, would kill G2Android, as it lost focus, for letting the user choose his photo; or if you received a phone call while browsing a gallery, Android would also kill G2Android.<br />
That&#8217;s ok, it&#8217;s part of the Android lifecycle : this robot knows how to get his RAM back  !!!<br />
The thing is, until version 1.4.2, G2Android would not &laquo;&nbsp;remember&nbsp;&raquo; the Gallery cookies, the albums hierarchy, its position in the gallery, etc&#8230; so it forced close.<br />
Now, it uses a SQLite database, to save its context, so before leaving an activity, G2Android saves its context (onPause) and when entering an activity (onResume) it gets the context back.<br />
Next year, some new features will appear, like using the camera directly to send photo, or maybe analyse EXIF metadata ?<br />
If you have some ideas, or if you encounter bugs, <a href="http://code.google.com/p/g2android/issues/list">please feel free to submit an issue in G2Android bugtracker</a> !<br />
And, as we say in such periods, merry Xmas and happy new year ! Using G2Android <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h3><a href="http://code.google.com/p/g2android/">Go to G2Android project page</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/12/23/g2android-v-1-4-2-now-it-is-really-stable/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Comment convertir une mailbox Outlook en mailbox IMAP</title>
		<link>http://blog.dahanne.net/2009/12/23/comment-convertir-une-mailbox-outlook-en-mailbox-imap/</link>
		<comments>http://blog.dahanne.net/2009/12/23/comment-convertir-une-mailbox-outlook-en-mailbox-imap/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 23:21:54 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=328</guid>
		<description><![CDATA[Si chez moi j'ai tout le loisir d'utiliser, pour la mes [...]]]></description>
			<content:encoded><![CDATA[<p>Si chez moi j&#8217;ai tout le loisir d&#8217;utiliser, pour la messagerie par email, des logiciels libres implémentant des standards; dans le cadre du travail, je me suis souvent retrouvé à utiliser un compte Outlook&#8230; (ou pire, Lotus Notes, mais là c&#8217;est un autre sujet&#8230;)<br />
Sauf que le jour où on quitte la société ou la mission (qui vous a équipé d&#8217;Outlook donc), on aimerait bien récupérer ses messages préférés&#8230;<br />
Vous imaginez bien que le format de sauvegarde d&#8217;Outlook est propriétaire, ainsi, il faut ruser pour convertir votre boite aux lettres Outlook au format standard unix &laquo;&nbsp;mailbox&nbsp;&raquo; (format documenté et convertible et exploitable par pléthore d&#8217;outils)<br />
Pour ce faire, il suffit de suivre ces 2 étapes (il faut aussi un compte IMAP tierce) :</p>
<h3>1°)Configurer un compte IMAP dans Outlook</h3>
<p>j&#8217;ai simplement ajouté un compte IMAP existant dans Outlook (Outils-&gt;Comptes de messagerie)<br />
J&#8217;ai ensuite choisi &laquo;&nbsp;Ajouter compte de messagerie&nbsp;&raquo;</p>
<p><a href="http://blog.dahanne.net/wp-content/uploads/comptes_de_messagerie.png"><img class="alignnone size-medium wp-image-332" title="comptes_de_messagerie" src="http://blog.dahanne.net/wp-content/uploads/comptes_de_messagerie-300x228.png" alt="" width="300" height="228" /></a></p>
<p>Puis j&#8217;ai sélectionné IMAP<br />
<a href="http://blog.dahanne.net/wp-content/uploads/imap.png"><img class="alignnone size-medium wp-image-333" title="imap" src="http://blog.dahanne.net/wp-content/uploads/imap-300x229.png" alt="" width="300" height="229" /></a><br />
J&#8217;ai renseigné mon compte IMAP</p>
<p><a href="http://blog.dahanne.net/wp-content/uploads/compte_saisi.png"><img class="alignnone size-medium wp-image-331" title="compte_saisi" src="http://blog.dahanne.net/wp-content/uploads/compte_saisi-300x227.png" alt="" width="300" height="227" /></a></p>
<p>Terminé !</p>
<h3>2°)Déplacez ses messages et répertoires de Outlook vers votre compte IMAP</h3>
<p>Rien de plus simple, il suffit de glisser/déplacer vos messages et répertoires de votre compte Outlook, vers votre compte IMAP !<br />
Par contre, votre serveur IMAP n&#8217;est peut être pas paramétré pour gérer les sous répertoires, dans ce cas là, vous devez modifier la configuration, dans le cas de Dovecot, veuillez faire attention à ce que l&#8217;option namespace_private comporte une définition des séparateurs :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">namespace private <span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #666666; font-style: italic;"># Hierarchy separator to use. You should use the same separator for all</span>
   <span style="color: #666666; font-style: italic;"># namespaces or some clients get confused. '/' is usually a good one.</span>
   <span style="color: #666666; font-style: italic;"># The default however depends on the underlying mail storage format.</span>
  separator = <span style="color: #000000; font-weight: bold;">/</span> 
&nbsp;
   <span style="color: #666666; font-style: italic;"># Prefix required to access this namespace. This needs to be different for</span>
   <span style="color: #666666; font-style: italic;"># all namespaces. For example &quot;Public/&quot;.</span>
   prefix = <span style="color: #ff0000;">&quot;&quot;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># Physical location of the mailbox. This is in same format as</span>
   <span style="color: #666666; font-style: italic;"># mail_location, which is also the default for it.</span>
   <span style="color: #666666; font-style: italic;">#location =</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># There can be only one INBOX, and this setting defines which namespace</span>
   <span style="color: #666666; font-style: italic;"># has it.</span>
   inbox = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># If namespace is hidden, it's not advertised to clients via NAMESPACE</span>
   <span style="color: #666666; font-style: italic;"># extension or shown in LIST replies. This is mostly useful when converting</span>
   <span style="color: #666666; font-style: italic;"># from another server with different namespaces which you want to depricate</span>
   <span style="color: #666666; font-style: italic;"># but still keep working. For example you can create hidden namespaces with</span>
   <span style="color: #666666; font-style: italic;"># prefixes &quot;~/mail/&quot;, &quot;~%u/mail/&quot; and &quot;mail/&quot;.</span>
   <span style="color: #666666; font-style: italic;">#hidden = yes</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>C&#8217;est fini, vous venez de migrer vos données Outlook vers mailbox, le standard de courrier *nix ! (vos emails doivent être sur le votre machine hébergeant le serveur IMAP dans /home/user/mail/votre_sous_rep)</p>
<h3>Références</h3>
<p><a href="http://www.faqs.org/docs/Linux-mini/Outlook-to-Unix-Mailbox.html#s3" target="_blank">http://www.faqs.org/docs/Linux-mini/Outlook-to-Unix-Mailbox.html#s3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/12/23/comment-convertir-une-mailbox-outlook-en-mailbox-imap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Analyse de trames HTTP : les outils</title>
		<link>http://blog.dahanne.net/2009/12/10/analyse-de-trames-http-les-outils/</link>
		<comments>http://blog.dahanne.net/2009/12/10/analyse-de-trames-http-les-outils/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 09:31:01 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=252</guid>
		<description><![CDATA[Régulièrement, je me trouve face au dilemme suivant : [...]]]></description>
			<content:encoded><![CDATA[<p>Régulièrement, je me trouve face au dilemme suivant :  &laquo;&nbsp;Mais qu&#8217;est ce que mon application a bien pu envoyer au serveur ?&nbsp;&raquo;<br />
Il existe des outils pour répondre à cette question , et voici ma sélection :</p>
<ul>
<li><a href="http://www.wireshark.org/">Wireshark </a>(anciennement ethereal) / Linux<br />
Cet outil, c&#8217;est le couteau suisse de l&#8217;analyse réseau; et pas simplement HTTP : il peut analyser les trames TCP, UDP et tout ce qu&#8217;il y a au dessus (HTTP, FTP, SMTP, etc&#8230;)</li>
<li><a href="http://www.pocketsoap.com/tcptrace/">TCPTrace</a> / Windows<br />
Comme son nom l&#8217;indique, il permet d&#8217;analyser les trames TCP : spécifier un port d&#8217;écoute sur votre machine locale, un port de destination, une hôte de destination, configurer votre client HTTP que vous désirez tester; et le tour est joué : tous vos échanges seront loggés !</li>
<li><a href="http://www.rexswain.com/httpview.html">HttpViewer</a> , en ligne<br />
Il ne permet que d&#8217;analyser les trames HTTP, mais son gros avantage c&#8217;est qu&#8217;il n&#8217;y a aucune installation à effectuer, c&#8217;est un outil en ligne !</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/12/10/analyse-de-trames-http-les-outils/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installer PHP 5.3.1 sur Ubuntu Karmic koala 9.10</title>
		<link>http://blog.dahanne.net/2009/11/21/installer-php-5-3-1-sur-ubuntu-karmic-koala-9-10/</link>
		<comments>http://blog.dahanne.net/2009/11/21/installer-php-5-3-1-sur-ubuntu-karmic-koala-9-10/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 15:37:38 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[apache2]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=274</guid>
		<description><![CDATA[J'ai récemment voulu installer sur mon serveur web le  [...]]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai récemment voulu installer sur mon serveur web le <a href="http://trac.openwebreader.org/">(tout nouveau) agrégateur de flux RSS (avec API distante REST) OpenWebReader</a>.<br />
L&#8217;auteur, pour avoir un développement plus aisé et moderne, a choisi la dernière version de PHP, 5.3<br />
Sauf que sur Ubuntu 9.10, la version de PHP packagée est la 5.2.6<br />
En général, dans ces cas, on a plutôt le réflexe de mettre à jour ses dépôts, dans /etc/apt/sources.list et de rajouter le dépôt qui va bien, qui rajoute en l&#8217;occurrence php 5.3.<br />
C&#8217;est bien ce que j&#8217;avais commencé à faire, <a href="http://www.dotdeb.org/2009/07/03/php-5-3-0-final-preview-packages-available-for-debian-lenny/">en suivant ce billet</a>.<br />
Mais malheureusement, plein de dépendances ont sauté : phpmyadmin, apache2-mod-php5, etc&#8230; du coup, machine arrière vers PHP 5.2.6 <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /><br />
Retour aux sources, j&#8217;ai téléchargé sur php.net la version 5.3.1 de PHP</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>us3.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>php-5.3.1.tar.gz<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>this<span style="color: #000000; font-weight: bold;">/</span>mirror</pre></div></div>

<p>, je l&#8217;ai détarré dans mon home directory :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xvfz php-5.3.1.tar.gz</pre></div></div>

<p>et avant de le compiler, je suis allé chercher tout plein de librairies :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2 apache2-mpm-prefork apache2-prefork-dev apache2-utils apache2.2-common mysql-client mysql-client-<span style="color: #000000;">5.1</span> mysql-common mysql-server mysql-server-<span style="color: #000000;">5.1</span> mysql-server-core-<span style="color: #000000;">5.1</span> libtidy-dev curl libcurl4-openssl-dev libcurl3 libcurl3-gnutls zlib1g zlib1g-dev libxslt1-dev libzip-dev libzip1 libxml2 libsnmp-base libsnmp15 libxml2-dev libsnmp-dev libjpeg62 libjpeg62-dev libpng12-<span style="color: #000000;">0</span> libpng12-dev zlib1g zlib1g-dev libfreetype6 libfreetype6-dev libbz2-dev libxpm4-dev libmcrypt-dev libmcrypt4 libicu-dev</pre></div></div>

<p>et là, dans mon répertoire de php 5.3.1 , j&#8217;ai pu compiler :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span>  php-5.3.1
$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-apxs2</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>apxs2 <span style="color: #660033;">--with-mysql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-mysqli</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql_config <span style="color: #660033;">--with-tidy</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-curl</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin <span style="color: #660033;">--with-curlwrappers</span> <span style="color: #660033;">--with-openssl-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-zlib-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-mbstring</span> <span style="color: #660033;">--with-pdo-pgsql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-pdo-mysql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-xsl</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-ldap</span> <span style="color: #660033;">--with-xmlrpc</span> <span style="color: #660033;">--with-iconv-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-snmp</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-exif</span> <span style="color: #660033;">--enable-calendar</span> <span style="color: #660033;">--with-bz2</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-mcrypt</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-gd</span> <span style="color: #660033;">--with-jpeg-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-png-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-zlib-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-freetype-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-mbstring</span> <span style="color: #660033;">--enable-zip</span> <span style="color: #660033;">--with-pear</span> <span style="color: #660033;">--enable-intl</span> <span style="color: #660033;">--with-gettext</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">gettext</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

<p>Si vous avez un problème lors du configure c&#8217;est qu&#8217;il vous manque une librairie&#8230;<br />
Ensuite, maintenant que l&#8217;on a une version de Php 5.3.1 compilé, il faut la référencer à Apache2, et pour ne rien casser aux dépendances, on trafique juste une petit peu /etc/apache2/mods-available/php5.load :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LoadModule php5_module <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>anthony<span style="color: #000000; font-weight: bold;">/</span>php-5.3.1<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>libphp5.so</pre></div></div>

<p>et là, le tour est joué, il suffit de redémarrer Apache2 pour que Php 5.3.1 soit chargé.<br />
En fait, je me suis beaucoup inspiré de<a href="http://www.brandonsavage.net/installing-php-5-3-on-ubuntu/"> ce billet</a>, sauf qu&#8217;à la fin, je vous conseille de ne pas faire le make install, car votre système risque de ne plus être en cohérence avec les dépots</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/11/21/installer-php-5-3-1-sur-ubuntu-karmic-koala-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>G2Android version 1.3.0 : cache and full screen navigation</title>
		<link>http://blog.dahanne.net/2009/10/27/g2android-version-1-3-0-cache-and-full-screen-navigatio/</link>
		<comments>http://blog.dahanne.net/2009/10/27/g2android-version-1-3-0-cache-and-full-screen-navigatio/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 15:22:35 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=267</guid>
		<description><![CDATA[Here is the new stable release of G2Android, your favor [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the new stable release of<a href="http://code.google.com/p/g2android/"> G2Android, your favorite Gallery2 application for Android</a>, and great new features are now available :</p>
<ul>
<li>new cache feature </li>
<li>fullscreen navigation with gestures </li>
<li>download full res. picture to sdcard</li>
</ul>
<p>As always, you can get more info going to the project web page : <a href="http://code.google.com/p/g2android/">http://code.google.com/p/g2android/</a>, and <a href="http://code.google.com/p/g2android/downloads/list">even download the new version</a><br />
So what&#8217;s next ? tweeting and sending email with photo url, shortcuts for full screen navigation, synchronization between views&#8230; well, expect a new version by the end of November !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/10/27/g2android-version-1-3-0-cache-and-full-screen-navigatio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>G2Android version 1.2.1 : bug fixes</title>
		<link>http://blog.dahanne.net/2009/10/15/g2android-version-1-2-1-bug-fixes/</link>
		<comments>http://blog.dahanne.net/2009/10/15/g2android-version-1-2-1-bug-fixes/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 20:51:09 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=262</guid>
		<description><![CDATA[You can now download the last G2Android update, version [...]]]></description>
			<content:encoded><![CDATA[<p>You can now download the last <a title="G2Android download page" href="http://code.google.com/p/g2android/downloads/list">G2Android update, version 1.2.1</a>.<br />
What&#8217;s new ?</p>
<ul>
<li> No more automatic connection at startup, the user has to push a button to connect to the gallery</li>
</ul>
<ul>
<li> Galleries with port different than 80 now work</li>
</ul>
<ul>
<li> I18n : the app now provide new languages, today only <a title="G2Android english strings file" href="http://code.google.com/p/g2android/source/browse/trunk/g2android/res/values/strings.xml">english</a> and <a title="G2Android french strings file" href="http://code.google.com/p/g2android/source/browse/trunk/g2android/res/values-fr/strings.xml">french</a> are supported, I&#8217;m expecting the community to provide new translations</li>
</ul>
<p>That&#8217;s all folks, expect better UIs and possibility to download pictures from the gallery to the phone soon.<br />
Have fun browsing your galleries !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/10/15/g2android-version-1-2-1-bug-fixes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Effacer de manière sécurisée les données d&#8217;un disque dur</title>
		<link>http://blog.dahanne.net/2009/10/14/effacer-de-maniere-securisee-les-donnees-dun-disque-dur/</link>
		<comments>http://blog.dahanne.net/2009/10/14/effacer-de-maniere-securisee-les-donnees-dun-disque-dur/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 20:06:03 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=256</guid>
		<description><![CDATA[Envie d'effacer toutes les données d'un disque dur ava [...]]]></description>
			<content:encoded><![CDATA[<p>Envie d&#8217;effacer toutes les données d&#8217;un disque dur avant de le revendre ?<br />
Envie d&#8217;effacer toutes vos données personnelles qui se situe dans un répertoire en particulier (sous windows), sans formater tout le disque ?<br />
Suivez le guide !</p>
<h3>Effacer de manière sécurisée toutes les partitions d&#8217;un volume</h3>
<p>Vous vous apprétez à vendre ou à donner votre vieil ordinateur, et vous ne voulez pas que l&#8217;ensemble de vos documents privés se retrouvent sur internet ?</p>
<p>Dans ce cas, il ne suffit pas d&#8217;effacer vos fichiers via l&#8217;OS (ce qui ne les efface que de la table de registres du disque), ni de formater la partition (un logiciel de &laquo;&nbsp;recovery&nbsp;&raquo; serait capable de la reconstituer); ce qu&#8217;il vous faut, c&#8217;est réécrire plusieurs fois, avec des algorithmes éprouvés, des données aléatoires sur l&#8217;ensemble du disque.</p>
<p>Il existe pour cela pléthores d&#8217;outils payants (et qui n&#8217;ont pas l&#8217;air d&#8217;avoir la côte), et il existe <a title="dban" href="http://www.dban.org/">DBAN</a>, outil GPL de choix.</p>
<p><a title="dban" href="http://www.dban.org/">DBAN (Darik&#8217;s boot and Nuke)</a> est un logiciel libre, redoutablement efficace, qui, même s&#8217;il n&#8217;est plus maintenu depuis 2007, vous propose plusieurs algos pour effacer votre disque de manière sécurisée (réécrire 1 fois dessus -&gt; +rapide; 3 passes avec algo conforme au Department Of Defense américain -&gt; +long)</p>
<p>Ce logiciel s&#8217;installe sur une clef USB, ou un CD-R, ou une disquette; bootez dessus (branchez auparavant sur votre ordinateur les périphériques que vous souhaitez effacer), tapez &laquo;&nbsp;autonuke&nbsp;&raquo; à l&#8217;invite de commandes, patientez, et c&#8217;est réglé !</p>
<p>Vous voulez en avoir le coeur net ? être sûr que DBAN a bien fait son travail ?</p>
<p>On peut faire une vérification sommaire, en tentant de retrouver des partitions sur le disque avec l&#8217;outil <a title="TestDisk" href="http://www.cgsecurity.org/wiki/TestDisk">Testdisk</a>, en GPL sous Linux/Windows/MacOs (etc..); le résultat est sans appel : après analyse complète du disque à la recherche de la moindre partition :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">TestDisk <span style="color: #000000;">6.10</span>, Data Recovery Utility, July <span style="color: #000000;">2008</span>
Christophe GRENIER <span style="color: #000000; font-weight: bold;">&amp;</span>lt;grenier<span style="color: #000000; font-weight: bold;">@</span>cgsecurity.org<span style="color: #000000; font-weight: bold;">&amp;</span>gt;
http:<span style="color: #000000; font-weight: bold;">//</span>www.cgsecurity.org
&nbsp;
Disk <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdc - <span style="color: #000000;">81</span> GB <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000;">76</span> GiB - CHS <span style="color: #000000;">9965</span> <span style="color: #000000;">255</span> <span style="color: #000000;">63</span>
&nbsp;
Partition                  Start        End    Size <span style="color: #000000; font-weight: bold;">in</span> sectors
&nbsp;
No partition found or selected <span style="color: #000000; font-weight: bold;">for</span> recovery</pre></div></div>

<h3>Effacer vos données personnelles d&#8217;un répertoire</h3>
<p>Vous utilisez régulièrement un ordinateur au bureau, vous y avez stocké des documents confidentiels, et vous vous apprétez à ne plus utiliser ce poste de travail ?</p>
<p>Vous pouvez alors utiliser <a title="Eraser" href="http://eraser.heidi.ie/">Eraser</a>, encore un logiciel libre sous GPL (mais malheureusement que pour Windows), qui appliquera les mêmes algorithmes de suppression que DBAN, mais dans des répertoires au choix, et non pas un volume entier; Eraser est facile à utiliser (version portable, pas besoin d&#8217;être admin pour s&#8217;en servir), et est encore maintenu à ce jour</p>
<h3>Références :</h3>
<p><a href="http://www.webopedia.com/DidYouKnow/Computer_Science/2007/completely_erase_harddrive.asp">http://www.webopedia.com/DidYouKnow/Computer_Science/2007/completely_erase_harddrive.asp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/10/14/effacer-de-maniere-securisee-les-donnees-dun-disque-dur/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>G2Android version 1.2.0 : photos upload and albums creation !</title>
		<link>http://blog.dahanne.net/2009/08/29/g2android-version-1-2-0-photos-upload-and-albums-creation/</link>
		<comments>http://blog.dahanne.net/2009/08/29/g2android-version-1-2-0-photos-upload-and-albums-creation/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 01:33:12 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=241</guid>
		<description><![CDATA[I'm writing this small post just to indicate that the n [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing this small post just to indicate that the new version of the open source <a href="http://gallery2.menalto.com">Gallery2</a> client for the android platform, <a href="http://code.google.com/p/g2android/">G2Android</a>, is out !</p>
<p>Now, you can still see your albums and pictures, but you can also :</p>
<ul>
<li>upload photos</li>
<li>create new albums</li>
</ul>
<p>The ergonomy is not yet perfect, as you may have already noticed, even though almost everything is multi threaded (using AsyncTask), meaning the ui won&#8217;t freeze anymore; the next features will probably will allow the user to insert a photo to his gallery from every picture context on the android platform (declaring a &laquo;&nbsp;share image&nbsp;&raquo; intent)</p>
<p>Stay tuned !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/08/29/g2android-version-1-2-0-photos-upload-and-albums-creation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>G2Android : a gallery2 client for the android platform</title>
		<link>http://blog.dahanne.net/2009/08/16/g2android-a-gallery2-client-for-the-android-platform/</link>
		<comments>http://blog.dahanne.net/2009/08/16/g2android-a-gallery2-client-for-the-android-platform/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 14:58:31 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=225</guid>
		<description><![CDATA[I recently started a new open source project : G2Androi [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started a new open source project : <a title="G2android : a gallery2 client for Android" href="http://code.google.com/p/g2android">G2Android</a>, for the android platform, and mainly for 3 reasons :</p>
<ul>
<li>The main reason I Started this project was because there isn&#8217;t yet any <a title="Gallery2 project page" href="http://gallery2.menalto.com" target="_blank">gallery2</a> clients for the android platform and I needed one to access my galleries where I share photos with my family and friends</li>
</ul>
<p>Gallery2 is an open source project to easily share your photos with your friends and family : you can install it on Php/MySql enabled server : be it a shared server or dedicates server; Gallery2 is maybe the most popular project in this category ! (I know, Picasa and FlickR exist but&#8230; I&#8217;m not the kind of guy to upload 7 Gb of photos to companies I don&#8217;t know and I don&#8217;t trust&#8230;)</p>
<p>Well, there&#8217;s a client for uploading photos to a gallery2, picpush, but it&#8217;s not open source and it&#8217;s loaded with ads&#8230; And you can&#8217;t browse photos&#8230;</p>
<ul>
<li>I wanted to start a new Android project, to know better this platform !</li>
<li>Iwanted to compete on the <a title="ADC" href="http://code.google.com/android/adc/" target="_blank">ADC (Android Developer Challenge) 2009</a> : given the current features, I&#8217;m not sure I have a chance to win the competition, but, hey, the important is to particpate as we isay !</li>
</ul>
<p>As of version 1.0, G2Android can browse albums and pictures, for more details, you can check out the <a title="G2Android Features" href="http://code.google.com/p/g2android/wiki/SupportedFeatures" target="_blank">Features page of G2Android</a></p>
<p>Version 1.1, which will be out soon, will allow you to browse private galleries, ie gallery2 installations which need a password.</p>
<p>The project is open source, GPL v.2, so you want to join in, feel free to contact me !</p>
<p>Finally, you can download G2Android from the Android Market : just type &laquo;&nbsp;G2Android&nbsp;&raquo; in your search or <a title="G2Android on the Android market" href="market://search?q=pname:net.dahanne.android.g2android">simply click on this link if you&#8217;re browsing this page with an Android device</a> .</p>
<p>You can also <a title="Download G2Android" href="http://code.google.com/p/g2android/downloads/list" target="_blank">download it directly from the G2Android Google code site.</a></p>
<p>Have fun with it, and feel free to <a title="G2Android bug tracker" href="http://code.google.com/p/g2android/issues/list" target="_blank">submit new issues on the bugtracker</a> if you encounter a bug !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/08/16/g2android-a-gallery2-client-for-the-android-platform/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Eclipse Galileo 3.5 : problèmes de connexion à travers un proxy&#8230;</title>
		<link>http://blog.dahanne.net/2009/07/01/eclipse-galileo-3-5-problemes_proxy/</link>
		<comments>http://blog.dahanne.net/2009/07/01/eclipse-galileo-3-5-problemes_proxy/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 09:10:17 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=175</guid>
		<description><![CDATA[En installant Eclipse Galileo, sur un poste de travail  [...]]]></description>
			<content:encoded><![CDATA[<p>En installant Eclipse Galileo, sur un poste de travail en entreprise (donc utilisant derrière un proxy pour l&#8217;accès à internet) j&#8217;ai rencontré quelques problèmes pour me connecter aux update sites (via Help -&gt; install new software&#8230;).<br />
En fait, même en ayant bien régler les coordonnées du proxy dans Window -&gt; Preferences -&gt; general-&gt;network connections , dès que j&#8217;essayais d&#8217;installer des plugins via l&#8217;update manager, j&#8217;avais l&#8217;erreur suivante : (à peu près) :<br />
<code>!ENTRY org.eclipse.core.net 1 0 2009-04-16 18:12:18.427<br />
!MESSAGE System property socksProxyPort is not set but should be .<br />
</code><br />
Pas génial&#8230;<br />
EN fait, le bug est référencé sur cette page :</p>
<p>https://bugs.eclipse.org/bugs/show_bug.cgi?id=281472#c7</p>
<p>et en particulier, le moyen de contournement, à savoir ne pas utiliser Apache HTTPClient pour se connecter au réseau se trouve sur cette page :</p>
<p>http://wiki.eclipse.org/ECF_Filetransfer_Support_for_NTLMv2_Proxies</p>
<p>Il suffit de modifier son eclipse.ini et rajouter les valeurs suivantes :</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">org.eclipse.ecf.provider.filetransfer.httpclient</span>
-Dhttp.proxyPort<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">8080</span>
-Dhttp.proxyHost<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">myproxy</span>
-Dhttp.proxyUser<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">mydomain\myusername</span>
-Dhttp.proxyPassword<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">mypassword</span>
-Dhttp.nonProxyHosts<span style="color: #000066; font-weight:bold;">=</span><span style="color: #000066; font-weight:bold;"><span style="color: #660066;">localhost|127.0.0.1</span></span></pre></div></div>

<p>Vous n&#8217;etes pas obligés de rajouter un utilisateur/mot de passe si votre proxy n&#8217;en a pas besoin.<br />
<strong>Attention ! bien placer ces propriétés juste en dessous de -vmargs !</strong><br />
Ainsi, au prochain redémarrage, vous aurez accès aux update sites eclipse à travers votre proxy (malgré 1 message d&#8217;erreur la première fois !)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/07/01/eclipse-galileo-3-5-problemes_proxy/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Premiere application android déployée sur mon HTC Dream (G1)</title>
		<link>http://blog.dahanne.net/2009/03/22/premiere-application-android-deployee-sur-mon-htc-dream-g1/</link>
		<comments>http://blog.dahanne.net/2009/03/22/premiere-application-android-deployee-sur-mon-htc-dream-g1/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 16:02:04 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=120</guid>
		<description><![CDATA[Depuis le temps que je l'attendais !
Sorti le jour de  [...]]]></description>
			<content:encoded><![CDATA[<p>Depuis le temps que je l&#8217;attendais !<br />
Sorti le jour de mon anniversaire (12 Mars) chez Orange France, le HTC Dream (ou G1) est motorisé par l&#8217;OS open source Android, démarré par Google il y a presque 3 ans.<br />
Et oui, il y a désormais une alternative aux mondes cloisonnés sur portable comme Iphone ou Windows Mobile, une alternative aussi aux limitations de J2ME : Android est arrivé !</p>
<h3>Ecriture de ma première application Android</h3>
<h4>Ce qu&#8217;il faut sur le poste de développement : </h4>
<p>De retour de vacances, je me dirige sur http://developer.android.com/sdk/1.1_r1/installing.html où je découvre que dans eclipse je peux installer le plugin de développement ADT, qui, une fois connectée au SDK installée sur ma machine (sous windows pour commencer <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  ) me permet d&#8217;intéragir plus facilement avec ce SDK.<br />
En résumé il vous faut :</p>
<ul>
<li>Eclipse 3.4 avec une JRE 6</li>
<li>Le plugin ADT téléchargé via le &laquo;&nbsp;Software updates&nbsp;&raquo; d&#8217;Eclipse</li>
<li>Le SDK Android</li>
</ul>
<h4>Ecriture du Hello Android : première application Android</h4>
<p>Google fournit un tutorial très bien fait qui permet de se familiariser avec le concept d&#8217;activité et de création de vues via des fichiers XML (çà me rappelle une mission çà &#8230;), à l&#8217;adresse : http://developer.android.com/guide/tutorials/hello-world.html<br />
Oups !  quand on (contrôle) clique sur du code Android (comme Activity.class par exemple), on se rend compte que les source sne sont pas fournies ! Plutôt dur à digérer quand on a l&#8217;habitude d&#8217;avoir les sources des frameworks que l&#8217;on utilise et que l&#8217;on sait qu&#8217;Android est un produit Open Source ! Heureusement, <a href="http://code.google.com/p/android/issues/detail?id=979">le &laquo;&nbsp;bug&nbsp;&raquo; est signalé</a> et en supprimant la librairie Android (android.jar) dans le projet Eclipse et en la ré important en précisant le chemin du code source  (<a href="http://drupalmodules.com/sources.zip ">téléchargeable ici</a>), on a accès au code source du framework !<br />
On lance un &laquo;&nbsp;Run&nbsp;&raquo; et on a le plaisir de voir l&#8217;application se lancer dans l&#8217;émulateur d&#8217;Android !</p>
<h4>Déploiement de l&#8217;application Android sur le HTC Dream</h4>
<p>Il faut tout d&#8217;abord <a href="http://dl.google.com/android/android_usb_windows.zip">télécharger et installer les drivers USB sur votre poste de développement</a>.<br />
Pour installer les pilotes, dézippez les dans le répertoire de votre choix, et connectez en USB votre téléphone (en ayant pris soin au préalable de le mettre en mode Debug USB dans Parametres -> Applications -> Développement); Windows va détecter votre téléphone et vous demandez d&#8217;installer les pilotes.<br />
On y est presque !<br />
Il n&#8217;y a plus qu&#8217;à déployer l&#8217;application, pour cela, retournez dans Eclipse, dans votre &laquo;&nbsp;Run Configuration&#8230;&nbsp;&raquo; qui lance votre application Android dans l&#8217;émulateur, sélectionner dans &laquo;&nbsp;Target&nbsp;&raquo; Selection &laquo;&nbsp;Manual&nbsp;&raquo;, cliquez sur &laquo;&nbsp;Run&nbsp;&raquo; un dialogue apparaît, sélectionnez votre téléphone, et regardez votre application se lancer sur votre téléphone portable toujours connecté en USB bien sûr !<br />
Maintenant, laissez place à votre imagination et codez !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/03/22/premiere-application-android-deployee-sur-mon-htc-dream-g1/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>RailsCampParis 2 : le rendez vous de la communauté Ruby et Rails</title>
		<link>http://blog.dahanne.net/2009/03/07/railscampparis-2-le-rendez-vous-de-la-communaute-ruby-et-rails/</link>
		<comments>http://blog.dahanne.net/2009/03/07/railscampparis-2-le-rendez-vous-de-la-communaute-ruby-et-rails/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 19:56:51 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[meeting]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=110</guid>
		<description><![CDATA[Samedi 7 Mars avait lieu la 2ème édition du RailsCamp [...]]]></description>
			<content:encoded><![CDATA[<p>Samedi 7 Mars avait lieu la 2ème édition du RailsCampParis, cette fois ci dans les locaux de Sun, avenue de Iéna (souvenez l&#8217;an dernier c&#8217;était à <a href="http://lacantine.org">La Cantine</a>)<br />
Une bonne soixantaine de personnes était présente pour le démarrage de cette journée, à 10h30; l&#8217;accueil était très bien rodé, avec contrôle de l&#8217;identité des visiteurs, attribution d&#8217;un autocollant avec nom/prénom tags, pour faciliter les échanges entre participants, et café / petit déj copieux <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Après une bref intro et la présentation des sponsors, les personnes présentes se sont présentées, avec 3 tags (j&#8217;avais choisi JRuby, Rails, TDD)<br />
Dispersé sur 8 salles, les sujets ont commencé à émerger : beaucoup de merb, un peu de TDD/BDD, de la perf, de la scalabilité, bref, la journée s&#8217;annonce bien !<br />
Je me suis rendu aux sessions : </p>
<h3>&laquo;&nbsp;plugins préférés dans Rails&nbsp;&raquo;</h3>
<p> , les participants ont alors évoqué leurs plugins rails préférés et leurs utilisations ; on retiendra <a href="http://github.com/technoweenie/attachment_fu/tree/master">attachment_fu : pour l&#8217;upload des fichiers</a> ou encore <a href="http://thoughtbot.com/projects/paperclip">PaperClip</a>, Restful Authentification pour l&#8217;authentification.<br />
Quand aux plugins de test, en remplacement on retrouve RSpec, utilisé conjointement avec factory girl et shoulda (autre syntaxe que celle de RSpec de base); TestUnit peut s&#8217;utiliser avec Machinist, shoulda et faker (?)<br />
Bien entendu, Cucumber a été évoqué, car RSpec reste finalement trop technique pour un fonctionnel.<br />
Un petit retour sur <a href="http://github.com/thoughtbot/factory_girl/tree/master">Factory Girl</a> a été fait : factory girl permet de remplacer intelligemment les fixtures en YAML par des bouts de code (en Ruby); on utilise factory girls pour créer les objets à tester; que l&#8217;on persiste ou non (du coup un mock) dans la base&#8230; très intéressant ! </p>
<h3>présentation de Merb (par <a href="http://blog.shingara.fr/railscampparis-2-jy-etais-et-cetait-sympa.html">Cyril Mougel</a>)</h3>
<ul>
<li>ORM agnostique (Active Record, Data Mapper, etc&#8230;),</li>
<li>Javascript agnostique (JQuery, MooTools, etc&#8230;)</li>
<li>Comme Rails 2.2, compatible Rack</li>
<li>3 briques : merb-core, merb-more (le reste d&#8217;ActionPack), merb-plugins (ne sort pas simultanément avec les 2 autres, paquets de communication avec d&#8217;autres briques comme ActiveRecord, etc..)</li>
<li>mot clef &laquo;&nbsp;provides&nbsp;&raquo; permet de stipuler les formats de rendu des vue (.xml, .html, .json, etc..à plutot que &laquo;&nbsp;format=&nbsp;&raquo; en Rails</li>
<li>merb slices : déploiement d&#8217;une unique fonctionnalité (route au final) de l&#8217;application</li>
<h3>présentation de rails 3.0</h3>
<p><a href="http://yeastymobs.com">Nicolas Mérouze</a> est d&#8217;abord revenu sur un historique des fonctionnalités apparues dans rails et merb au cours des versions, pour en arriver au futur Rails 3; puis a exposé la vision des &laquo;&nbsp;poupées russes&nbsp;&raquo;, qui rappelait beaucoup certains concepts SOA de réutilisation du métier, des modèles à travers des services de plus haut niveau&#8230;<br />
Après avoir introduit <ah ref="http://adva-cms.org/">adva-cms (devenu adva-community)</a>, il a présenté son projet : Russian Dolls (vieux de 1 jour!), un plugin de Merb</p>
<p>Enfin, je me suis rendu à la table ronde Rack, où les différents participants ont évoqué ce qu&#8217;est Rack : une application &laquo;&nbsp;middleware&nbsp;&raquo; entre le serveur web et le framework Ruby. Pourquoi utiliser Rack ? par exemple pour gérer les routes en Ruby plutôt que dans un virtual host Apache (ainsi que que les accès à la page 404 ou autres); et ainsi garder la même conf quelque soit le serveur web en frontal, pratique aussi si on a  pas les droits sur la conf Apache ! Aussi, Rack permet de faire du routing entre différentes applications web Ruby.</p>
<p>Après j&#8217;ai dû partir, dommage, une session devait aborder en plus approfondi le thème des tests en Ruby&#8230; En tout cas l&#8217;organisation était parfaite, le &laquo;&nbsp;timeboxing&nbsp;&raquo; de 1h pour chaque session se prêtait très bien à l&#8217;événement, les pizzas, les boissons, les croissants, le tee shirt, vraiment, une excellente organisation ! J&#8217;ai de plus le sentiment que la communauté Rails se préoccupe de plus en plus de la qualité, les débats (ou trolls!) entre TestUnit et RSpec prouvent que les développeurs Rubyistes en  sont soucieux  et c&#8217;est tant mieux !!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/03/07/railscampparis-2-le-rendez-vous-de-la-communaute-ruby-et-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GiveMeYourEmail : a new dokuwiki plugin</title>
		<link>http://blog.dahanne.net/2009/01/01/givemeyouremail-dokuwiki-plugin/</link>
		<comments>http://blog.dahanne.net/2009/01/01/givemeyouremail-dokuwiki-plugin/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 15:05:28 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[dokuwiki]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=85</guid>
		<description><![CDATA[New version available ! Download GiveMeYourEmail 1.1 no [...]]]></description>
			<content:encoded><![CDATA[<h4><a href="http://www.dokuwiki.org/plugin:givemeyouremail">New version available !</a> <a href="http://blog.dahanne.net/wp-content/uploads/givemeyouremail11.zip">Download GiveMeYourEmail 1.1 now !</a></h4>
<p>I&#8217;m currently using dokuwiki for a community website, and even though the<a href="http://dokuwiki.org"> dokuwiki community</a> is strong, with<a href="http://dokuwiki.org/plugins"> plenty of plugins available</a>, I couldn&#8217;t find a plugin that would let any visitors to give their email address; so that I can collect these addresses in a file and keep my visitors aware of any event&#8230;<br />
Well, I just wrote this plugin :  GiveMeYourEmail , to fill this gap ! (under the GPL v2 licence)<br />
Oh, by the way, happy new year !  <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<ul>
<li><a href='http://blog.dahanne.net/wp-content/uploads/givemeyouremail.zip'>Download GiveMeYOurEMail Dokuwiki plugin</a></li>
<li><a href='http://www.dokuwiki.org/plugin:givemeyouremail'>GiveMeYourEmail page at dokuwiki.org</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/01/01/givemeyouremail-dokuwiki-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Afterwork GWT du 17 Décembre 2008 chez Valtech</title>
		<link>http://blog.dahanne.net/2008/12/25/afterwork-gwt-du-17-decembre-2008-chez-valtech/</link>
		<comments>http://blog.dahanne.net/2008/12/25/afterwork-gwt-du-17-decembre-2008-chez-valtech/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 09:52:10 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[meeting]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=80</guid>
		<description><![CDATA[La semaine dernière, avec Pascal, nous présentions un [...]]]></description>
			<content:encoded><![CDATA[<p>La semaine dernière, avec Pascal, nous présentions une seconde fois l&#8217;after work GWT (<a href="http://blog.valtech.fr/wordpress/2008/11/30/presentation-de-gwt-a-lafterwork-du-25-novembre-2008/">voir le post précédent</a> pour le 1er afterwork).</p>
<p>Si vous n&#8217;êtes pas très saumon fumé ni champagne, mais plutôt Eclipse et Widget, je vous propose de réveillonner avec notre présentation mise à jour, ainsi que les workspaces d&#8217;execices et de correction ! <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Ces workspaces sont utilisables sous windows (avec un JDK 5 minimum).</p>
<p>Pour n&#8217;avoir aucun problème, vous devrez installer gwt et gwtext  C:\dev, selon l&#8217;arborescence suivante (des chemins en dur sont présents dans les .launch entre autres) :</p>
<p><code>C:\dev\gwt\gwt-windows-1.5.3</code></p>
<p><code>C:\dev\gwt\gwtext-2.0.5</code></p>
<p>Pour Linux et MacOsX, le mieux est de récupérer les projets et de corriger les chemins de lancement (.launch).</p>
<p>Le succès était encore une fois au rendez vous, je remercie encore l&#8217;organisation côté Valtech Technology Consulting et côté Valtech Training !</p>
<p>Joyeux Noël à tous !</p>
<ul>
<li><a title="Présentation AfterWork GWT" href="http://blog.dahanne.net/wp-content/uploads/cours_du_soir_gwt_maj_15_12_2008.ppt">Présentation AfterWork GWT</a></li>
<li><a href="http://blog.dahanne.net/wp-content/uploads/workspaces_afterwork_gwt.zip">Workspace AfterWork GWT</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2008/12/25/afterwork-gwt-du-17-decembre-2008-chez-valtech/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cours du soir JRuby</title>
		<link>http://blog.dahanne.net/2008/10/30/cours-du-soir-jruby/</link>
		<comments>http://blog.dahanne.net/2008/10/30/cours-du-soir-jruby/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 22:28:38 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[meeting]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=60</guid>
		<description><![CDATA[Ce Mardi 28 Octobre, dans le cadre des cours du soir de [...]]]></description>
			<content:encoded><![CDATA[<p>Ce Mardi 28 Octobre, dans le cadre des cours du soir de <a href="http://planet.valtech.fr">Valtech</a>, j&#8217;ai présenté une démonstration de la librairie open source JRuby, implémentation 100% Java de Ruby.<br />
A l&#8217;aide de travaux pratiques, avec les 7 participants présents, nous avons pu :</p>
<ul>
<li>  faire un bref rappel du langage Ruby (pendant 1H20 : définition de classe, héritage, module, mixin)</li>
<li>découvrir Jirb, shell permettant de découvrir les classes Ruby et Java (dans un jar)</li>
<li>utiliser des classes Java avec du code Ruby</li>
<li>découvrir Netbeans 6.1, notamment ses facultés &laquo;&nbsp;Ruby&nbsp;&raquo;</li>
<li>en 30 minutes, créer un projet Ruby On Rails, avec 2 modèles, création en scaffold des triplets MVC</li>
<li>déployer cette application Ruby on Rails, (grâce aux taches rake de Netbeans qui permettent de créer un war à partir d&#8217;un projet RoR) sur un conteneur de servlets, Tomcat en l&#8217;occurence</li>
</ul>
<p>Vous pouvez télécharger, à condition de respecter la licence ci dessous, les tps zippés ainsi que la présentation, au format OpenDocument (à lire avec <a href="http://fr.openoffice.org">OpenOffice</a>), ou pdf; vous pouvez aussi choisir de juste consulter la présentation avec l&#8217;applet flash ci dessous.</p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="CoursDuSoirJRuby" ALIGN=""><br />
<PARAM NAME=movie VALUE="http://blog.dahanne.net/wp-content/uploads/jruby.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#333399> <EMBED src="http://blog.dahanne.net/wp-content/uploads/jruby.swf" quality=high bgcolor=#333399 WIDTH="480" HEIGHT="360" NAME="CoursDuSoirJRuby" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT> </p>
<ul>
<li>
<a href='http://blog.dahanne.net/wp-content/uploads/tps.zip'>TPs JRuby à télécharger</a></li>
<li><a href='http://blog.dahanne.net/wp-content/uploads/jruby.odp'>Présentation cours du soir JRuby, au format OpenDocument</a></li>
<li><a href='http://blog.dahanne.net/wp-content/uploads/jruby.pdf'>Présentation du cours JRuby, au format pdf</a></li>
</ul>
<p><strong><br />
Prochain rendez vous Ruby/Rails à <a href="http://paris.onrails.info/">Paris On Rails</a> !<br />
</strong></p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/fr/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.0/fr/88x31.png" /></a><br /><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">Cours du soir JRuby</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://blog.dahanne.net" property="cc:attributionName" rel="cc:attributionURL">Anthony Dahanne</a> est mis &#224; disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/fr/">licence Creative Commons Paternit&#233;-Pas d&#8217;Utilisation Commerciale-Partage des Conditions Initiales &#224; l&#8217;Identique 2.0 France</a>.<br />Bas&#233;(e) sur une oeuvre &#224;<br />Les autorisations au-del&#224; du champ de cette licence peuvent &#234;tre obtenues &#224; <a xmlns:cc="http://creativecommons.org/ns#" href="http://blog.dahanne.net" rel="cc:morePermissions">http://blog.dahanne.net</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2008/10/30/cours-du-soir-jruby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Présentation en cours du soir de GWT : les docs !</title>
		<link>http://blog.dahanne.net/2008/06/17/presentation-en-cours-du-soir-de-gwt-les-docs/</link>
		<comments>http://blog.dahanne.net/2008/06/17/presentation-en-cours-du-soir-de-gwt-les-docs/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 21:41:17 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=36</guid>
		<description><![CDATA[Il ya de celà un mois, j'ai présenté à mes camarade [...]]]></description>
			<content:encoded><![CDATA[<p>Il ya de celà un mois, j&#8217;ai présenté à mes camarades de Valtech le framework GWT (Google Web Toolikt); après avoir suivi une formation dessus chez Valtech Training (dispensée par <a href="http://www.samijaber.com">Sami Jaber</a>).<br />
Je vous invite à télécharger cette présentation,(certes largement inspirée de celle de Sami) où vous découvrirez :<br />
    *  présentation de GWT<br />
    * mise en place d&#8217;un environnement de développement GWT, création du workspace<br />
    * (TP) votre premier module GWT, &laquo;&nbsp;Salut Monde&nbsp;&raquo; !<br />
    * (TP) présentation d&#8217;une dizaine de widgets GWT (non exhaustif) à travers des manipulations (Label, TextBox, SuggestBox, etc&#8230;)<br />
    * (TP) les panels dans GWT<br />
    * présentation d&#8217;extensions GWT (GXT, GWT Ext, etc&#8230;)<br />
    * (TP) création d&#8217;un widget<br />
    * (TP) appels distants via RPC : notre application GWT se connecte à une servlet de services</p>
<p>Vous n&#8217;oublierez pas de télécharger aussi l&#8217;archive contenant les TPs en fin d&#8217;article !<br />
Bon GWT !</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/fr/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.0/fr/88x31.png"/></a><br/><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">Pr&#233;sentation GWT Valtech</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://blog.dahanne.net" property="cc:attributionName" rel="cc:attributionURL">Anthony Dahanne</a> est mis &#224; disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/fr/">licence Creative Commons Paternit&#233;-Pas d&#8217;Utilisation Commerciale-Partage des Conditions Initiales &#224; l&#8217;Identique 2.0 France</a>.<br/></p>
<p><a href='http://blog.dahanne.net/wp-content/uploads/workspace_gwt.zip'>workspace_gwt</a></p>
<p><a href='http://blog.dahanne.net/wp-content/uploads/cours_du_soir_gwt.ppt'>cours_du_soir_gwt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2008/06/17/presentation-en-cours-du-soir-de-gwt-les-docs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diffusez vos vidéos HD en H264 sur le web !</title>
		<link>http://blog.dahanne.net/2008/03/20/diffusez-vos-videos-hd-en-h264-sur-le-web/</link>
		<comments>http://blog.dahanne.net/2008/03/20/diffusez-vos-videos-hd-en-h264-sur-le-web/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 22:58:36 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[montage video]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/2008/03/20/diffusez-vos-videos-hd-en-h264-sur-le-web/</guid>
		<description><![CDATA[Depuis la version 9 (update 3) de flash, le plugin prop [...]]]></description>
			<content:encoded><![CDATA[<p>Depuis la version 9 (update 3) de flash, le plugin propriétaire présent sur 98% des navigateurs internet, il est possible de lire des fichiers vidéos non plus seulement au format maison .flv (un dérivé de h263) mais aussi au standard H264, codec vidéo très performant !<br />
Je vous propose de vous même encoder vos vidéos au format H264, à l&#8217;aide d&#8217;outils libres, ffmpeg en l&#8217;occurrence, et d&#8217;ensuite les diffuser sur internet via un lecteur de vidéo au format flash, qu&#8217;il vous suffira d&#8217;insérer dans vos pages web !<br />
(à vous de voir après si vous préférez laisser la diffusion de vos vidéos à une régie publicitaire comme youtube et consorts !)<br />
Je me sers de cette procédure pour diffuser des vidéos issues de mon camescope Sony HDR-HC7E en haute définition (1440 PAR 1.33 x 1080 entrelacé) dans une résolution correcte : 960x540p<br />
Dans tout ce tutorial, le &#8216;%&#8217; correspond à l&#8217;invite de commande de mon shell.</p>
<h3>Installation de FFMPEG du dépôt subversion sur Ubuntu Gutsy 7.10 : (aussi testé sur Ubuntu Feisty 7.04)</h3>
<p>Dans un premier temps :<br />
<code>%sudo apt-get build-dep ffmpeg</code><br />
Selon le man de &laquo;&nbsp;apt-get&nbsp;&raquo;, &laquo;&nbsp;Avec la commande build-dep, apt-get installe ou supprime des paquets dans le but de satisfaire les dépendances de construction d&#8217;un paquet source.&nbsp;&raquo;<br />
Ensuite, installons les librairies multipmédias nécessaires et aussi Subversion, car nous allons avoir besoin de récupérer la toute dernière version de ffmpeg :<br />
<code>%sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall build-essential subversion</code><br />
On récupèrele code source de ffmpeg par svn :<br />
<code>svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg</code><br />
Il est temps de compiler ffmpeg, pour cela, rendons nous dans le répertoire du ffmpeg récemment récupéré :<br />
<code>%cd ffmpeg</code><br />
Au cas où vous avez déjà compilé : (sinon çà fait pas de mal)<br />
<code>%make distclean</code><br />
on configure :<br />
<code>%./configure --enable-gpl --enable-pp --enable-libvorbis --enable-libtheora --enable-liba52 --enable-libdc1394 --enable-libgsm --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-libxvid --enable-pthreads --enable-libx264</code><br />
et on compile :<br />
<code>make</code><br />
Ça prend un peu de temps, mais au bout, vous obtiendrez dans votre répertoire un ffmpeg compilé avec le support de h264 (entre autres encodeurs).<br />
Vous pourriez l&#8217;installer avec sudo checkinstall  et sudo make install, mais je préfère le garder à part de /usr/bin au cas où un jour je veuille utiliser le ffmpeg de ma distrib)<br />
Tant que nous sommes à la compilation, compilons qt-faststart (j&#8217;explique peu après à quoi sert qt-faststart : déplacer les entêtes, les metadata, au début du fichier video):<br />
Compiler qt-faststart.c</p>
<div class="code">gcc -O3  -g -Wdeclaration-after-statement -Wall -Wno-switch -I -I$REP_SVN_FFMPEG/ffmpeg -I$REP_SVN_FFMPEG/ffmpeg/libavutil -I$REP_SVN_FFMPEG/ffmpeg/libavcodec -I$REP_SVN_FFMPEG/ffmpeg/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE $REP_SVN_FFMPEG/ffmpeg/tools/qt-faststart.c -o qt-faststart</div>
<p>en remplaçant $REP_SVN_FFMPEG par le chemin complet du répertoire du ffmpeg récupéré par svn.<br />
Et voilà, fini pour l&#8217;installation ! place à l&#8217;utilisation !</p>
<h3>Encodage du fichier video en H264</h3>
<p>En remplaçant $REP_SVN_FFMPEG par le chemin complet du répertoire du ffmpeg récupéré par svn,</p>
<div class="code">$REP_SVN_FFMPEG/ffmpeg/ffmpeg -i ma_video.m2t -vcodec libx264  -b 800k -ab 128k -s 960&#215;540 -deinterlace ma_video.mov</div>
<p>cà peut être (très, 5fps) long &#8230;</p>
<h3>Déplacement de l&#8217;entête MOOV ATOM au début du fichier</h3>
<p>Malheureusement, si vous laissez la vidéo obtenue telle quelle, avant de pouvoir la visionner, vous serez obligé de la télécharger en entier; car les métadata du fichier, MOOV ATOM, sont placées à la fin du fichier, et non au début.<br />
C&#8217;est alors que qt-faststart rentre en scène :</p>
<div class="code">$REP_SVN_FFMPEG/ffmpeg/tools/qt-faststart ma_video.mov ma_video_fast.mov</div>
<p>Pour diffuser votre vidéo sur le web, vous pouvez utiliser la dernière version de FlowPlayer, et consulter mon article à son sujet ! (j&#8217;essaierai de le mettre plus à jour prochainement !)</p>
<p>Bonne diffusion !</p>
<p>Références :<br />
<a href="http://slashdot.org/~PhillC/journal/190344">How to encode in H264 for web broadcasting</a><br />
<a href="http://lists.mplayerhq.hu">La mailing list du site officiel de FFMPEG</a><br />
<a href="http://community.flowplayer.org/node/91">La communauté de FlowPLayer à propos de H264</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2008/03/20/diffusez-vos-videos-hd-en-h264-sur-le-web/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
