Sunday, December 4, 2011

Create, Edit Subtitles Files for Movies

Most of the time I have encountered a major problem. When I watch movies, some subtitle tracks are not align with the time. So it is hectic if you have only that subtitle track is available. So here I found a tool. It is great. You can do any customization you want.It is Subtitle Workshop.

Here are the links;




Monday, November 21, 2011

Download YouTube videos easily in the formats : MP4,FLV,3GP, WebM etc.

Most of the time I had the problem, the YouTube downloader software doesn't work properly. Also some times IDM is going wild. So most of the time I was in trouble while downloading some videos from you tube. So after some look-up here and there I found KeepVid (http://www.keepvid.com/)  is a good solution for download videos from streaming sites consistently. So guys try it out. You can use it freely on line.  It can Download videos fromYoutube, GoogleVideo, Break.com, Dailymotion, Blip.tv, Groper, Current TV etc also it can Download videos directly from the video webpage.
Steps of use :
  • To use this you have to install java.
  • Then copy your url of video.
  • Paste it in the KeepVid Site.
  • It will give you list of download options.
  • Here you go.

Sunday, November 20, 2011

ffdshow : A DirectShow and VFW codec for decoding/encoding many video and audio formats


This is really interesting. Try it out. The ffdshow is DirectShow and VFW codec for decoding/encoding many video and audio formats, including DivX and XviD movies using libavcodec, xvid and other opensourced libraries with a rich set of postprocessing filters.You can do so many things with this. It is all open source.



Visit : http://sourceforge.net/projects/ffdshow/


Friday, November 18, 2011

Inductive Loop Sensor & Dynamic Traffic Control for Intelligent Traffic Light System

Our Intelligent Traffic Light System is capable of changing priority level of the roads according to their traffic level. To measure the traffic level we have several mechanisms.
  • Image Processing
  • Pressure sensors, give reading when pressure changes by the vehicles
  • Inductive Loops
From the above methods we choose inductive loop.It is build on the concept of inductance change of a coil when a metal object come closer.You know that when you send electrical current through a wire, it generates a magnetic field. For a coil this electromagnetic field is high.You can change the inductance of the coil and change the electromagnetic flux by introducing additional conductive materials into the loop's magnetic field. This is what happens when a car pulls up to the intersection. The huge mass of metal that makes up your car alters the magnetic field around the loop, changing its inductance. 


So we have made a coil develop the inductive loop.We have some kind of metering device to meter the voltage level change in the coil. After some reading we have found this article, it really help to achieve our target.

In the above  circuit diagram we can connect the LED's positive pin to PIC device to get the input. So using that we can easily develop a algorithm to achieve dynamic traffic controlling.

References : Above diagrams and pictures are extracted from the following resources on the purpose to gather all the knowledge in to one place for learn easily.
  1. http://www.fhwa.dot.gov/publications/publicroads/98septoct/loop.cfm
  2. http://auto.howstuffworks.com/car-driving-safety/safety-regulatory-devices/red-light-camera1.htm
  3. http://www3.telus.net/chemelec/Projects/Loop-Detector/Loop-Detector.htm

8*6 LED Matrix for Intelligent Traffic Light System

