<?xml version="1.0" encoding="iso-8859-1" ?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<atom:link href="http://www.m0interactive.com/rss/articles.xml" rel="self" type="application/rss+xml" />
	<title>Mohamed Mansour | articles</title>
	<copyright>Copyright (c) 2006 Mohamed Mansour! Inc. All rights reserved.</copyright>
	<link>http://www.m0interactive.com/</link>
	<description>Mohamed Mansour RSS Feeds</description>
	<language>en-us</language> 
	<item>
		<title>WebDesign - Team Fortress 2 Facebook application launched</title>
		<link>http://www.m0interactive.com/archives/2008/03/06/team_fortress_2_facebook_application_launched.html</link>
		<description><![CDATA[<img src="http://photos-636.ll.facebook.com/photos-ll-sctm/v43/160/6746509636/app_3_6746509636_59.gif" alt="TF2" /><p>Since I enjoy playing TF2 and I enjoy talking to the TF2 community on message boards and during the game, I wanted to give something back. Since I am "ok" at software development, I designed a Team Fortress 2 Stats Facebook application that TF2 games could place their TF2 statistics on their profile. </p>

<p>Currently, the application is in beta stage and the facebook php framework will be shared (OpenSource) with the community. I have created a PHP TF2 Parser which will parse any steam profile. That will be OpenSource as well when I finish documenting the library.</p>


<p>There are many additions that could be included in this application such as Statistics. Statistics would be a cool thing that will let the user know his rank among Gender, Age, Location, etc. It is currently in development, but would be cool if anyone would lend a hand.</p>

<p>The application has a sophisticated theme engine, where the user could custom build his own TF2 Profile badge by simply altering the theme. The theme manager consists of theme variables that if entered, it will transform into live TF2 stat data. Such as the default theme:</p>
<pre>

<div> 
<img src="{Class!image}" alt="my class img" style="float:left; " /> 
<div style="padding-left:70px"> 
<strong>Max Points: </strong>{Class!points} <br /> 
<strong>Max Damage: </strong>{Class!damage} <br /> 
<strong>Max Kills: </strong>{Class!kills} <br /> 
<strong>Max Destruction: </strong>{Class!destructions} <br /> 
<strong>Total Class Play Time: </strong>{Class!totalTime} hours<br /> 
<strong>Last 2 Weeks Play Time: </strong>{Record!2WeekPlayTime} hours <br />
<strong>Total TF2 Play Time: </strong>{Record!playTime} hours<br /> 
</div> 
</div>
</pre>

<p>Visit Facebook Application: <a href="http://www.facebook.com/apps/application.php?id=6746509636">http://www.facebook.com/apps/application.php?id=6746509636</a></p>

<p>If there are any bugs or suggests, please let me know!</p>]]></description>
		<pubDate>Thu, 06 Mar 2008 18:44:27 -0500</pubDate>
		<guid>http://www.m0interactive.com/archives/2008/03/06/team_fortress_2_facebook_application_launched.html</guid>
	</item>
	<item>
		<title>CSharp - How to calculate network bandwidth speed in c#</title>
		<link>http://www.m0interactive.com/archives/2008/02/05/how_to_calculate_network_bandwidth_speed_in_c_.html</link>
		<description><![CDATA[<p>If your wondering how fast your internet is in C#, there is an easy way to find out by using the NetworkInterface class in .NET. I will show the code and present a simple application on how to find your current upload and download speed .</p>

<img src="http://www.m0interactive.com/files/downloads/bandwidthmeter/bandwidth_meter.jpg" alt="C# Bandwidth Meter" />
<h3>How does it work?</h3>
<p>That is quite simple! Each <a href="http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.aspx">NetworkInterface</a> component has an interface statistics object which provides statistical data for a network interface on the local computer. Depends which Internet Protocol your using (IPv4 or IPv6) you can easily grab that info! To do this in C# we do the following:</p>
<pre>
IPv4InterfaceStatistics interfaceStats = NetworkInterface.GetAllNetworkInterfaces()[0].GetIPv4Statistics();
</pre>

<p>From that object, we can fetch the <a href="http://msdn2.microsoft.com/en-us/library/ms144873.aspx">BytesSent</a> and <a href="http://msdn2.microsoft.com/en-us/library/ms144872.aspx">BytesReceived</a> from that network interface. By creating a simple timer that handles each tick rate in each 1sec interval, we can find the speed of bytes per second by finding the difference between the new bytes with respect to the previous ones. To make it more readable, we could convert bytes into kilobytes by dividing by 1024.</p>
<pre>
// Globally declare these
int bytesSentSpeed = 0;
int bytesReceivedSpeed = 0;

// Grab speed in KB /s
bytesSentSpeed = (int)(interfaceStats.BytesSent - bytesSentSpeed ) / 1024;
bytesReceivedSpeed = (int)(interfaceStats.BytesReceived - bytesReceivedSpeed ) / 1024;

</pre>

<p> That is it! That is how you make your own Bandwidth Meter in .NET. Take a look at my previous blog post on <a href="http://www.m0interactive.com/archives/2006/12/21/high_resolution_timer_in_net_2_0.html">how to create a more sophisticated Windows timer</a> that depends on kernel cpu tick time instead of .net. It requires interoping Kernel32.dll but you will have more precise statistics than using the Windows.Forms.Timer. The difference is very significant. Windows.Forms.Timer runs at 1 second resolution while the Kernel resolution is 10 msec! That is a huge difference and will make your results more exact!</p>

<h3>Final code</h3>
<pre>
using System;
using System.Net.NetworkInformation;
using System.Windows.Forms;

namespace InterfaceTrafficWatch
{
    /// <summary>
    /// Network Interface Traffic Watch
    /// by Mohamed Mansour
    /// 
    /// Free to use under GPL open source license!
    /// </summary>
    public partial class MainForm : Form
    {
        /// <summary>
        /// Timer Update (every 1 sec)
        /// </summary>
        private const double timerUpdate = 1000;

        /// <summary>
        /// Interface Storage
        /// </summary>
        private NetworkInterface[] nicArr;

        /// <summary>
        /// Main Timer Object 
        /// (we could use something more efficient such 
        /// as interop calls to HighPerformanceTimers)
        /// </summary>
        private Timer timer;

        /// <summary>
        /// Constructor
        /// </summary>
        public MainForm()
        {
            InitializeComponent();
            InitializeNetworkInterface();
            InitializeTimer();
        }

        /// <summary>
        /// Initialize all network interfaces on this computer
        /// </summary>
        private void InitializeNetworkInterface()
        {
            // Grab all local interfaces to this computer
            nicArr = NetworkInterface.GetAllNetworkInterfaces();

            // Add each interface name to the combo box
            for (int i = 0; i < nicArr.Length; i++)
                cmbInterface.Items.Add(nicArr[i].Name);

            // Change the initial selection to the first interface
            cmbInterface.SelectedIndex = 0;
        }

        /// <summary>
        /// Initialize the Timer
        /// </summary>
        private void InitializeTimer()
        {
            timer = new Timer();
            timer.Interval = (int)timerUpdate;
            timer.Tick += new EventHandler(timer_Tick);
            timer.Start();
        }

        /// <summary>
        /// Update GUI components for the network interfaces
        /// </summary>
        private void UpdateNetworkInterface()
        {
            // Grab NetworkInterface object that describes the current interface
            NetworkInterface nic = nicArr[cmbInterface.SelectedIndex];

            // Grab the stats for that interface
            IPv4InterfaceStatistics interfaceStats = nic.GetIPv4Statistics();

            // Calculate the speed of bytes going in and out
            // NOTE: we could use something faster and more reliable than Windows Forms Tiemr
            //       such as HighPerformanceTimer http://www.m0interactive.com/archives/2006/12/21/high_resolution_timer_in_net_2_0.html
            int bytesSentSpeed = (int)(interfaceStats.BytesSent - double.Parse(lblBytesSent.Text)) / 1024;
            int bytesReceivedSpeed = (int)(interfaceStats.BytesReceived - double.Parse(lblBytesReceived.Text)) / 1024;

            // Update the labels
            lblSpeed.Text = nic.Speed.ToString();
            lblInterfaceType.Text = nic.NetworkInterfaceType.ToString();
            lblSpeed.Text = nic.Speed.ToString();
            lblBytesReceived.Text = interfaceStats.BytesReceived.ToString();
            lblBytesSent.Text = interfaceStats.BytesSent.ToString();
            lblUpload.Text = bytesSentSpeed.ToString() + " KB/s";
            lblDownload.Text = bytesReceivedSpeed.ToString() + " KB/s";

        }

        /// <summary>
        /// The Timer event for each Tick (second) to update the UI
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void timer_Tick(object sender, EventArgs e)
        {
            UpdateNetworkInterface();
        }

    }
}

</pre>

<h3>Download</h3>
<p>The Project Source Code: <a href="http://www.m0interactive.com/download/10.00">here</a></p>
]]></description>
		<pubDate>Wed, 06 Feb 2008 02:47:13 -0500</pubDate>
		<guid>http://www.m0interactive.com/archives/2008/02/05/how_to_calculate_network_bandwidth_speed_in_c_.html</guid>
	</item>
	<item>
		<title>CSharp - How to check if a port is binded or not</title>
		<link>http://www.m0interactive.com/archives/2007/12/17/how_to_check_if_a_port_is_binded_or_not.html</link>
		<description><![CDATA[<p>In this post, a very simple application, Remote Desktop Checker, will be given that checks if Microsoft Remote Desktop is working and active. Then I will explain how simple it is to check if a PORT is binded (Active) or not.</p>

<p>The application that I will be presenting here would be Remote Desktop. It is binded on port 3389, and we would like to check if it is active (binded) or not. The application looks like the following: </p>
<img src="/files/downloads/remotedesktopcheck/remotedesktopcheck.jpg" alt="Remote Desktop Check" />

<p><strong>Download here:</strong> <a href="http://www.m0interactive.com/download/9.00"> remotedesktopcheck.zip </a></p>

<h3>How to check if a port is binded or not in C#</h3>
<p>The code is basically the same in any language, you first bind the port, and see if an exception occurs. To do this in CSharp, you do it the following way.</p>
<pre>
/// <summary>
/// Checks if a port which is binded locally is really binded
/// </summary>
/// <param name="port">Port that needs to be checked</param>
/// <returns></returns>
private bool CheckPortIfActive(int port)
{
    try
    {
        // Create a TCP Stream on the current IPv4 Address
        Socket myTestSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

        // Represent an IP End Point to the local computer with the RDP port
        IPEndPoint ipConnect = new IPEndPoint(IPAddress.Parse("127.0.0.1"), port);

        // Bind that port to see if it will connect
        myTestSocket.Bind(ipConnect);

        // Cleanup
        myTestSocket.Close();

        return false;
    }
    catch (SocketException)
    {
        // Exception occured stating that the port is already binded, hence works fine!
        return true;
    }
}
</pre>

<p>That is it, this is how simple it is to check if a port is binded or not. The reason why I created this instead of doing "netstat -an" on command prompt, is because some people do not like command line and think it is too hard. They usually like a simple user interface. That is what I give to my friends that are NOT geeks, so that they could check quickly why their RDP isn't working. </p>

<p>I hope it helps some of you.</p>]]></description>
		<pubDate>Mon, 17 Dec 2007 15:32:57 -0500</pubDate>
		<guid>http://www.m0interactive.com/archives/2007/12/17/how_to_check_if_a_port_is_binded_or_not.html</guid>
	</item>
	<item>
		<title>Software - Microsoft Windows Vista Service Pack 1 SP1 RC released</title>
		<link>http://www.m0interactive.com/archives/2007/12/06/microsoft_windows_vista_service_pack_1_sp1_rc_released.html</link>
		<description><![CDATA[<p>This morning, Microsoft released Windows Vista SP1 to MSDN Subscribers. The update they released is called "Windows Vista Service Pack 1 RC - EXE (Multiple Languages)", and it is 879 MB  in size.</p>

<p>The main goal of this Service Pack 1 is to address the feedback Microsoft has been received from its customers. According to the SPI whitepages Microsoft states "Windows Vista SP1 will deliver improvements and enhancements to existing features that significantly impact customers, but it does not deliver substantial new operating system features." Windows Vista SP1 focuses on 3 main aspects: </p>
<ul>
<li>Quality improvements, including all previously released updates, which address reliability, security, and performance.</li>
 <li>Improvements to the administration experience, including BitLocker Drive Encryption (BDE). </li>
<li>Support for emerging hardware and standards, such as an Extensible Firmware Interface (EFI) and an Extended File Allocation Table (exFAT). </li>
</ul>

<p>Within Quality Improvements, Windows Vista SP1 will include all the updates included that were in Windows Update panel, as well as major security and performance improvents. For example, the main frustrations about Windows Vista RTM was that copying, shutdown, moving files, many crashes, hardware failures, the most known hangings are fixed :)</p>

<p>Many security updates and administration updates. A brand new Hardware Standard which will finally fix hardware compatability issues. Alot of reliability concerns are being solved within this SP1 release such as:</p>
<ul>
<li>Newer Graphic cards (was poor performance)</li>
<li>External monitors</li>
<li>Networking (disconnects for no reason)</li>
<li>Many Printer Drivers</li>
<li>The most known "Sleep and HIbernation".</p>
</ul>

<p>According to the Windows Vista blog, they improved the following performances within Windows Vista:</p>
<ul>
<li>Speed of copying and extracting files</li>
<li>No more delays when joining off domain pc's</li>
<li>Hibernation and Resume time to be active is much faster!</li>
<li>Internet Explorer 7 in Vista Javascript handling has better CPU utilization.</li>
<li>Laptops Batter Life reducing CPU utilizations</li>
<li>And many minor UI improvements</li>
<li>Bandwidth speed within current intranat (network) fixed. It was showing incorrect high speeds.</li>
</ul>

<p>I discussed many benefits as they pretty cool :) But remember, when you plan to install this update, you would have to download a huge 1 GB update file (which is multilingual). Installing this service pack will require a large amount of free disk space. About 7GB for 32bit systems and 12GB for 64bit systems. But don't worry, most of the space will be reclaimed after installation. Just make sure you have that much space!</p>

