The Linux Journey

Getting Started

- What is Linux?
- Installing Ubuntu

Site Navigation

- Home
- About
- Recent News
- Downloads

Account

- Login
- Register
- Logout

Search



Other Links

free search engine website submission top optimization
News

Converting Videos to iPod Format - Easy Way - April 6th, 2008 18:38:46

A couple of posts ago I wrote about a program I created to change the text color of the Gnome panel. Well I had so much fun making that program I decided to make another! This time around I created a program that converts your videos to a format the iPod can read. Introducing my new creation iPod 2 Video Format! (Click the link to download)

You may remember an earlier post where I described another way this can be done, but that method required editing text files and using the terminal every time you wanted to convert a new video. My newly created program uses the same script we created last time (included with the download), but gives us a nice graphical user interface to use instead. Please note, though, that because we are still using the same script you still need a fully enabled ffmpeg installed for this to work. Follow my instructions Here if you need help with this. Also be aware that this program will probably only work in Gnome because it requires the Gnome Terminal.



I think the program is pretty straight forward. Simply click the 'Browse' button, search for the file you want to convert, change the output file name to whatever you want, and click convert. When you click convert you should see a window pop up that looks like this:



This is just ffmpeg doing the dirty work for us. Leave this window open so the file can finish converting. This could take anywhere from 20 minutes to a couple hours to finish depending on the length of the movie and the specs of your computer. When it is finished the final video will be saved to the same folder as the converter. If there was already a video in this folder with the same name it will be overwritten with the new one, so be careful. If you did not see this window pop up after you hit the convert button then an error occurred. Possible reasons are you did not give it a valid movie to convert, or you don't have ffmpeg installed correctly.

Please note that this program converts videos but doesn't actually put the video onto your iPod. You will need another program to do this. Personally I use gtkpod.

Comments (0)


Use Xbox360 Controller as Joystick - April 3rd, 2008 21:31:58

I've found using an Xbox 360 controller as a joystick to be an awesome convenience. Even if you don't own an Xbox it may be worth going out and buying one of these controllers soley as a computer joystick. It sure is fun being able to start up my favorite emulators, like Mupen64, and being able to play it with my wireless controller. Anyway, enough of my rambling. Lets get to it.

First of all if you plan on using a wireless Xbox 360 controller you are going to need the Xbox 360 Wireless Gaming Receiver for Windows. Don't let the "for Windows" part scare you. I actually use this myself and it works like a charm. Its only around $20, so it won't put too much of a dent on your wallet.

Ok to begin we need to make sure you have the right packages to be able to install the new drivers. Type or copy and paste this command in the terminal:

sudo apt-get install linux-headers-`uname -r` build-essential automake1.9

Basically this command is just checking you have what you need, and if you dont it will install it. It will probably prompt you to enter your password also. Type it in and press Enter. Before we can go get those drivers to make the controller work we're going to need to make a folder to put them in to make things a little easier on us. Go to you home folder and create a new folder called xpad, or simply copy this into the terminal which does the same thing:

cd
mkdir xpad

The 'cd' command takes your home directory and the 'mkdir xpad' command creates a directory called xpad.
Now we need to go to that directory we just made and download the drivers into it. The easiest way to do this is to enter these commands into the terminal:

cd xpad
wget "http://xbox-linux.cvs.sourceforge.net/*checkout*/xbox-linux/kernel-2.6/drivers/usb/input/xpad.c"
wget "http://xbox-linux.cvs.sourceforge.net/*checkout*/xbox-linux/kernel-2.6/drivers/usb/input/xpad.h"


The 'cd xpad' command takes you to the xpad directory we created and the 'wget ...' commands download those files into that directory. The same thing could be accomplished by going to those 2 websites, clicking File->save as, and saving them into your xpad folder.

We still need one more file before we can get our xbox controllers going. This is a Makefile which basically will set things up for us. You are going to have to create this file yourself, so go to your xpad folder, right click, and click Create Document -> empty document. Name this document "Makefile". You can find your xpad folder by clicking on the main menu of the Gnome panel. Its under Places->Home folder, and then double click on the xpad folder. in the Makefile we created you will need to copy this into it:

KERNEL_PATH?=/usr/src/linux-headers-$(shell uname -r)

EXTRA_CFLAGS=-I$(shell pwd)

obj-m:=xpad.o

all:
        $(MAKE) modules -C $(KERNEL_PATH) SUBDIRS=$(shell pwd)

install:
        cp -f xpad.ko /lib/modules/$(shell uname -r)/kernel/drivers/input/joystick



MAKE SURE THE TABS ARE SILL THERE WHEN YOU COPY THIS. The Makefile needs to be formatted exactly as shown here.

Alright hopefully everything has gone to plan so far. Go back to your terminal and make sure you are still in the xpad directory. Just to be sure you can copy this into it:

cd
cd xpad

Almost done! To finish up copy this to the terminal:

make
sudo make install
sudo modprobe -r xpad
sudo depmod -a
sudo modprobe xpad


That will compile the module, intall it, take out the old one if any, and load up the new one. You should now have a working Xbox 360 controller joystick in Linux. If you got an error during any of the steps you probably missed a step. If at any point you restart your computer and it no longer works just run the last 3 commands in the terminal again (the modprobes and depmod).


Comments (0)


Gnome Panel Text Colors - Easy Way - March 29th, 2008 04:00:31

A couple of days ago I wrote about How to change the text color on your Gnome Panel. If you happened to read that tutorial then you may have noticed that getting the colors changed was a little more involved than it seemed like it should be. Because of this, I decided to try and make things a little more user friendly, so I created a program that does all the hard work for you. Introducing my newly created program The Gnome Panel Text Color Changer! No need to compliment me on the creative name I gave it.



Its quite easy to use. Simply use the three sliders to adjust the colors until you get it how you want. When you are done all you have to do is click the set button at the bottom. As you move the sliders around, the color will be represented in hexadecimal form at the bottom. If you know what this number means then you can edit it yourself and then hit set.

Ok now for some warnings. This is one of my first attempts at making a program with a graphical user interface in the programming language C++. As far as I know there might be other programs out there that accomplish the same thing, but oh well because I pretty much just made this to practice some programming. I've only taken basic programming classes before, so by no means do I fully understand what I'm doing. Haha if it makes you feel any better the program works like a charm for me, but, of course, I can't guarantee its going to work flawlessly for everyone else. The download is simply an executable in a zip file, so once you get it extracted it should run if you just double click it. If you have any problems just leave me a comment and I'll see what I can do about fixing it. If you can't get the program to work you can always go back to the hard way of changing the colors.


Comments (0)


Page: | 1 | 2 | 3 ...