Saturday, 23 June 2012

How to install Aegisub on to Ubuntu 12.04

The other day I decided to install Aegisub on to my new Linux build. The good news was there were Linux builds for Aegisub. The bad news was that they were only the source code. I've played around with Linux, but I've never installed something from source before. Well, there is a first time for everything, I thought, time to get cracking.
Two days later, it works! I decided to save everything I did, because there was no real Linux support for this program. I figured I might as well share how I got it working, in case there are any other enterprising Linux users out there that want to give it a try. Although, this isn't an authoritative guide. I typed these commands and it worked. I can't say why or how. And be forewarned, this is Linux, and as such, your results will vary.

This was a pretty much fresh build of Ubuntu, so I didn't have very many packages installed. These were the ones that I had to install first, although it took me several tries to find the right packages the first time around.

sudo aptitude install build-essential
This is a simple one, it installs the stuff necessary to build programs from source.
The first package I was missing was freetype. This left me confused, since I already did have freetype installed. And now it is time to be brutally honest. I am a Linux hobbyist, not a guru. I have no idea which of the following commands fixed the problem. I was just trying stuff until it worked. I believe it was the database update, but it I might have need a package first as well.
These are the commands I ran:
sudo aptitude install xlibmesa-glu-dev
sudo aptitude install libfont-freetype-perl
sudo aptitude install libtaoframework-freetype2.3-cil
sudo updatedb

I'm almost certain it wasn't the perl library, but who knows. If I wanted to, I get a fresh build and redo everything until I know what fixed it. But this was a pain enough as it was.

The next error was FontConfig. That was an easy one.
sudo aptitude install libfontconfig1-dev
sudo updatedb

The libfontconfig1-dev gets you the fontconfig.pc file, and the updatedb allows pkg-config to find it. The same follows for the next package, WxWidgets:

sudo aptitude install libwxgtk2.8-dev
sudo updatedb

Next you need to install intltool. Consider this a practice run for the main event, since in needs to be installed from source as well. You can get the tool from here:

But first, intltool has a dependence of its own:
sudo aptitude install libxml-parser-perl
then unzip and untar intltool, cd down into its directory, and then use these commands to install it:
sudo make
sudo make install
If configure results in any errors, you need to find which package it needs and install it as well. The xml-parser was all I needed for it, though.

Next came the fun part. Aegisub will install now, but it won't play videos. Despite the documation saying it uses ffmpeg, Aegisub really requires ffmpeg2.
sudo aptitude install ffmpeg
sudo aptitude install libffms2-dev
I'm pretty sure that ffms2 will install ffmpeg as well, but in case it doesn't, I included ffmpeg as well.
Finally, you want to see the subtitles on the video, right? Well, you'll need libass for that. Again, one of these packages made it work. Since I install them all at once, I don't know which one it was.
sudo aptitude install libass4
sudo aptitude install libassuan-dev
sudo aptitude install libassimp2
sudo aptitude install libass-dev

At this point everything was going peachy. I left for work, only to return to tragedy. Sound no longer worked on my box. First, my sound card showed up in the Sound GUI, but the test sounds didn't work. After attempts to restart the sound processes, I reboot the computer. When it came back, I had no sound and no sound card either. I spent a good three hours troubleshooting sound, reloading drivers, experimenting with stuff, but none of it worked. As I was getting ready to trash the build and start over from scratch, I found this guide:
The command sudo modprobe snd_hda_intel fixed it! I was quite happy, and went upstairs for awhile. When I returned, sound had stopped again. This time, I could hear some systems sounds, but not all of them. For example, using ubuntu-bug audio, I could hear the first test sounds, but not the second. Frustrated I left for a walk and when I returned, it had fixed itself without my input. Weird, huh? Anyway, sound is important, since for some reason OSS isn't working right with Aegisub, and that is the only one that gets installed by default. I'm using portaudio, and I'd recommend that to anyone else as well.
sudo aptitude install portaudio19-dev
This installs some portaudio files needed. I think. It might not be nessessary.
NOW, you are ready to install Aegisub. From the directory you zipped the files to:
./configure --with-portaudio
sudo make
sudo make install
This will take awhile. When configure is done, assuming no errors, it will display a list of settings. This is how mine looks:
Default Settings 
Video Provider: ffmpegsource
Audio Provider: ffmpegsource
Subtitle Provider: libass
Audio Player: alsa 

Scripting Engines
auto3 Lua: no (autodetected)
auto4 Lua: no (autodetected)
auto4 Perl: no (default)
auto4 Ruby: no (default) 

Audio Players
ALSA: yes (autodetected)
OpenAL: no (autodetected)
OSS: yes (autodetected)
PortAudio: yes
PulseAudio: yes (autodetected) 

A/V Providers
FFmpegSource: yes (autodetected)
Subtitle Providers:
libASS yes (autodetected) 

Misc Packages
Hunspell: no (autodetected)
universalchardet: yes (default) 

That is as far as I can take you. Good Luck!

Friday, 22 June 2012

Codex Hermetica, Chapter 4: Crystal Triangle

I'm not dead yet.  Just been really of busy of late, what with the rebellion and all.  No, seriously the bastards at work gave me 10 hour shifts and I'm not getting paid for anything over 40 hours, so I'm a little pissed.  Anyway, here is something way too long.

Codex Hermetica
Chapter 4: Crystal Triangle

I think this is getting needlessly messianic
--Douglas Adams, The Hitchhiker's Guide to the Galaxy

You can tell a lot about a culture by how they portray themselves in their entertainment. For Americans, not only do they portray themselves as the heroes and leaders of the world, but they are the strongest and most powerful nation in the world. As much as Americans love an underdog, they can only portray themselves as such against an outside force, generally an alien invasion of some sort. American entertainment is truly devoid of the sort of despair that is found when a small nation is cornered between two larger rivals. But for most the world, that is the case.

In the sixties, England was a nation in decline, its Empire lost, its position as world power failing, and facing increasing irrelevance. What entertainment appeared? James Bond. For many second-rate powers, that can not compete on terms of physical strength alone, the idea of an agent holds great appeal. Maybe they can't save the world with their armies, but they still have agents that are a force to be reckoned with. In the last decade in anime, this 'agent' position has been increasingly been filled by Lupin III (ignoring the fact that he really is a Frenchman), although this is an incorrect reading of the character of the gentleman thief, or has Camus would call him, a 'dandy rebel'. But look back a handful of years, and you will find, in the action hero genre, a number of Japanese 'agents', that fight to save the world, often while fighting interference from both the Americans and the Russians. It is in this perspective that we meet, in the anime movie Crystal Triangle, the character of Professor Kamishiro, archeologist, mystic, and all-around badass.