<?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>dimitar.me</title>
	<atom:link href="http://dimitar.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://dimitar.me</link>
	<description>Dimitar Darazhanski&#039;s blog.</description>
	<lastBuildDate>Fri, 23 Jul 2010 19:17:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Android applications that use the MyLocationOverlay class crash on the new Droid X</title>
		<link>http://dimitar.me/applications-that-use-the-mylocationoverlay-class-crash-on-the-new-droid-x/</link>
		<comments>http://dimitar.me/applications-that-use-the-mylocationoverlay-class-crash-on-the-new-droid-x/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 18:44:20 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=959</guid>
		<description><![CDATA[
Update: July 23, 2010
I got notified by users that Motorola and Verizon came out yesterday with an update for the Droid X phones, which among other things fixes the issue described in this post below.

As soon as the new Motorola Droid X came out I started getting reports that my applications would crash on it.
The [...]]]></description>
			<content:encoded><![CDATA[<hr />
<em>Update: July 23, 2010</em></p>
<p>I got notified by users that Motorola and Verizon came out yesterday with an update for the Droid X phones, which among other things fixes the issue described in this post below.</p>
<hr />
<p>As soon as the new Motorola Droid X came out I started getting reports that my applications would crash on it.</p>
<p>The description I was getting from people was that the application would start, then it would show the Google map and start moving the map and zooming in on to their current location and then all of a sudden the app would crash. By crash I mean they get taken back to the phone&#8217;s home screen. No &#8220;Force Close&#8221; dialog pops up&#8230; nothing&#8230; just gets back to the home screen.</p>
<p>If both the GPS and the Wireless Networks are turned off from the Locations settings then the applications would work fine, but of course that means that the current location of the device would be impossible to find.</p>
<p>At this point I knew that the problem had to do with either the LocationManagers or the LocationOverlays but I had no way of finding out exactly what the problem was until I could get my hands on a Droid X phone and connect it to my computer to look at the execution stack.</p>
<p>Well it turns out the problem is with the default MyLocationOverlay class. The Droid X phones throw an exception when they try to draw the dot showing the location of the device:</p>
<pre><code>E/AndroidRuntime(10458): Uncaught handler: thread main exiting due to  uncaught exception
E/AndroidRuntime(10458): java.lang.ClassCastException:  android.graphics.drawable.BitmapDrawable
E/AndroidRuntime(10458): 	at com.google.android.maps.MyLocationOverlay.getLocationDot(MyLocationOverlay.java:180)
E/AndroidRuntime(10458): 	at com.google.android.maps.MyLocationOverlay.drawMyLocation(MyLocationOverlay.java:561)</code></pre>
<p>Another developer (<a href="http://www.droidforums.net/forum/droid-x-general-discussions/59840-does-my-app-crash-droid-x.html" onclick="pageTracker._trackPageview('/outgoing/www.droidforums.net/forum/droid-x-general-discussions/59840-does-my-app-crash-droid-x.html?referer=');">rgfind</a>l) who had the same problem like I did and who had already made the trip to the Verizon store gave me the above stack trace.</p>
<p>Several possible solutions popped into my head:</p>
<p>1. Stop using the MyLocationOverlay class and start relying only on the LocationManager classes and draw/redraw my current location onLocationChanged.<br />
2. Extend from MyLocationOverlay class and override the draw method.<br />
3. Stop supporting the Droid X.</p>
<p>None of these solutions are ideal with the last one being almost unacceptable.</p>
<p>Luckily the same developer also gave me a link to a solution implementing the 2nd option above, so I did not even have to code it myself. Apparently that is not the first time Motorola phones (Motorola Cliq and Motorola Dext) have a problem with this class. Most likely their builds are missing the drawable resource.</p>
<p>Anyway, the solution consists of the <a href="http://www.spectrekking.com/download/FixedMyLocationOverlay.java" onclick="pageTracker._trackPageview('/outgoing/www.spectrekking.com/download/FixedMyLocationOverlay.java?referer=');">.java file that implements the FixedMyLocationOverlay class</a>, which inherits from the default MyLocationOverlay class and overrides the drawMyLocation method. And a <a href="http://www.spectrekking.com/download/mylocation.png" onclick="pageTracker._trackPageview('/outgoing/www.spectrekking.com/download/mylocation.png?referer=');">.png file</a> with a dot that will be representing the current location on the map.</p>
<p>Just use this derived class FixedMyLocationOverlay instead of the default MyLocationOverlay. If you look at the implementation of the drawMyLocation method, you will see that if the phone has no problem it will use the default implementation of the parent class, but if it throws an exception it will use the custom code to draw the location.</p>
<p>I would think that there are a lot of applications in the Android Market right now that use the default MyLocationOverlay class and all of them will be crashing on the new Droid X until either Motorola gets their act together or the developers realize the issue and work around it.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/applications-that-use-the-mylocationoverlay-class-crash-on-the-new-droid-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just Upgraded my Nexus One from Android 2.1 to Android 2.2</title>
		<link>http://dimitar.me/just-upgraded-my-nexus-one-from-android-2-1-to-android-2-2/</link>
		<comments>http://dimitar.me/just-upgraded-my-nexus-one-from-android-2-1-to-android-2-2/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 19:52:05 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=937</guid>
		<description><![CDATA[The latest Android OS version 2.2 (&#8221;Froyo&#8221;) was announced at the Google I/O conference on the 11th of May. As you already probably know it adds multiple enhancements like tethering, wifi hotspot functionality, full support for Flash, etc. Since I use my Nexus One phone for Android development, I did not want to download the [...]]]></description>
			<content:encoded><![CDATA[<p>The latest Android OS version 2.2 (&#8221;Froyo&#8221;) was announced at the Google I/O conference on the 11th of May. As you already probably know it adds multiple enhancements like tethering, wifi hotspot functionality, full support for Flash, etc. Since I use my Nexus One phone for Android development, I did not want to download the update from Google and then install it with adb. I just wanted to wait for the over the air update.</p>
<p>And to my surprise, the first time I looked at my phone this morning, I had this message on the screen:</p>
<div id="attachment_935" class="wp-caption aligncenter" style="width: 310px"><a href="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Upgrade_Message.png"><img src="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Upgrade_Message-300x225.png" alt="Android 2.2 Upgrade Message" title="Android_2.2_Upgrade_Message" width="300" height="225" class="size-medium wp-image-935" /></a><p class="wp-caption-text">Android 2.2 Upgrade Message</p></div>
<p>I was not sure how long it would take, so I just hit &#8220;Install Later&#8221;. Then a couple of hours later, when I was ready, I just went to Settings -> About Phone -> Software Update and hit &#8220;Restart &#038; Install&#8221;:</p>
<div id="attachment_936" class="wp-caption aligncenter" style="width: 235px"><a href="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Settings_SystemUpdates.png"><img src="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Settings_SystemUpdates-225x300.png" alt="Android 2.2 Settings -&gt; About Phone -&gt; System Updates" title="Android_2.2_Settings_SystemUpdates" width="225" height="300" class="size-medium wp-image-936" /></a><p class="wp-caption-text">Android 2.2 Settings -> About Phone -> System Updates</p></div>
<p>The phone rebooted and started the upgrade. The whole process with the installation took less than 5 minutes.</p>
<p>I am not going to go into details what the features of Android 2.2 are. There are so many announcements and blog posts on this matter already out there&#8230;</p>
<p>But what I am going to say is that Android is the leading OS in the mobile phone market right now. I can say this definitively, since I have been using iPhones for the past 2 years. I have a 3G and a 3GS phones. I encourage any iPhone user to go and check out an Android device. Please do not look at the low end hardware that runs Android (like the Cliq, the old G1, etc.). Check out the HTC Evo, the HTC Incredible, the Nexus One etc. See for yourselves before you make your decision to get another phone and lock into a 2 year contract. I will mention only a few things you will discover on the Android device that your phone probably does not have right now:</p>
<ol>
<li>Turn by turn voice navigation</li>
<li>Built in tethering</li>
<li>Built in WiFi hotspot capability supporting multiple devices</li>
<li>Full support for Flash</li>
<li>Full blown multitasking on the OS level (no need for the programmer to do anything special)</li>
<li>Integrated speech recognition across the board. Voice input could be used anywhere in place of the text input.</li>
<li>Over the air updates and syncing. That means no iTunes or the like!</li>
</ol>
<p>And many other features that I do not want to get into details right now. I am sure you can fill in the gaps for yourselves&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/just-upgraded-my-nexus-one-from-android-2-1-to-android-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find the Geopgraphical Location of an IP Address</title>
		<link>http://dimitar.me/find-the-geopgraphical-location-of-an-ip-address/</link>
		<comments>http://dimitar.me/find-the-geopgraphical-location-of-an-ip-address/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 15:31:45 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=921</guid>
		<description><![CDATA[There are a few applications that give the geographical location of an IP address *. My favorite one is VisualRoute. It not only maps the location of the source and destination IP addresses, but also all the hops in between. The down side to it is that it is not available for Linux and it [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few applications that give the geographical location of an IP address <em>*</em>. My favorite one is <a href="http://www.visualroute.com/" onclick="pageTracker._trackPageview('/outgoing/www.visualroute.com/?referer=');">VisualRoute</a>. It not only maps the location of the source and destination IP addresses, but also all the hops in between. The down side to it is that it is not available for Linux and it costs $50 per user.</p>
<p>The <a href="http://mapulator.com" onclick="pageTracker._trackPageview('/outgoing/mapulator.com?referer=');">http://mapulator.com</a> site gives you pretty much the same information online for free, but it has been down for quite some time now.</p>
<p>Lately I have been using <a href="http://whatismyipaddress.com/ip-lookup" onclick="pageTracker._trackPageview('/outgoing/whatismyipaddress.com/ip-lookup?referer=');">http://whatismyipaddress.com/ip-lookup</a>. But it only maps the destination IP address.</p>
<p>If anyone knows of a Linux application that would map all the hops and the final IP destination, please leave a comment!</p>
<p><em>* IP addresses do not have a geographical location per se. Any program that maps IP addresses can only give you where the whole class of IP addresses (that the specified IP address belongs to) is registered to be located at. They do this by querying a database that has that information. This is accurate down to a city level at best. Do not expect to find where someone lives by their IP address! </em></p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/find-the-geopgraphical-location-of-an-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Subversion and Subclipse for Eclipse on Ubuntu</title>
		<link>http://dimitar.me/install-subversion-and-subclipse-for-eclipse-on-ubuntu/</link>
		<comments>http://dimitar.me/install-subversion-and-subclipse-for-eclipse-on-ubuntu/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 19:03:32 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=875</guid>
		<description><![CDATA[If you do not have Eclipse installed yet, run:
sudo apt-get install eclipse
Install Subversion
sudo apt-get install subversion
Install the Subversion plugin for Eclipse
Get the Java bindings for Subversion:
sudo apt-get install libsvn-java
Now we are ready to install the plugins in Eclipse.
Open Eclipse.
Go to Help -> Install New Software
Then hit the &#8220;Add&#8221; button.
Put &#8220;Subclipse 1.6.x (Eclipse 3.2+)&#8221; under Name [...]]]></description>
			<content:encoded><![CDATA[<p>If you do not have Eclipse installed yet, run:</p>
<pre><code>sudo apt-get install eclipse</code></pre>
<p><b>Install Subversion</b></p>
<pre><code>sudo apt-get install subversion</code></pre>
<p><b>Install the Subversion plugin for Eclipse</b></p>
<p>Get the Java bindings for Subversion:</p>
<pre><code>sudo apt-get install libsvn-java</code></pre>
<p>Now we are ready to install the plugins in Eclipse.</p>
<p>Open Eclipse.</p>
<p>Go to Help -> Install New Software</p>
<p>Then hit the &#8220;Add&#8221; button.</p>
<p>Put &#8220;Subclipse 1.6.x (Eclipse 3.2+)&#8221; under Name and &#8220;http://subclipse.tigris.org/update_1.6.x&#8221; under Location:</p>
<div id="attachment_892" class="wp-caption aligncenter" style="width: 530px"><a href="http://dimitar.me/wp-content/uploads/2010/06/Subclipse1.png"><img src="http://dimitar.me/wp-content/uploads/2010/06/Subclipse1.png" alt="Add the libraries for Subclipse" title="Subclipse Libraries" width="520" height="409" class="size-full wp-image-892" /></a><p class="wp-caption-text">Add the libraries for Subclipse</p></div>
<p>The above is for Elclips 3.2+ and Subversion 1.6.x.</p>
<p>If you have different Eclipse or Subversion versions, check this list and substitute accordingly:<br />
<em><br />
Name: Subclipse 1.6.x (Eclipse 3.2+)<br />
URL:  http://subclipse.tigris.org/update_1.6.x</p>
<p>Name: Subclipse 1.4.x (Eclipse 3.2+)<br />
URL:  http://subclipse.tigris.org/update_1.4.x</p>
<p>Name: Subclipse 1.2.x (Eclipse 3.2+)<br />
URL:  http://subclipse.tigris.org/update_1.2.x</p>
<p>Name: Subclipse 1.0.x (Eclipse 3.0/3.1)<br />
URL:  http://subclipse.tigris.org/update_1.0.x<br />
</em><br />
More info about the different versions: <a target="_blank" href="http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA" onclick="pageTracker._trackPageview('/outgoing/subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA&amp;referer=');">http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA</a></p>
<p>Then hit &#8220;OK&#8221;. You will now be presented with these options:</p>
<div id="attachment_902" class="wp-caption aligncenter" style="width: 530px"><a href="http://dimitar.me/wp-content/uploads/2010/06/Subclipse2.png"><img src="http://dimitar.me/wp-content/uploads/2010/06/Subclipse2.png" alt="Subclipse Installation Options" title="Subclipse Installation Options" width="520" height="513" class="size-full wp-image-902" /></a><p class="wp-caption-text">Subclipse Installation Options</p></div>
<p>If you are unsure what Subclipse component you will need, you can check all of them. Also, keep in mind that you can always go back to this in the future and install/uninstall any of the components as needed.</p>
<p>Then &#8220;Next&#8221; and &#8220;Finish&#8221; on the subsequent screens.</p>
<p>After the plugins are installed, it will prompt you to restart Eclipse. Go ahead and do so.</p>
<p><b>You are not done yet. You need to fix the JavaHL.</b></p>
<p>Edit the <em>eclipse.ini</em> file:</p>
<pre><code>sudo vi /usr/lib/eclipse/eclipse.ini</code></pre>
<p>Add the following line under -vmargs:</p>
<p>-Djava.library.path=/usr/lib/jni</p>
<p>Here is what my <em>eclipse.ini</em> file looks like:</p>
<pre><code>$ cat /usr/lib/eclipse/eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-startup
--launcher.library
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-startup
/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520
-vmargs
-Djava.library.path=/usr/lib/jni
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=//usr/share/eclipse/dropins
-Xms40m
-Xmx256m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=//usr/share/eclipse/dropins</code></pre>
<p>For more info on fixing JavaHL if you need it: <a target="_blank" href="http://subclipse.tigris.org/wiki/JavaHL#head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe" onclick="pageTracker._trackPageview('/outgoing/subclipse.tigris.org/wiki/JavaHL_head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe?referer=');">http://subclipse.tigris.org/wiki/JavaHL#head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe</a></p>
<p>You should be able to use Subversion with Eclipse for your projects at this point.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/install-subversion-and-subclipse-for-eclipse-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to connect your Android phone to Ubuntu to do development, testing, installations or tethering</title>
		<link>http://dimitar.me/how-to-connect-your-android-phone-to-ubuntu-to-do-developmenttestinginstallations-or-tethering/</link>
		<comments>http://dimitar.me/how-to-connect-your-android-phone-to-ubuntu-to-do-developmenttestinginstallations-or-tethering/#comments</comments>
		<pubDate>Wed, 12 May 2010 20:14:32 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=837</guid>
		<description><![CDATA[If you do any Android development in Ubuntu it is much better to test your applications on a real device rather than just relying on the emulator.
If you just connect the phone to the computer through USB and run adb devices you will find out that your phone is not recognized:
$ adb devices
List of devices [...]]]></description>
			<content:encoded><![CDATA[<p>If you do any Android development in Ubuntu it is much better to test your applications on a real device rather than just relying on the emulator.</p>
<p>If you just connect the phone to the computer through USB and run adb devices you will find out that your phone is not recognized:</p>
<pre><code>$ adb devices
List of devices attached
???????????? no permissions
</code></pre>
<p>This is easily fixable in Ubuntu. You have to add a line to a file in the /etc/udev/rules.d directory.</p>
<p>What line in which file depends on the manufacturer and model of the device. You can find out the Vendor ID number and Product ID number of the device by running (after you connected it via USB of course):</p>
<pre><code>$ lsusb</code></pre>
<p>For example, if you had a Nexus One connected you would get:</p>
<p>Bus 002 Device 004: ID 18d1:4e12 </p>
<p>In this case the Vendor Id is &#8220;18d1&#8243; and the Product ID is &#8220;4e12&#8243;. Please keep in mind that the Vendor ID for HTC changed from &#8220;0bb4&#8243; to &#8220;18d1&#8243;. The older HTC phones like the G1 have a Vendor ID of &#8220;0bb4&#8243;.</p>
<p>Here is how to set up some of the major Android phones:</p>
<p><u><b>Step 1.</b> Depending on your phone follow these instructions:</u></p>
<ul>
<li><b>G1</b><br />
Create/edit a file in /etc/udev/rules.d called 51-android.rules:</p>
<pre><code>$ sudo gedit /etc/udev/rules.d/51-android.rules</code></pre>
<p>Add the following line to it and save it:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;0bb4&#8243;, ATTRS{idProduct}==&#8221;0c01&#8243;, MODE=&#8221;0666&#8243;</p>
</li>
<li><b>HTC Hero</b><br />
Create/edit a file in /etc/udev/rules.d called 51-android.rules:</p>
<pre><code>$ sudo gedit /etc/udev/rules.d/51-android.rules</code></pre>
<p>Add the following line to it and save it:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;0bb4&#8243;, ATTRS{idProduct}==&#8221;0c02&#8243;, MODE=&#8221;0666&#8243;</p>
</li>
<li><b>Motorola Droid</b><br />
Create/edit a file in /etc/udev/rules.d called 10-motorola-droid.rules:</p>
<pre><code>$ sudo gedit /etc/udev/rules.d/10-motorola-droid.rules</code></pre>
<p>Add the following line to it and save it:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;22b8&#8243;, ATTRS{idProduct} ==&#8221;41db&#8221;, MODE=&#8221;0600&#8243;</p>
</li>
<li><b>Nexus One</b><br />
Create/edit a file in /etc/udev/rules.d called 99-android.rules:</p>
<pre><code>$ sudo gedit /etc/udev/rules.d/99-android.rules</code></pre>
<p>Add the following line to it and save it:</p>
<p>SUBSYSTEM==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;18d1&#8243;, SYMLINK+=&#8221;android_adb&#8221;, MODE=&#8221;0666&#8243;
         </li>
</ul>
<p><u><b>Step 2.</b> Restart udev:</u></p>
<pre><code>$ sudo restart udev</code></pre>
<p>Check if the device is recognized:</p>
<pre><code>$ adb devices</code></pre>
<p>You may need to stop and start the adb server:</p>
<pre><code>$ adb kill-server
$ adb start-server</code></pre>
<p>You should be good to go&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/how-to-connect-your-android-phone-to-ubuntu-to-do-developmenttestinginstallations-or-tethering/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Extract Audio (.mp3) from Video Files Like .flv, .mov, .avi and Others with Ubuntu</title>
		<link>http://dimitar.me/extract-audio-mp3-from-video-files-like-flv-mov-avi/</link>
		<comments>http://dimitar.me/extract-audio-mp3-from-video-files-like-flv-mov-avi/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:49:26 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=807</guid>
		<description><![CDATA[It is very easy to extract the audio track from video files using Linux. All you need is ffmpeg and some codecs.
Let&#8217;s get started&#8230;
Note: The commands below are for Ubuntu (or Debian derivatives) but you can do the same with any other Linux distribution provided you can install the necessary packages.
1. Add the Medibuntu&#8217;s repository [...]]]></description>
			<content:encoded><![CDATA[<p>It is very easy to extract the audio track from video files using Linux. All you need is <em>ffmpeg</em> and some codecs.</p>
<p>Let&#8217;s get started&#8230;</p>
<p><em>Note:</em> The commands below are for Ubuntu (or Debian derivatives) but you can do the same with any other Linux distribution provided you can install the necessary packages.</p>
<p><strong>1. Add the Medibuntu&#8217;s repository to your sources.list:</strong></p>
<pre><code>sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list &#038;&#038; sudo apt-get --quiet update &#038;&#038; sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring &#038;&#038; sudo apt-get --quiet update</code></pre>
<p><strong>2. Install ffmpeg:</strong></p>
<pre><code>sudo apt-get install ffmpeg</code></pre>
<p><strong>3. Let&#8217;s get the restricted packages and some codecs installed:</strong></p>
<pre><code>sudo apt-get install ubuntu-restricted-extras libmp3lame0 libdvdcss2 w32codecs</code></pre>
<p>The above command is for i386 architecture. If you have an amd64 architecture, substitute <em>w32codecs</em> with <em>w64codecs</em>.</p>
<p><em>Note:</em> This is not a complete list of codec packages by any stretch of the imagination. It will get you started though and you will be able to do most formats, but you might have to add codecs as you go along.</p>
<p><strong>4. Now we are ready to extract the audio from the video files:</strong></p>
<pre><code>ffmpeg -i input_file.flv output_file.mp3</code></pre>
<p>The above command will extract the audio from a Flash video file. You can do the same for a QuickTime file as well:</p>
<pre><code>ffmpeg -i input_file.mov output_file.mp3</code></pre>
<p>Or for an Audio Video Interface file:</p>
<pre><code>ffmpeg -i input_file.avi output_file.mp3</code></pre>
<p><strong>YouTube and other video web sites:</strong></p>
<p>Having done all this, now we can download flash files from places like YouTube and strip the audio from them. All you need besides the steps above is a way to save the Flash files (.flv) from YouTube. An easy way to do that is by using Firefox Add-ons like <a href="https://addons.mozilla.org/en-US/firefox/addon/53003?src=api" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/53003?src=api&amp;referer=');">Download Flash and Video</a> or <a href="https://addons.mozilla.org/en-US/firefox/addon/6584?src=api" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/6584?src=api&amp;referer=');">Flash Video Downloader</a>.</p>
<p>The quality of the audio in the YouTube videos for example is 64 bit/sec. Most of the mp3 files are normally compressed to 128 bit/sec or above. Obviously the quality will not be the same, but a human year cannot tell the difference. </p>
<p>The quality of the extracted mp3 will depend on the quality of the audio track in the video file. So the above statement about the 64 bit/sec audio is mostly the case for the files on some video sharing sites.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/extract-audio-mp3-from-video-files-like-flv-mov-avi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Resume Partial File Transfers</title>
		<link>http://dimitar.me/how-to-resume-partial-file-transfers/</link>
		<comments>http://dimitar.me/how-to-resume-partial-file-transfers/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 05:03:11 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=793</guid>
		<description><![CDATA[I work primarily with UNIX and Linux machines and scp is my main choice to transfer files with. It is both convenient, short and secure.
Example:
scp localfile user@remotecomputer:/path/to/target/dir
Recently I was transferring an 8GB file and due to a network issue, the transfer was interrupted at nearly 40%.
I found a solution at joen.dk ,which uses rsync to [...]]]></description>
			<content:encoded><![CDATA[<p>I work primarily with UNIX and Linux machines and <em>scp</em> is my main choice to transfer files with. It is both convenient, short and secure.<em></em><em></em></p>
<p>Example:</p>
<pre><code>scp localfile user@remotecomputer:/path/to/target/dir</code></pre>
<p>Recently I was transferring an 8GB file and due to a network issue, the transfer was interrupted at nearly 40%.</p>
<p>I found a solution at <a href="http://joen.dk/wordpress/?p=34" onclick="pageTracker._trackPageview('/outgoing/joen.dk/wordpress/?p=34&amp;referer=');">joen.dk</a> ,which uses <em>rsync</em> to resume the transfer:</p>
<pre><code>rsync --partial --progress --rsh=ssh host:remote_file local_file</code></pre>
<p>Now we can improve this slightly by shortening the above command. We can substitute <em>&#8211;rsh=ssh</em> with <em>-e ssh</em>, and use <em>-P</em> instead of <em>&#8211;partial &#8211;progress</em>. Also, you can add <em>user@host</em> if you need to specify a different remote shell user:</p>
<pre><code>rsync -P -e ssh user@host:remote_file local_file</code></pre>
<p>This above example will work with any file that was partially transfered. How the transfer was started does not really matter. It could be through scp, nc or even ftp. After you execute the above command it will take <em>rsync</em> a little time to verify the previously downloaded part before it continues with the rest. Be patient, depending on your network speed <em>rsync</em> could take some time to go through what you have already transfered. Of course this is much faster than if you were to start the download all over again and it shows you the progress in percentages.</p>
<p>Keep in mind that there have to be a couple of requirements in place in order to resume the file transfer with <em>rsync</em>:</p>
<p>1. You should have remote shell access.<br />
2. The remote machine should have rsync installed. Since rsync is by default on most Linux distributions that generally should not be an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/how-to-resume-partial-file-transfers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Quicktime Movies to AVI encoded with MPEG-4 (MOV to AVI) with Linux/Ubuntu</title>
		<link>http://dimitar.me/convert-quicktime-movies-to-avi-encoded-with-mpeg-4-mov-to-avi-with-linuxubuntu/</link>
		<comments>http://dimitar.me/convert-quicktime-movies-to-avi-encoded-with-mpeg-4-mov-to-avi-with-linuxubuntu/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 05:31:15 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=764</guid>
		<description><![CDATA[A lot of camcorders record in the .mov (Quicktime) format. It has high quality video and depending on the underlying codec it provides a good compression, but it is too proprietary and very often you might not be able to play it on different devices.  
AVI on the other hand is more widely accepted [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of camcorders record in the .mov (Quicktime) format. It has high quality video and depending on the underlying codec it provides a good compression, but it is too proprietary and very often you might not be able to play it on different devices.  </p>
<p>AVI on the other hand is more widely accepted format. AVI, like MOV, is a media container that envelops encoded media. In this example we will convert Quicktime video (.mov) to .avi that contains media encoded with mpeg-4.</p>
<p>If you want to preserve the original quality and resolution with pcm_u8 (analog 8bit) audio:</p>
<pre><code>ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec pcm_u8 outputfile.avi</code></pre>
<p>Obviously I would prefer something better for the sound so I normally use the mp3 as an audio codec. To do this make sure that you have the libmp3lame0 package installed to do that:</p>
<pre><code>sudo apt-get install libmp3lame0</code></pre>
<p>And then:</p>
<pre><code>ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi</code></pre>
<p>If you want to change the resolution then add the -s option and specify the horizontal and vertical resolution. Make sure to preserve the original aspect ratio:</p>
<pre><code>ffmpeg -i inputfile.mov -s 960x540 -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/convert-quicktime-movies-to-avi-encoded-with-mpeg-4-mov-to-avi-with-linuxubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Broadcom Wireless Chipset (BCM4311, BCM4312, BCM4321, and BCM4322) on Ubuntu Karmic.</title>
		<link>http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/</link>
		<comments>http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 21:24:32 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=728</guid>
		<description><![CDATA[If you have a Broadcom wireless chipset BCM4311, BCM4312, BCM4321, or BCM4322 it will not work with Ubuntu Karmic after an upgrade or an install.
To get it working, you need to install the STA driver. You can get it from the Broadcom site:
http://www.broadcom.com/support/802.11/linux_sta.php
Follow the instructions in the README.txt file which is on same page.
After you [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a Broadcom wireless chipset BCM4311, BCM4312, BCM4321, or BCM4322 it will not work with Ubuntu Karmic after an upgrade or an install.</p>
<p>To get it working, you need to install the STA driver. You can get it from the Broadcom site:</p>
<p><a href="http://www.broadcom.com/support/802.11/linux_sta.php" onclick="pageTracker._trackPageview('/outgoing/www.broadcom.com/support/802.11/linux_sta.php?referer=');">http://www.broadcom.com/support/802.11/linux_sta.php</a></p>
<p>Follow the instructions in the README.txt file which is on same page.</p>
<p>After you have finished installing it the wireless will work, but only until the next reboot. To make this permanent follow these steps:</p>
<p>1. Run:</p>
<pre><code>sudo rmmod ssb</code></pre>
<p>For some reason you cannot blacklist the ssb module. It always runs on boot even if it is in the blacklist.conf file.<br />
After that you need to run this to get rid of the ssb module permanently:</p>
<pre><code>sudo update-initramfs -u</code></pre>
<p>2. Now that we got rid of ssb, we need to make sure that lib80211 is loaded on boot. To do that add lib80211 to the end of the /etc/modules file:</p>
<pre><code>echo "lib80211" | sudo tee -a /etc/modules</code></pre>
<p>I went ahead and added wl to it as well:</p>
<pre><code>echo "wl" | sudo tee -a /etc/modules</code></pre>
<p>So the /etc/modules file looks like this:</p>
<pre><code>
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
lp
rtc
lib80211
wl
</code></pre>
<p>3. Now we need to make sure that &#8220;insmod wl.ko&#8221; as specified in the README.txt file runs every time we boot. There might be a better way to do this but I just added it to the /etc/rc.local file.</p>
<p>Before I did this I copied the wl.ko file to the /lib/modules/2.6.31-14-generic/kernel/lib directory. This way we can get rid of the source files we downloaded from the Broadcom site along with the binaries we compiled and not worry about losing the wl.ko file:</p>
<pre><code>sudo cp wl.ko  /lib/modules/2.6.31-14-generic/kernel/lib</code></pre>
<p>Then add the line &#8220;insmod /lib/modules/2.6.31-14-generic/kernel/lib/wl.ko&#8221; at the end of the rc.local file, right above the exit 0 line:</p>
<pre><code>sudo gedit /etc/rc.local</code></pre>
<p>Here is how the rc.local file looks:</p>
<pre><code>cat /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

insmod /lib/modules/2.6.31-14-generic/kernel/lib/wl.ko
exit 0
</code></pre>
<p>4. Last step is to pin down the linux kernel so that we don&#8217;t upgrade the kernel accidentally along with the other updates:</p>
<p>System -> Administration -> Synaptic Package Manager</p>
<p>Then click on the &#8220;Status&#8221; button and select &#8220;Installed&#8221;. Then search for &#8220;linux-&#8221;. Select all packages that start with &#8220;linux-&#8221; and then Package -> Lock Version.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>When a Linux User Buys Apple</title>
		<link>http://dimitar.me/when-a-linux-user-buys-apple/</link>
		<comments>http://dimitar.me/when-a-linux-user-buys-apple/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 20:00:11 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS X]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=717</guid>
		<description><![CDATA[I just came upon two articles by Thomas Driemeyer. The author seems to be very sincere in his attempt to describe his experiences in switching from Linux to Apple (and subsequently back) and his good sense of humor makes the reading pleasant and amusing:
When a Linux user buys Apple&#8217;s Mac mini
When an Apple Mac mini [...]]]></description>
			<content:encoded><![CDATA[<p>I just came upon two articles by Thomas Driemeyer. The author seems to be very sincere in his attempt to describe his experiences in switching from Linux to Apple (and subsequently back) and his good sense of humor makes the reading pleasant and amusing:</p>
<p><a href="http://bitrot.de/macswitch.html" onclick="pageTracker._trackPageview('/outgoing/bitrot.de/macswitch.html?referer=');">When a Linux user buys Apple&#8217;s Mac mini</a></p>
<p><a href="http://bitrot.de/macswitchback.html" onclick="pageTracker._trackPageview('/outgoing/bitrot.de/macswitchback.html?referer=');">When an Apple Mac mini user gets disenchanted</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/when-a-linux-user-buys-apple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