<p>Thats it :) Inside scoop for Windows Vista SP1 Release Candidate.</p>]]></description>
		<pubDate>Thu, 06 Dec 2007 17:55:19 -0500</pubDate>
		<guid>http://www.m0interactive.com/archives/2007/12/06/microsoft_windows_vista_service_pack_1_sp1_rc_released.html</guid>
	</item>
	<item>
		<title>Software - NBA Live 08 Resolution wide screen Fix Patch</title>
		<link>http://www.m0interactive.com/archives/2007/10/28/nba_live_08_resolution_wide_screen_fix_patch.html</link>
		<description><![CDATA[<p>Most people have a wide screen display and for gaming, it is amazing to own one. I am a long time fan of EA Sports, but these couple of years they do not support wide screen resolutions in their games,they allow 4:3 full screen resolutions but not 16:10 widescreen resolution. This patch that I have created fixes this issue!</p>

<p>Since I bought this game, I was really annoyed that EA does not support innovation and progress in gaming. There is no such thing as a good port in EA's dictionary. I am sorry to say that, but they      keep on porting games from consoles to PC where everything is messed up (not high graphics, no widescreen support, etc). But I really wanted to play NBA 08, so I programmed a patch that will replace "nbalive08.exe" with a one 
that works! </p>

<img src="http://www.m0interactive.com/images/blog/nba08patch/nba08_patch.jpg" alt="NBA Live 08 Resolution Patch">

<p>The patch is programmed in C# in the .NET 2.0 framework. The process is single click simulation, so you don't need to deal with anything else! The original Executable is backed up in case something wrong happens. So far it works with the original build of NBA Live 08. And only tested on my computer. <del>I only allowed 4 widescreen resolution, if others are needed, please place a comment and I will recompile a newer fix.</del> As of the newest update,  you can manually enter your resolution, the default resolution would be shown once application is started.</p>

<p>This patch only changes the resolution of the game from 800x600 to any desired resolution since EA blocked all Widescreen resolutions.</p>

<p>This patch only affects when you play the match, not the Main Menu. And your resolution <b>MUST</b> be set to 800x600 in settings for this to work!</p>

<p>Please leave a comment if this helped or you will need more info! Take care! Have fun playing!</p>

<p><strong>Screenshot Max Default Resolution: </strong> <a href="http://www.m0interactive.com/images/blog/nba08patch/nba08_1280x1024.png">1280x1024</a></p>
<p><strong>Screenshot FIXED Max Resolution: </strong> <a href="http://www.m0interactive.com/images/blog/nba08patch/nba08_1680x1050.png">1680x1050</a></p>
<p><strong>Download here:</strong> <a href="http://www.m0interactive.com/download/8.00"> nba08_patch.zip </a></p>]]></description>
		<pubDate>Sun, 28 Oct 2007 16:00:42 -0400</pubDate>
		<guid>http://www.m0interactive.com/archives/2007/10/28/nba_live_08_resolution_wide_screen_fix_patch.html</guid>
	</item>
	<item>
		<title>Software - How-To compile MPlayer under Windows</title>
		<link>http://www.m0interactive.com/archives/2007/07/15/how_to_compile_mplayer_under_windows.html</link>
		<description><![CDATA[<h3>Introduction</h3><p>How-To install the newest build of MPlayer in Windows directly from SVN. Since MPlayer does not compile the binary every time, the binary version which is downloaded from their website is outdated. So one time, I was going to dump a live RTSP stream from the net, but it was stuck at 2.5% and the dumpstream size was only 16K, which was totally incorrect. The reason why it doesn't work in windows is there is a bug for RealPlayer codecs. As discussed on their webpage (<a 
hreg="http://www.mplayerhq.hu/DOCS/HTML/en/windows.html">http://www.mplayerhq.hu/DOCS/HTML/en/win
dows.html</a>), "If you have a Pentium 4 and are experiencing a crash using the RealPlayer codecs, you may need to disable hyperthreading support." So we have to disable runtime CPU 
detection when compiling it. So we have to recompile the binaries without the '--enable-runtime-cpudetection' parameter flag.  So I will explain how to compile MPlayer in Windows. Compiling it on Linux is relatively simple, look at my <a 
href="http://www.m0interactive.com/archives/2007/07/12/how_to_rip_real_media_rtsp_streams_from_th
e_web_to_mp3_using_mplayer.html">previous post</a></p>

<h3>Installation</h3>
<h4>Download MPlayer from SVN (newest build)</h4>
<ol>
<li>Download SVN utility for Windows. Download it from <a href="http://tortoisesvn.tigris.org/"> 
http://tortoisesvn.tigris.org/ </a>. And Install it!</li>
<li>Lets create a directory to install the source code of MPlayer. Create a new directory anywhere, and go inside that directory.</li>
<li>Right click inside that directory and choose 'Checkout'. Enter this Url of Repository: 'svn://svn.mplayerhq.hu/mplayer/trunk'. Press ok and wait till finishes.</li>
</ol>

<h4>Download MinGW and MSYS</h4>
<p><a href="http://www.mingw.org">MinGW</a> as stated on the website is "A collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do not rely on any 3rd-party C runtime DLLs." </p>

<ol>
<li>Download MinGW from <a href="http://sourceforge.net/project/showfiles.php?group_id=2435"> 
http://sourceforge.net/project/showfiles.php?group_id=2435 </a> By selecting the 'Current' Package then the 'MinGW' Release.</li>
<li>Install it to 'C:\'</li>
<li>Now we need to load the DirectX header files. Download the tar from <a href="http://www.mplayerhq.hu/MPlayer/releases/win32/contrib/dx7headers.tgz"> 
http://www.mplayerhq.hu/MPlayer/releases/win32/contrib/dx7headers.tgz</a></li>
<li>Extract the contents of the tar to 'C:\MinGW\include'</li>
<li>We are done installing MinGW</li>
</ol>

<p><a href="http://www.mingw.org/msys.shtml">MSYS</a> as stated on the website is "A Minimal systems to provide POSIX/Bourne configure scripts the ability to execute and create a Makefile 
used by make."</p>

<ol>
<li>Download MinGW from <a href="http://sourceforge.net/project/showfiles.php?group_id=2435"> 
http://sourceforge.net/project/showfiles.php?group_id=2435 </a> By selecting the 'Current' 

Package then the 'MSYS' Release.</li>
<li>Install MSYS by just running the installer</li>
<li>It will tell you if you want to 'postinstall', select 'yes'</li>
<li>It will tell you where MinGW is installed, type 'c:/mingw'</li>
<li>That is it! MSYS is installed!</li>
</ol>

<p>Now, MPlayer told us that "MOV compressed header support requires zlib, which MinGW does not 

provide by default. Configure it with --prefix=/mingw and install it before compiling MPlayer." 

Let us do that now.</p>
<ol>
<li>Download zlib from <a href="http://www.zlib.net/zlib-1.2.3.tar.gz"> 

http://www.zlib.net/zlib-1.2.3.tar.gz </a></li>
<li>Move 'zlib-1.2.3.tar.gz' to  'C:\msys\1.0\home\[username]', where [username] is the name of 

the computer, in my case it is 'Mohamed Mansour'</li>
<li>Run MSYS by going to clicking on 'START -> All Programs -> MinGW -> MSYS -> msys</li>
<li>Now in the MSYS window, type 'ls'. You will see 'zlib-1.2.3.tar.gz'. Great!</li>
<li>Untar the archive: <pre>$ tar xvfz zlib-1.2.3.tar.gz</pre></li>
<li>Now change to the zlib directory: <pre>$ cd zlib-1.2.3 </pre></li>
<li>Configure zlib with mingw: <pre>$ ./configure --prefix=/mingw </pre></li>
<li>Build zlib: <pre>$ make && make install </pre></li>
<li>We are done compiling zlip into mingw!</li>
</ol>

<p>Now it is time to compile MPlayer :) Yaay. Now MOVE the MPlayer folder from where we 