Next Task was to make the controlling mechanism for traffic lights. Major problem was, there are not enough I/O pins in the PIC to control each bulb of the traffic light. So we choose small mechanism to avoid that problem. That is the 8*6 LED Matrix. To explain this concept I will use a article publish by electronic department of our university. (http://www.ent.mrt.ac.lk/web/knowledgebase/uc/5.3.pdf) . Here we use the mechanism used to light up pixels in a LCD display. I will explain the steps to light up all the 40 LEDs using this mechanism at same time.

     
  • To light a single LED in this matrix we have to give +,- voltages to its pins. You can notice that if we set any pin in PORTB to logic 1, it will give + voltage to LED's + pin. 
  • Then How we can give the ground connection to the - pin of the LED. For that we have to turn on the D400 transistor for that particular column.
  • After that particular LED will be light up. For example we can use this code to light up all the LEDS RA0 column,
          PORTB=0b11111111;
          PORTA=0b00000001;
  • To light up all the LEDS RA1 column,
          PORTB=0b11111111;
          PORTA=0b00000010;
  • To light up all the LEDS RA2 column,
          PORTB=0b11111111;
          PORTA=0b00000100;
  • To light up all the LEDS RA3 column,
          PORTB=0b11111111;
          PORTA=0b00001000;
  • To light up all the LEDS RA4 column,
          PORTB=0b11111111;
          PORTA=0b00010000;
  • To light each other LED in RA0 Column you can use this code,
          PORTB=0b10101010;
          PORTA=0b00000001;
  • Like that we can control each LED in a column using PORTB pins.But you can identify that you cant light up RA0 columns 0the row LED and off the   RA1 columns 0the row LED at the same time. Because we use PORTA pins to choose the column and PORTB to choose the row.
  • So how can we light up all the columns at same time. We use the weakness of human eye to this.If we light different columns at high speed you cant see a difference you will notice that all the LEDs are lighting at the same time.
  • Here is the code for that,
    while(1){
          PORTB=0b10101010;
          PORTA=0b00000001;
          PORTB=0b10101010;
          PORTA=0b00000010;
          PORTB=0b10101010;
          PORTA=0b00000100;
          PORTB=0b10101010;
          PORTA=0b00001000;
          PORTB=0b10101010;
          PORTA=0b00010000;
    }
  • In the same mechanism we implement the control system for our traffic light system. Below diagram will show you how we implement that.

    Bluetooth Wireless Communication method for Intelligent Traffic Light System

    • We choose Arduino Bluetooth Module Slave Wireless Serial Port 4P for our wireless communication purposes (http://www.ebay.com/itm/Arduino-Bluetooth-Module-Slave-Wireless-Serial-Port-4P-/150653185968?pt=LH_DefaultDomain_0&hash=item2313a12fb0).



      To use this device in the mood working 100% correct, we have to use a resistor divider to reduce the operating  Because PIC18f452's RX,TX operating in 5V-0V range but in this Bluetooth reviver it operates in 3.3V to 0V range. So we put up a voltage divider between the Arduino Bluetooth Module Slave Wireless Serial Port and the PIC's RX, TX pins. After setup according to the below diagram Bluetooth Module will start working. When you search for new Bluetooth it will appear as a other type of device.You can couple the device with your laptop using its embedded pin code. After that your PC will have a serial port open via Bluetooth. you can easily communicate with that.

    Choosing suitable micro controller for Intelligent Traffic Light System

    • Our first challenge was to find a suitable micro controller for this system. For this we consider following facts,
      • It have to control unknown number of lights belong to traffic lights. Most of the time it will more than 30.
      • It have to communicate with a laptop via Bluetooth or other wireless communication method.
      • It have to read unknown number of sensor values, most probably  less than 10.
      So considering above facts we choose the micro controller PIC 18f452 (http://www.microchip.com/wwwproducts/devices.aspx?ddocname=en010296) To fulfill the above aspects we have found some mechanisms.

    Inteligent Traffic Ligth System

    For the Semester 4 of the Computer Engineering Department of  University of Moratuwa, we learn a subject call Micro-Controllers and Applications. The aspect of this to learn the way of handling Micro-Controllers in their limited environment. For the project of this subject some of we have been asked to build a intelligent traffic light system.To describe it's functionality read this,

      
     
    • Control of the road traffic on junctions :
      Up to maximum of 4 roads are intersecting with 4 pedestrians crossings in each road, near the junction. This will be the extreme, but system will be able to control all the other subset of junctions.
    • Dynamic priority level for roads :
      This system will be able to sense all the vehicle movements through the junction.After sensing these movements, the system will adjust its timing parameters automatically to give the higher priority to roads which have much traffic level.
    • Ability to configure system easily after installation:
      After installing the traffic light system in the roads, the configurations can be changed by plugging a simple interface to the system.
    • Manual Override:
      When a Police Officer does traffic controlling, he will be able to control all the traffic lights using a remote control device.
    • Fail Safe :
      If something goes wrong, the system should be able to move into state which will stop all the movements of vehicles and people, which will cause further damage.
    • Energy Saving:
      Should be able to control the intensity of the lights in the night and day time.
    • Automatic roll back to auto mood:
      If system has been changed to manual mood and if there are no commands issued to the system for a particular time period it switches back to auto mood.
    • Can be configuring according to the place of installation:
      The abstract system is constructed to install in a junction which has 4 roads. But after doing few steps of configuration it can be used in any kind of place.
    Our design was done based on the above functionality. I like to describe the steps we go through, First of all the below diagram shows our basic block diagram of the design.
























    Thursday, November 3, 2011

    Think twice before buy A Laptop or A PC


    When I went to buy a laptop these days, I identified that there is a serious issue with some Laptops and PCs. So I thought that I have to share what I found. There is a Chipset circuit design issue identified in the Intel® 6 Series Chipsets. It is better to understand what is going on before you buys a new one.

    So before you buy a Laptop or PC please read this.
    http://www.intel.com/support/chipsets/6/sb/CS-032521.htm

    Or before you buy your laptop or PC run CPU-Z on the machine and check the version of the south bridge. If it is B2 you are in trouble.



    Also read ,
    http://news.softpedia.com/news/How-to-Find-Out-if-Your-Sandy-Bridge-Motherboard-Is-Affected-by-Intel-s-SATA-Bug-182252.shtml

    Sunday, October 16, 2011

    How to do a good presentation.

    In this article I will highlight one major aspect you have to understand before you do a presentation. That is identifying the audience. There are four major types of people in a audience.
    1. Amiable : 
      Devoted, consistent, dependable, and loyal, the Amiable is a hard worker and will persevere long after others have given up.
    2. Driver :
      The Driver is a high achiever – a mover and shaker who is definitely not averse to risk.
    3. Expressive :
      The Expressive, a verbally adept personality, is engaging, accommodating,supportive of others, persuasive, socially adept, and relationship- rather than task-oriented.
    4. Analytic :
      The Analytical is polite but reserved, logical, fact- and task-oriented.
    You have to identify following qualities of them to do a good presentation. Because they will search those qualities in you and your presentation . If you doesn't show the qualities they like,  nothing will happen.....

    Amiable
    • patient
    • loyal
    • sympathetic
    • team person
    • relaxed
    • mature
    • supportive
    • stable
    • considerate
    • empathetic
    • persevering
    • trusting
    • congenial
    Expressive
    • verbal
    • motivating
    • enthusiastic
    • convincing
    • impulsive
    • influential
    • charming
    • confident
    • dramatic
    • optimistic
    • animated
    Driver
    • action-orientated
    • decisive
    • problem solver
    • direct
    • assertive
    • demanding
    • risk taker
    • forceful
    • competitive
    • independent
    • determined
    • results-orientated

    Analytic
    • controlled
    • orderly
    • precise
    • disciplined
    • deliberate
    • cautious
    • diplomatic
    • systematic
    • logical
    • conventional
    You can find your group using these quizes,


    http://www.peterursbender.com/quiz/quiz.html


    References :
    1. Peter Urs Bender's Guide to Strengths and Weaknesses of Personality Types, http://www.peterursbender.com/quiz/swtable.html
    2. If You Only Understood Your Customer's Personality Style,  http://www.ahfx.net/weblog/37

       


    Saturday, June 18, 2011

    Migrating from localhost to Web Server - Joomla Guide

    As I experienced, there is a tricky thing in the process of creating and hosting web site Using Joomla. That is hosting a web site in free or commercial web hosting places.
    Most of us are used to create the web site in the localhost using Joomla, and when we are going to host the site we migrate to the web server. But that is not the 100% efficient way. In this article i will give you some point which makes your life easy.

    • Creating a hosting place for your Web Site.
    In this I will give you some places where you can host your web site for free. Ex- WWW.0fees.net, WWW.000webs.com. First of all you have fill the registration forms in these sites and you will have you web hosting account. For example I did it with 0fees. Then you will get a access to your control panel of your web server. There you can configure all the things, like database, sub domains, FTP etc.

    • Start the development of your web site in the hosting place.
    This will be the most efficient way of development as I think. Because there will be upload times, but no configuration of files. You can use some kind of FTP client(FileZilla, Win FTP, SSH Client) to upload your Joomla fresh copy to the folder which holds the files in web server. To log in using FTP you have to use Username, Password, Server provided by the hosting place.


    After uploading fresh copy you can install Joomla at the web server, Using the details provided by Hosting Place. Like SQL database username, password etc.

    • Migrating from local host to Web Host.
    If you have already create your web site in localhost, you have to follow some tricky steps. First of all you have to go the local folder where Joomla resides. Get a copy of that to a another place. In side that you can find a file called configure.php, open that using a text editor. In that you can find lot of parameters of Joomla. You have to edit some of the them to work with hosting place.
    Before that go to your control panel of the hosting site and create a Database using the name which you have entered in the installation process of Joomla. But you will get the database name appended by a your username. Get it.
    In the configure.php edit following parameters using particular details. /home/vol9/0fees.net/fees0_8291948/htdocs/ is example path of your folder of hosting in the server.


    var $log_path = '/home/vol9/0fees.net/fees0_8291948/htdocs/logs';
    var $tmp_path = '/home/vol9/0fees.net/fees0_8291948/htdocs/tmp';

    var $dbtype = 'mysql';
    var $host = 'Your SQL Host Name';
    var $user = 'Your User Name';
    var $password = 'Your Database Password';
    var $db = 'Your Database Name';
    var $dbprefix = 'jos_';

    After editing save the file. Then using a FTP client upload all the files to hosting folder of your server. Do not upload Joomla folder, all the files and folders inb side it.
    Then go your phpmyadmin of local host, and go to your Joomla database. In side that go to export tab.


    Create a SQL file of your database using this. After that go to phpmyadmin of you hosting site. (You can find it in the control panel) Import the database there. After that your are done. Now you can go to your URL.
    That is all, I think i give you some help.