Watch movies with subtitles on Xbox 360

•Novembre 19, 2009 • Lascia un Commento

xbox 360 movies

Xbox 360 multimedia capabilities are very good, with streaming functions available not only for Windows systems (see here for streaming movies using Ubuntu).

There is a caveat though, the lack of subtitles functionality for movies, and the only way to use them is to hard-sub (encoding the movie again applying subtitles on it).

Several tools are available for every operating system, but the easiest one I use is mencoder (part of the MPlayer project), a command line tool for encoding audio and video files.

Mencoder is available in almost every Linux distribution, for install on Ubuntu just type:

sudo apt-get install mencoder

I encode each movie in Xvid format (which Xbox is capable of play), with this command:

mencoder mymovie.avi -ovc xvid -oac mp3lame -xvidencopts fixed_quant=1 -sub mymovie.srt -o mymovie-encoded.avi

where obviously mymovie.avi is the original movie without subtitles, mymovie.srt is the subtitles file and mymovie-encoded.avi is the resultant output file.

terminal mencoder

The output file will be larger than the original one because I used the fixed_quant=1 option, that outputs larger files but with best quality (you can use 2 or 3 but the quality downgrades).

Encoding may be very slow on older systems, but once finished it can played as any other media…enjoy!

Streaming movies and music from Ubuntu to Xbox 360

•Novembre 18, 2009 • 3 Commenti

Since Ushare seems to not work with Ubuntu 9.10, I decided to change application, and what I found is MiniDLNA.

The installation process is not automatic, but it is very easy:

Download the package from here, or grab the latest one from the site (current one is 1.0.16-pre7 1.0.16.3).

Unpack it:

tar -zxvf minidlna_1.0.16.3_static.tar.gz

Copy the only 2 files in your system:

sudo cp etc/minidlna.conf /etc/

sudo cp usr/sbin/minidlna /usr/sbin/

Now we need to edit the config file, adding the paths we want to share.

I noticed that parsing a large number of files takes a lot of time, so I decided to share only the directories where I have movies (and not my Music library).

sudo gedit /etc/minidlna.conf

This is my minidlna.conf:

port=8200
media_dir=V,/home/scognito/Video
media_dir=V,/home/scognito/Scrivania
friendly_name=Headache
db_dir=/var/cache/minidlna
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
inotify=yes
enable_tivo=no
strict_dlna=no
presentation_url=http://192.168.0.2:8200
notify_interval=900
serial=111222333
model_number=1

It’s almost the same as the default one, don’t forget to add as many media_dir as you need, set your friendly_name (the name your Xbox will see your pc), and most important, the presentation_url, otherwise pc will not be visibile from the Xbox (set it as your pc ip:port)

Start it and enjoy, your shares will be visible to your Xbox 360!

/usr/sbin/minidlna

It will start in daemon mode (you can use the -d flag to debug if you have issues).

If you need to start MiniDLNA automatically at each boot, do the following:

Go to System -> Preferences -> Startup Applications, click Add, and use these settings:

Name: minidlna
Command: /usr/sbin/minidlna


Confirm, and MiniDLNA will start at each boot :)

Update: Version 1.0.16.3 added support for storing the db in a directory different than the default /tmp, so that informations will not be removed after each reboot (variable db_dir in the minidlna.conf)!

Configuring Eclipse for Wii development

•Settembre 5, 2009 • 5 Commenti

Eclipse logo

This tutorial is intended for intermediate users that are not new in homebrew,  so it will not be plenty of screenshots and assumes that devkitPro is already installed and its variables set.

This guide can also be applied for NDS and maybe other platforms supported by  devkitPro (not tested), just change the path where libraries are installed when needed.

It can also be used on Windows too (not tested too, but there should be no differences other than changing paths).

Last note: I used Eclipse few times in my life, so probably there are other (and smarter) ways to achieve the goal, but this tutorial was written mainly for myself, since I was not satisfied of current editors/IDEs I’ve tried on Linux for homebrewing.

Suggestions are welcome!

Continua a leggere ‘Configuring Eclipse for Wii development’

Piero’s Wiicross for Wii and Gamecube is out!

•Dicembre 2, 2008 • 11 Commenti
Wiicross Cover

Wiicross Cover

The most developed, anticipated, awaited, desidered, hated, …ed homebrew I coded is finally here!
Started in June just for test, it became time to time more oriented to be an officially released game.
But exactly, what Wiicross is?

The origin of the game

Wiicross is game based on a popular puzzle game I played on Nintendo DS. It is an electronic version of a puzzle born in 1987, called “Nonogram” whose Wikipedia definition says:

Nonograms or Paint by Numbers are picture logic puzzles in which cells in a grid have to be colored or left blank according to numbers given at the side of the grid to reveal a hidden picture. In this puzzle type, the numbers measure how many unbroken lines of filled-in squares there are in any given row or column. For example, a clue of “4 8 3″ would mean there are sets of four, eight, and three filled squares, in that order, with at least one blank square between successive groups.

It’s easier playing with game directly than understand the rules at first :)

Why now?

I admit, I’m not a skilled coder, but before everything I’m lazy. Coding Wiicross didn’t took 6 months, but if I could count the effective days of coding it would reach about 2 months. It was abandonded for a period of time, then I October I decided to finish it.

How to play?

You can move the cursor pointing the wiiremote on screen, or using the d-pad usint it “NES” position, or with the gamecube controller.

Every controller option has his button schemas.

You can color a cell with the DRAW button, or mark it (with the MARK one) for helping in remembering that that square shouldn’t be drawn.

There are two game modes:

  • Normal mode: If you try to colour a cell that can’t be coloured, an error penalty is shown. Puzzle is solved when the image is correctly drawn.
  • Free mode: there is no error reporting when you colour a wrong cell. Puzzle is solved when you hit the check button and the image is correctly drawn, otherwise an error penalty is shown.

Every error make the timer increase of a certain amout of time.

What Wiicross offer?

Let’s start saying what Wiicross does not offer:
the main difference beetween Wiicross and the original Picross is that in Wiicross you only have grids of the same size (15×15).
This because originally this game was just a test with only a grid in mind; also a bigger grid requires zooming, feature not present in my image library :P

Excetpt that, the game includes:

  • Different controller type for the main game
  • 59 levels (not so much but it’s an homebrew afterall :P )
  • Levels, scores and options are saved in the sd card
  • Multiple graphics themes
  • Custom music: you can add your own music in the game if you don’t like the default ones (not supported on GC version)
  • Custom themes: you can create your own themes and share them with friends

How I add my custom music / themes?

Music

Put your favourite songs in the “res/music” directory (for example if you use the homebrew channel it is apps/wiicross/res/music), then select “Custom” from the options menu.

Note: Music must be in ogg format! No, I’m not an opensource devote: simply sndlib does not support MP3, and libogc support for them is screwed. Also res directory on GameCube must be put on the root of the SD!

Themes

A theme is composed by the following images

  • background.png (640 x 480 pixels)
  • filled.png (image to show when a cell is drawn)
  • marked.png  (image to show when a cell is marked)
  • title.png (the title to show in the option screen for selecting your theme)

All themes must be put in a directory called with the name of your theme, and this directory must be put in “res/themes” . If you follow these rules, you’ll find you theme in the options screen.

For helping in drawing a theme, there is a template on the project page. It also contains a psd (photoshop) and a xcf (gimp) containing layers, helpful for drawing the background, since some part of it are used for painting the timer and the preview.

Thanks

  • Spriteattack for stunning graphics (and for patience to work with me)
  • Cyan & Liz from gbatemp.net: for impressive work on bug testing, fixing bugged levels and sorting by difficulty: the game couldn’t be here without them
  • MrNick for massive testing on the Gamecube version
  • Aaron Williams for the nice “level cleared” jingle
  • All the users who sent their level (using the online level editor)

Yes, this game is also different than others because ALL levels were made by users submitting their images.
I received about 500 levels, but a very minimal part of them was usable (and still needed some fix).
This because each level must have a unique solution, and I didn’t added any type of check, sorry.
There is also a funny list of categories I discarded for obvious reasons, thanks anyway to authors! :P

  • X
  • “Test”
  • Various random cells
  • Svastikas
  • Various messages (“U R the best”, my favourite)
  • Alien / Robots
  • Every sort of dick you can imagine (20+)
  • Faces
  • Mazes

Mandatory screenshots!

Wiicross - title screen

Wiicross - title screen

Wiicross - default theme

Wiicross - default theme

Wiicross - Woody theme

Wiicross - Woody theme

Wiicross - space theme

Wiicross - space theme

Wiicross - candy theme

Wiicross - candy theme

Wiicross - blue theme

Wiicross - blue theme

Wiicross - spooky theme

Wiicross - spooky theme

Wiicross - paper theme (custom theme by Scognito)

Wiicross - paper theme (custom theme by Scognito)

Wiicross - options screen

Wiicross - options screen

Wiicross - level select

Wiicross - level select

Wiicross - pause screen

Wiicross - pause screen

Ok ok but where can I get the game?

The project page is hosted on drunkencoders.
Wii version available here.
GameCube version here.

What’s next?

After some year in developing simple games for consoles, I decided to take a break.
Lot of things are happened (and stil happening) in my personal life, and I don’t know if I am still motivated in coding games just for fun.

Is it a chance to finally doing something else?

Thanks all for support and helping in making what I wanted to do since I was kid (no, not the pornstar): being a game developer was a dream since I’m a videogame addicted!

Ricoh webcam driver for HP Pavillon 6299ea on Windows XP

•Novembre 30, 2008 • 4 Commenti

After downgrading Windows Vista to XP the only driver I didn’t have success to install was the webcam one.
On my dv6299 ea (dv6000 series) the webcam is identified by the 05CA&PID_1810&MI_00\6&1F6A7C80&0&0000 string.

There is no webcam driver for XP looking on HP site, so I made many tries before gettings the device work.

The solution is pretty simple:

  • download the drivers for Vista from HP site
  • unpack with WinRAR or other compression tools
  • go to the sp34746\WCAMR\driver\ directory
  • doubleclick on DPInst32.exe and install the drivers
  • reboot

It worked on my pc, hope it will be useful for you too :)