downloaded at Step one (SVN) to  'C:\msys\1.0\home\[username]'</p>
<ol>
<li>If CD into the 'mplayer' directory.</li>
<li>Now we need to configure without the runtime cpu detection flag type in: <pre>$ ./configure</pre></li>
<li>Now we need to build it by: <pre>$ make </pre></li>
<li>Now what you could do, is download the binary from the website and skip one huge step, and just overright mplayer.exe and mencoder.exe from current directory. And it will work fine :) Or you could follow this huge txt of how to compile codecs from this website <a href="http://www.mplayerhq.hu/MPlayer/releases/win32/contrib/MPlayer-MinGW-Howto.txt"> HOW-TO</a></li>
</ol>
<p>So we are done! Just download the MPlayer directly from <a href="http://www.mplayerhq.hu/design7/dload.html">http://www.mplayerhq.hu/design7/dload.html</a> and overright 'mplayer.exe' and 'mencoder.exe' from what we compiled! And here you have it, a full working Windows Compiled version of MPlayer :)</p>

<p>I hope it helped you as much it helped me!</p>

<h3>Download compiled MPlayer Binary without runtime cpudetection</h3>
<ul> <li>Version: MPlayer dev-SVN-rUNKNOWN-3.4.2. <a href="http://www.m0interactive.com/download/7.00">DOWNLOAD [mplayer-custom-no-runtime-cpudetection.zip]</a></li></ul>]]></description>
		<pubDate>Sun, 15 Jul 2007 17:32:29 -0400</pubDate>
		<guid>http://www.m0interactive.com/archives/2007/07/15/how_to_compile_mplayer_under_windows.html</guid>
	</item>
	<item>
		<title>Software - How-To rip Real Media RTSP Streams from the web to MP3 using MPlayer</title>
		<link>http://www.m0interactive.com/archives/2007/07/12/how_to_rip_real_media_rtsp_streams_from_the_web_to_mp3_using_mplayer.html</link>
		<description><![CDATA[<p> Using Ubuntu 7.04 fiesty (could be done in Windows) I will talk about how to rip Real Media ( rm ) RTSP ( Real Time Streaming Protocol ) streams from the internet to its specified format (rm) or as an audio file. Many users have asked me this questions on newsgroups, forums, and friends, so here is working solution that I have tested it on 3 different RTSP streams. Live Streaming, Streaming with Audio and Video, Streaming with Audio and no video, and Streaming with Audio and Static Image as Video. I hope this will be as help for you as it did for me.</p>

<p> Basically, there are programs out there which cost $40 or more to rip live real media streams from the net easily but 90% of them don't work correctly. I have found MPlayer which is an Open Source application which is amazing. From the website the definition of MPlayer is as follows: "MPlayer is a movie player which runs on many systems (see the documentation). It plays most MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim, and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5 and even WMV movies." The website for Mplayer is <a href="http://www.mplayerhq.hu/">http://www.mplayerhq.hu/ </a></p>

<h3>Intro</h3>
<p>As of writing this post, my MPlayer Version is MPlayer dev-SVN-r23770-4.1.2, make sure you install that. If your using distributions such as Ubuntu, Redhat, Suse, etc (which has MPlayer in its repositories, they do not usually have the latest version. Make sure you have it. And make sure you install all relative codecs. I will explain in brief on how you can install the latest version, how you install the important codecs, and finally how to rip RM (Real Media) Streaming files from the net.</p>
<p>The reason why I am saying that, is because you need to recompile Mplayer since there is a small glitch: "If you have a Pentium 4 and are experiencing a crash using the RealPlayer codecs, you may need to disable hyperthreading support." so we have to recompile MPlayer and omitting the flags '--enable-runtime-cpudetection'</p>
<h3>Install the newest version of MPlayer in Ubuntu 7.04 Fiesty</h3>
<p>This will take a lot of time since we are going to compile MPlayer directly from their repository (subversion) since we need the newest version. Older versions tend not to function correctly.</p>
<p>We need to download all the dependencies of MPlayer before we do this. This is how you download the dependencies in Ubuntu:</p>
<pre>
$ sudo apt-get build-dep mplayer
</pre>
<p>Now we need to download the latest MPlayer version from subversion (svn). You might need to download SVN to do this:</p>
<pre>
$ sudo apt-get install subversion
</pre>
<p>Now it is time to download the contents:</p>
<pre>
$ svn co svn://svn.mplayerhq.hu/mplayer/trunk *
</pre>
<p>CD into that directory after all has been downloaded and we need to compile it:</p>
<pre>
$ ./configure --enable-largefiles --enable-gui
$ ./make
</pre>
<p>NOTE: You can install it, but if you have mplayer already installed, your ubuntu updates will over right this current new build with the old one when updating. So it would be best to rename "mplayer to mplayer2" or something. And note as well, we omitted the '--enable-runtime-cpudetection' flag. That is the main reason why we are recompiling from SVN.</p>
<pre>
$ cp mplayer mplayer2
</pre>
<p>That is it, MPlayer is installed! Now it is time to configure it by installing the codecs</p>

<h3>Install MPlayer Windows Media and Real AudioCodecs in Ubuntu</h3>
<p>The codecs are not bundled with MPlayer due to copyright issues, so you have to download the following codecs (I am listing all the good ones in case you want to rip other streams rather than Real Media:</p>
<ol>
<li> gstreamer0.8-plugins </li>
<li> gstreamer0.8-lame  </li>
<li> gstreamer0.8-ffmpeg  </li>
<li> lame  </li>
<li> sox  </li>
<li> ffmpeg  </li>
<li> mjpegtools  </li>
<li> vorbis-tools </li>
<li> libdvdcss2  </li>
<li> w32codecs </li>
</ol>
<p> Now, the first 8 are bundled with Ubuntu or any other distribution by just using the repository, in Ubuntu I type the following command the starting codecs:</p>
<pre>
$ sudo apt-get install gstreamer0.8-plugins gstreamer0.8-lame gstreamer0.8-ffmpeg lame sox ffmpeg mjpegtools vorbis-tools
</pre>
<p>Now, we have to install the important Windows codecs which are libdvdcss2 and w32codecs. We have to edit our repository sources and add the 3rd party (trusted) source to download the codecs. To do this, follow the following:</p>
<pre>
$ echo "deb http://packages.medibuntu.org/ feisty free non-free" | sudo tee -a /etc/apt/sources.list
$ wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update
</pre>
<p>Now since we added the new repository, we could install the codecs using apt-get.</p>
<pre>
$ sudo apt-get install w32codecs libdvdcss2
</pre>
<p>Now we are done. The necessary codecs are installed. Lets learn how to RIP!</p>

<h3>How to rip Real Media RTSP Streams to MP3</h3>
<p>By theory, whatever you listen you can save, correct? So, whatever we listen or 'stream' we could save it. So, if we have to listen to a 25 minute video or audio, it takes 25 minutes to rip it.</p>
<p>First of all, we need download the audiostream and save it on to the hard drive. I will be using a real media file from Stanford which uses AUDIO + Static Image as its format. We do this at first, to dump all audio on to disk, this will take 50 minutes, since the length of the streaming file is 50minutes. Within the terminal screen, type in the following:</p>

<pre>
$ mplayer -ao pcm rtsp://vodreal.stanford.edu/opa/philo/070325.rm
</pre>

<p>While downloading, you can open another terminal screen window, and check if it is really downloading by doing:</p>
<pre> 
$ ls -lh audiodump.wav
-rw-r--r-- 1 m0 m0 55M 2007-07-12 21:11 audiodump.wav
</pre>

<p>Notice the audio dump is in a wav format, this format will be huge, around 550MB for 50minutes, so we have to encode it to MP3.</p>

<h3>How to Encode WAV to MP3 using LAME</h3>
<p>The answer is quite simple, we just do this command:</p>
<pre>
$ lame -preset-standard audiodump.wav finally_my_audio.mp3
</pre>
<p>You can play around with the encoding with fooling around with the advanced options, but that is basically it, our mp3 file ripped by an RTSP stream using Ubuntu, same thing could be done in any OS (OSX, Windows) since MPlayer is a cross platform application!</p>

<h3>Conclusion</h3>
<p>I will repeat my steps in sequential order:</p>
<ol>
<li>Install MPlayer and LAME</li>
<li>Install Codecs for MPlayer</li>
<li>Download Audio Dump File: mplayer -ao pcm URL</li>
<li>Convert audiostream.wav to .mp3: lame -preset-standard audiodump.wav newfile.mp3</li>
</ol>
<p>I hope that will solve all your problems, if not, leave a comment and I will help you as much as I can! Good Luck</p>]]></description>
		<pubDate>Fri, 13 Jul 2007 00:16:23 -0400</pubDate>
		<guid>http://www.m0interactive.com/archives/2007/07/12/how_to_rip_real_media_rtsp_streams_from_the_web_to_mp3_using_mplayer.html</guid>
	</item>
	<item>
		<title>Life - MDS Nordion Ottawa Hospital Race Weekend Challenge</title>
		<link>http://www.m0interactive.com/archives/2007/04/21/mds_nordion_ottawa_hospital_race_weekend_challenge.html</link>
		<description><![CDATA[<p>On May 25 to 27, 2007, I'm taking part in Ottawa Race Weekend. As part of this event, I am raising pledges through the MDS Nordion Ottawa Hospital Race Weekend Challenge.</p>

<img src="http://www.ohfoundation.ca/images/mastheads/m_nationalcapitalrace_e.jpg"  alt ="race weekend" class="applyborder"/>

<p>Please help me support The Ottawa Hospital by sponsoring me for this event. Your pledge will help our Hospital overcome urgent challenges like overcrowded facilities, outdated equipment, and a rapidly growing and aging population. To date, fundraising efforts during Race Weekend have brought in more than $4.5 million for the Hospital.</p>

<img src="http://www.ottawahospital.on.ca/img/p_oh_logo_e.gif"  alt="Hos" style="float:right" />

<p>If you'd like to contribute to this important cause, there are two easy ways to give:</p>

<ol>
<li>Visit my sponsor page, to go to my personal donation page and make a secure online donation using your credit card. My sponsor page is <a href="http://tinyurl.com/yr9jz2"> http://tinyurl.com/yr9jz2</a></li>

<li>Or join our team to race! Team DISCOVER. You could donate and  Join as well! Our team page is the following: <a href="http://tinyurl.com/2xrg7o">http://tinyurl.com/2xrg7o</a>
</li>
</ol>

<p>Please note that the Foundation will share your name and the amount of your donation with me.</p>

<p>If you would like your name and donation to remain anonymous, please call 613-761-4295 to make your donation.</p>

<p>Every little bit helps. Many thanks for you support.</p>

<p>For more information about this event or The Ottawa Hospital Foundation, visit www.ohfoundation.ca.</p>
]]></description>
		<pubDate>Sat, 21 Apr 2007 19:49:43 -0400</pubDate>
		<guid>http://www.m0interactive.com/archives/2007/04/21/mds_nordion_ottawa_hospital_race_weekend_challenge.html</guid>
	</item>
	<item>
		<title>Technology - Google introduces Real-Time traffic Nothing new!</title>
		<link>http://www.m0interactive.com/archives/2007/03/01/google_introduces_real_time_traffic_nothing_new_.html</link>
		<description><![CDATA[<p>Google recently released their new maps service which adds real-time traffic to their existing product. The hype of the internet laid their eyes on that, but I don't get what the big deal is. Yahoo and Live have had this feature for ages. Not only traffic but with a complete set of tools with incidents, traffic information, constructions and many more. 
</p>

<h3>Info</h3>
<p>I am not here to flame any company, I highly respect all companies, especially Google! Google has changed the way we look at the modern internet age. I am here to inform that, not only Microsoft takes ideas from companies. Big companies like any big open source company, as well as Google has taken ideas from other companies. That is the beauty of competing. For instance, Google has taken the best of Yahoo and the best of Live into their existing product, but personally, it still needs more work. Actually a lot more work. They have the power and resources to prove to the world to think of something new and better</p>

<p>Microsoft Live, and Yahoo Maps had traffic for a long time now. So I don't understand all this hype that Google has Traffic enabled and their interface is very very poorly done! </p>

<p>Yahoo shows small circles along the roads so you can see the street names, have details about incidents and "Live traffic" is actually a checkbox, so it doesn't look confusing like in Google Maps. Google Maps just placed the exact same toggle button which took me some time to find out its a toggle. </p>

<p>Like Microsoft, Yahoo shows details about the colors and the time when the data was updated. But, Google has no legend about this. Like Microsoft, Google has roads colored. Like Microsoft they have an overview traffic view from a higher level. Like Yahoo, they have many many other similarities.</p>

<p>The point is, not only Microsoft is getting ideas from other companies, but Google is doing a hella great job doing the same! Even open source communities doing the exact same thing, well I do the same thing as well :p That is how we improve on technology, we find something which is great and we improve on top of that!</p>

<p>I hope Google improves on top of their existing product, cause I don't see anything special from it other than the Google logo! </p>

<h3>Criticism</h3>
<p>The only feature I enjoy from Google Maps is their ability of scrolling. When you start scrolling, a target icon shows on the map which assists the user that the scrolling will appear in that area. The other map services scroll in the center, which in my opinion, is not efficient. Other than that scrolling, the other map services (Especially Yahoo) are better in terms of quality and content.</p>

<p>Yahoo has bad scrolling capabilities, but their flash asynchronous map web application is far the fastest and real-time as it gets. Their traffic incident is superb, and their travel direction data is absolutely the best. Their directions are based on the shortest path, and as well as the shortest time same with Microsoft. They were trustworthy since the 90's from MapQuest. Other than that, they should improve on their scrolling and interactions with the map, maybe add some Asynchronous JavaScript from the browser to the Flash Application. Other than that, it is my #1 source for maps.</p>

<p>LIVE Maps is totally unique. They have a fully interactive map application. You can interact with it as if your interacting with an application. You can pinpoint your existing location from your pc or laptop via GPS or IP. Microsoft imitated Yahoo maps to add this powerful feature for finding the shortest path or shortest time route which is super useful. You can add objects as well as information such as notes, plans on the existing map. The extra gadgets on the screen is movable as well which make its interface very unique and in my opinion one of the best.</p>


<h3>Screenshots</h3>

<p>Google: </p>
<img src="http://www.m0interactive.com/images/blog/googlemapstraffic/google-maps.jpg" alt="Google Maps" />
<a href="http://maps.google.com/maps?f=q&hl=en&q=Manhattan,+NY&ie=UTF8&om=1&z=12&ll=40.760001,-73.980217&spn=0.143807,0.487518&iwloc=addr&layer=t" > LINK </a>

<p>Yahoo: </p>
<img src="http://www.m0interactive.com/images/blog/googlemapstraffic/yahoo-maps.jpg" alt="yahoo Maps" />
<a href="http://maps.yahoo.com/index.php#q1=MOUNTAIN+VIEW%2C+CA+&trf=1&mvt=m&lon=-122.052784&lat=37.395937&mag=6" > LINK  </a>

<p>Microsoft: </p>
<img src="http://www.m0interactive.com/images/blog/googlemapstraffic/live-maps.jpg" alt="Microsoft Live Maps" />
<a href="http://maps.live.com/default.aspx?v=2&cp=37.390073~-122.054157&style=r&lvl=12&tilt=-90&dir=0&alt=-1000&scene=5872525&trfc=1"> LINK  </a>]]></description>
		<pubDate>Thu, 01 Mar 2007 11:22:19 -0500</pubDate>
		<guid>http://www.m0interactive.com/archives/2007/03/01/google_introduces_real_time_traffic_nothing_new_.html</guid>
	</item>
	<item>
		<title>CSharp - Imagine Cup 2007</title>
		<link>http://www.m0interactive.com/archives/2007/02/15/imagine_cup_2007.html</link>
		<description><![CDATA[<p>Hey, so if your are involved with software design you should seriously think about entering the Imagine Cup, a contest run by Microsoft. </p>

<p>The web site is <a href="http://www.imaginecup.ca/"> http://www.imaginecup.ca/</a>

<p>Entering student design contests is an excellent way to gain contacts, improve your Resume. And hey, you might even win a free trip, full expenses paid, swank hotel, and etc to Toronto for participating in the Semi-Finals.
</p>

<p>So get your programming cranking and place University of Ottawa in the list. Good Luck</p>

<p id="flashimaginelogo"></p>
<script type="text/javascript">
var FOIMAGINE = { movie:"http://imaginecup.ca/Flash/Spotlight.swf",width:"625",height:"450",majorversion:"6",build:"0" };
UFO.create(FOIMAGINE,"flashimaginelogo");
</script>]]></description>
		<pubDate>Fri, 16 Feb 2007 02:24:58 -0500</pubDate>
		<guid>http://www.m0interactive.com/archives/2007/02/15/imagine_cup_2007.html</guid>
	</item>
</channel>
</rss><!-- m0|XML Creator v1 -->
