Archive for January, 2008

OpenParachute reaches v0.1 stable

So just to be honest, this happened about a week ago and I’ve been neglecting to post about it with interest in other things and being busy. So I have finally reached a point where the library is stable, its not very feature rich and it has some bugs, but it works. I posted source code archives in various formats on the libop’s project page. Since then I’ve been working on some things on my ToDo list for libop which I posted a couple posts back.

libop_sprite_alpha.png

I was also able to get alpha blending (transparency) working on some objects, I used it on the sprite in the demo game and it works great, as you can see (thats a snapshot from 0.2 SVN). If you checkout the latest revision from SVN and compile it, you can check it out. Im also working on text rendering but its not quite working yet. Some other things I have planned for the next few releases are interactive menus and some OpenGL acceleration thrown into the mix. Im also still working on the audio and will be separating all audio functions and making them their own entity as well as adding some more functionality to the audio layer, like pause and stop, and maybe some transition effects, we’ll see. If you have any questions or comments please feel free to email me or leave a comment.

Filed under:

Convert your music from mp3 to ogg

24-01-2008 Alec Hussey 1 Comment

Well I’ve been wanting to convert all my music from mp3 to ogg and quickly found that there was no real easy way to do it. So I made a small command line utility to do exactly that. Because I really hate mp3 and proprietary formats because they are such a pain in the butt and in the US (as far as I know) they are illegal or so I thought. Well anyway, I was just reading reading the topic about how many songs you have in your library and I think everyone who replied to that topic had their entire library in mp3 and Im sure that alot of people would like to support the open format, if it were only easier.

So I called my utility am2o (auto mp3 to ogg) and its written in PHP (no it does NOT require a webserver what so ever, its a command line utility). I purposely wrote it in PHP to show people that PHP is just like any other scripting language and to debunk the misconception that its only for websites. It also wraps around ffmpeg to do the transcoding.

My personal need for it was to take all the music that I download from gnutella (frostwire/limewire/gtk-gnutella/etc) and convert it to ogg and put it in my music directory and when you download alot of mp3′s you keep them in the same folder and when you rerun the command you dont want to re-transcode all of the music thats already transcoded, so it supports filename caching for each unique directory. You may optionally disable caching as well.

To run it you need the ffmpeg and php5-cli packages from the repository. You can get them from Synaptic, or by command line.

sudo apt-get install ffmpeg php5-cli

The package itself is attached to this post. To install it just unpack the tarball then run:

cd am2o
sudo ./install.sh

Examples on how to use the program are included in the readme but heres one for a quickstart, its really easy.

am2o -i ./Shared -o ./Music

We use -c to enable filename caching (this flag is require, to disable use -c=no), and ./Shared is our input folder (where we will pull mp3′s from) and ./Music is the output folder (where we put the transcoded ogg’s).
NOTE: As of version 0.2, the -c flag is no longer required and will automatically default to yes if left out.

If you have a big music library that you are transcoding, and you have a multi or dual core CPU system, I dont recommend running multiple instances as this will probably cause it to clash if you are running it on the same directories. Maybe in the future, if people like this tool, I will add support for multiple ffmpeg instances to encode multiple files at a time.

I hope this tool inspires you to convert to and use ogg to support it as an open format.

[Edit]
I have released am2o v0.2 with support for lossless flac and flexible flags and arguments. You may use all flags/arguments in any order but you must use the -i and -o flags to specify input and output directories respectively. The default transcode format is ogg, if you would like to transcode to flac, you must use the ‘-f flac’ flag. Refer the ‘-h’ or the readme for more information.

For all Windows and Mac users, this program was designed to run on Linux/Unix (*BSD, Solaris, etc) systems. It will run on Windows and Mac as long as you have the PHP interpreter and ffmpeg installed, and it must be run from a command line.

Download am2o v0.1
Download am2o v0.2

Filed under:

Partially working parachute

Okay, so I’ve been screwing around trying to get my (2D only at the moment) game development framework called OpenParachute (libop) working. So being quite frustrated with “Segmentation fault (core dumped),” I went on the Ubuntu forums and asked for help and also tried out a awsome C/C++ development tool (exclusive to linux) called valgrind. With the combination of the two I was able to finally get a working development version of my library. I do have a screenshot of the “demo game” that comes with the source although input and sprite movement is broken at the moment but this does show some basic functionality working.

Some features I have planned for the future, leading up to a stable release:

  • Alpha blending (transparency)
  • Menu creation system
  • Game saving and restoring
  • Level creation and loading (maps)
  • Possibly adding OpenAL support for 3D audio
  • Multi-threading support (for dual core and multi-CPU computers)
  • Adding a seperate library called libopgl which is entirely OpenGL accelerated and focuses at 3D graphics and games
  • Possibly adding some OpenGL acceleration to the 2D library

The project is entirely open source and licensed under the GPL version 2 only, I have very strong feelings against version 3 that I will leave for a later time. The project is hosted on google code and can be found here along with the source code.

Filed under:

Micro GTK+ Media Player

Well I havn’t posted in little a while, but I do have some stuff cuing up for the future. I was bored and wanted to work on a GTK program while listening to one of my favorite linux podcasts (The Linux Link Tech Show) and decided to make a small multithreaded media player in C/GTK+ with an SDL backend for the audio playback and threading support. Apparently SDL_mixer has some issue with pausing that hasnt been sorted yet so the pause button probably wont work properly, as it didn’t for me either.

You can download a tar-bzip2 package here. Obviously I use linux, so there is a linux-x86 binary in there along with the source code, as well as a Makefile. I don’t use windows but I hear that you can compile GTK+ apps under windows, wouldn’t know because I havn’t really tried it. But to run under linux you just need the gtk+-2.0, libsdl-1.2, and libsdl-mixer libraries and if you want to compile it from source, you obviously need the development headers as well.

Filed under:

gSourceEdit Alpha is Ready

I’ve been working on a project to make a small, versatile, and light-weight programmers text editor for linux, because personally, they all (mostly) suck. I called this project/program gSourceEdit. Its written in PHP-GTK2 and I’ve completed it to a point now where its partially functional. There are screenshots on it’s SourceForge.net project page and the source is available from the subversion repository. I need people to test it and submit bug fixes (if possible). Also note that some things are not implemented yet, so if something isn’t doing anything, check your console for debug output.

Filed under: