Technology

Streaming video to the Nokia 770

Oliver Brown
— This upcoming video may not be available to view yet.

I recently managed to get video streaming (and transcoding in real time) to my Nokia 770 :D Here’s a guide for anyone wanting to do the same thing. This assumes you have a wireless network with a computer on it.

The first thing you need to do is install MPlayer on your 770. The media player that comes with it is too limited with regards to what it can play. The interface to Maemo MPlayer is a bit limited but I tend to start it from the command line anyway.

Then install VLC (VideoLAN client) on your PC. VLC is a cross platform media player with wonderful codec support and more important built in streaming and transcoding support. To stream (and transcode) using VLC, go to the Open File dialog box and select “Stream/Save” (and click the associated “Settings” button). From there select HTTP streaming (remember the port) and set up your transcoding options. The following are ideal for the 770:

  • M4V video
  • MP3 audio
  • 256 kbps video
  • 64bps audio
  • Width: 400
  • Height: 244

You need to fiddle a bit to specify the width and height. As you select the options you’ll notice the “target” field at the top change. Highlight the bit that says “scale=1” and replace it with “width=400,height=244”. You can also select play locally if you want to see what it’s playing on the screen at the same time.

After you’ve done all that click OK as many times as necessary to get back out of the windows and click Play. The video will now be streaming to anyone trying to listen. The first thing to do is to test it using VLC itself. Open another instance of VLC and go to File -> Open Network Stream. Select HTTP and enter your IP address or (localhost) and the port you selected earlier. When you hit play you should see the video clip playing (quite small). If not, then try again…

Assuming it’s all working, it’s time to see it on the 770. Run XTerm (you really need XTerm if you want to do cool stuff with a 770) and type in the following:

mplayer -cache 8192 -aspect 16:9 http://_your.ip.address_:_port_

Hopefully you’ll have your video clip playing wonderfully on your 770 :D

256kbps is good enough for most clips at that resolution. Actions scenes get a bit blocky but don’t complain too much. 256kbps is also low enough to fit through most if not all ADSL upstream connections and, even better, small enough to fit through newer cellphone connections (the 770 can use a phone as a bluetooth modem). In fact UK readers on T-Mobile can get Web ’n’ Walk Max for £22.50 a month get 10GB of bandwidth and are allowed to use the connection for video streaming and Voice Over IP.

My final goal would be getting it to work with MythTV (it can already use VLC for streaming) and have live TV anywhere I can get a signal on my phone…

Transcoding DVDs

Oliver Brown
— This upcoming video may not be available to view yet.

Following my post about ripping DVDs, here is a method for transcoding the DVDs into something more manageable. I should point out that is probably for the more technical amongst you - there are certainly easier ways to do it but this has the advantage of being very automatable.

Since MythTV (and Linux in general) seems to like ffmpeg for video encoding/decoding, I figured I’d use that. You can get a binary version for Windows and read the documentation.

The actual command line I use to transcode is: ffmpeg -i $in_file -vcodec xvid -qscale 5 -acodec copy $out_file

That means to use $in_file as input (a VOB file in my case), use the Xvid codec for the video, set the “quality” to 5, copy the audio straight from the original and save as $out_file. The quality in this case is just simplification of lots of other settings that are available. 1 is perfect and 31 is the worst. 5 results in files that are about 500MB per hour with MPEG artifacts that are visible when I’m sat at y desk but not when I sit on my bed six feet away which is where I normally watch video from. It may be worth transcoding a short clip with a few different settings to see which your happy with.

I made the whole process semi-automatic by writing a CLI PHP script that checks for VOB files in a specifc folder and transcodes the ones it finds. That way I can have the transcoding going on in the background while I rip the DVDs (and then leave it running it overnight to finish). I could make it available to anyone who wants it, but a batch files doing the same thing would probably be more useful for people…

There is one last caveat. I originally encoded the movies with MP3 audio and then half way though decided I want to keep the 5.1 audio (which the above method does). However the version of ffmpeg I used at first had a problem such that AVIs with AC3 audio played back with no sound. If you have a similar problem make sure you have the latest version of ffmpeg you can get.

Ripping DVDs

Oliver Brown
— This upcoming video may not be available to view yet.

Since I’ve decided to try and set up a MythTV system I figured getting my DVD collection on to hard drive(s) would be a good move for convenience.

There’s a lot of information on the Internet about copying DVDs, whether to other DVDs, to CDs or to a hard drive in their original format or transcoded. I wanted to get the main movie only from a disk and transcode it to XviD for space saving. Here are the steps I have that worked (for Windows incidentally):

The first step is to get the main movie from the disc. This isn’t straightforward since most movies are put on DVDs in a way to deliberately make it confusing to get them off. I used a program called DVDDecrypter (getting a hold of this might be a problem since the original author doesn’t make it available any more due to a recent change in his local laws). DVDDecrypter has a mode called “IFO Mode”. IFO files are the files on a DVD that contain information about how the chapters and program streams go together. The basic idea is to find the program stream that “looks right”. In the case of a movie, the one that’s about an hour and a half long (or two hours -whatever) should be the right one.

This process is pretty quick, about 8 minutes on my Athlon 64 3000 for a movie 100 minutes long. The result is a .VOB file with just the section you selected. A .VOB is really just an MPEG file with specific encoding setting and possible subtitle information. Many media players can play these directly.

In the next part, I’ll deal with transcoding the VOB files.

It should be noted that there may be legal considerations with this sort of thing. A lot of DVDs are encrypted and bypassing the encrpytion may or may not be illegal where you live (for example it’s skirting on the edge of the DMCA). In my case I own all the DVDs I rip and the rips are of a (marginally) lower quality than the originals, don’t have 5.1 sound and are missing all the extra features. As such I feel any concept of fair use covers me morally. You have been warned however and follow any of this advice at your own risk.

Fun with Google calculator

Oliver Brown
— This upcoming video may not be available to view yet.

I’ve talked about the clever calculator features built into Google before. Most of my examples then were rather silly. Well I’ve started using it a bit more seriously recently. The great thing it does is allow unit conversions to be done effortlessly at the same time as the main calculation.

For example, I have a video clip that is about 350 MB and 45 minutes long. I want to know what the average bit rate for the encoding is, in kbps. 350 MB is 350 * 1024 * 8 kbits. 45 minutes is 45 * 60 seconds. Works those two out, divide the first by the second and I have my answer. Or just type [350 MB / 45 minutes in kbps](http://www.google.com/search?sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-22,GGGL:en&q=350+MB+%2F+45+minutes+in+kbps) into Google and I have my answer with far less effort.

Sky TV without a Sky box

Oliver Brown
— This upcoming video may not be available to view yet.

At the moment I have a Sky subscription with a Sky box. The Sky box outputs to my computer which is running Media Center which can change channel on the box using an IR blaster. This isn’t ideal and also means that I’ll never get HD since the Sky box only sends an SD signal out of the scart/composite output. Surely there must be a way to connect the computer directly to the computer and receive TV that way?

Well there is. But there are issues. Firstly you need a DVB-S card. These are just digital TV capture cards that you can plug the cable from a satellite dish into. If you stop there you will be able to receive all the free-to-air channels. Oddly enough though that won’t get you all the free channels.

To get the encrypted Sky channels you will need a CAM - Conditional Access Module - with a card reader. In theory you just put your card in and set up your DVB card to use it. Of course anything to do with decrypting commercial stuff is never that easy. You see there are many different encryption methods and most CAMs don’t support them all (and some only support one). What’s even worse is the method used by Sky is VideoGuard from a company called NDS (which is owned by News Corporation, the company which owns Sky). And guess what? You have to pay a license to use it. That doesn’t mean you can’t physically use it though. There are a couple of CAMs (literally two from what I’ve read) that can decrypt VideoGuard signals but the legality is questionable. Which is silly since generally speaking you’ll still have a (paid for) Sky subscription card in the reader.

The other issue is Sky’s Terms and Conditions on this issue. They say that the card must stay in the box the whole time, that you can’t use the card for unauthorised purposes and that the card needs to be paired to a specific box. However it doesn’t actually say you need to use a Sky box and the very first thing it says is that you are bound to the conditions once you put the card in the box. So surely if you never do that you aren’t bound to the conditions?

Improving EVE - Part 2

Oliver Brown
— This upcoming video may not be available to view yet.

There are obviously more NPCs in the game than just pirates and Concord - there are all the factions. The rest of what I suggest is essentially a way to do factional warfare. And because I speak from a programming background there are a few technically implementation details.

The first step is to have some sort of invisible “power rating” for every NPC faction in a system. This power rating represents the control that faction has over a system and would be completely dynamic. The rating would control how quickly ships (and sentry guns for instance) controlled by the faction spawn. As more ships appear in a system, they could move into other systems and (in the case of war) attack the ships in that system. Losing ships in a system lowers that faction’s power there. By default they’d all be equal (on their borders) thereby ensuring it’s player involvement that tips the balance. With enough support a faction could gain sovereignty of a system from another faction (or perhaps a player alliance? The mechanics of system sovereignty would have to be expanded). The Caldari stamping out the Gallente for instance :P Since the factions need to survive they’d have to be some scaling factor giving more support to factions that have lost a lot of space so they don’t disappear completely.

This also means turning Concord upside down. Have Concord work the same as the other factions. And themn, instead of having Concord presence be dependent on security status, have security status based on Concord presence. Therefore player pirates that want to move in somewhere can, but only after they wipe out Concord first. For systems well secured by a faction, it’s navy should probably also take on the role of the police along with Concord.

The factions would also have different “rules” for expansion. Concord would not aim to take territory for instance. The big four would aim to strongly control a few systems whereas pirates would aim to expand a small presence everywhere (this would control pirate spawning for instance).

With EVE as large as it is, some pretty impressive effects could be achieved simply by interacting thousands of small pieces of AI.

Other possibilities could include the ability to declare war on NPC corporations. This would probably mean a loss of standing to friendly corporations and the relevant navy declaring war on you of course.

So to summarise the benefits:

  • Casual players can be more involved
  • Even with everyone helping in a war, the alliances still have the “prestige” of being player run and it meaning something
  • Alliances get to attack the factions
  • A blurring between high sec, low sec and 0.0 instead of the fairly sudden differences
  • And probably more

I’ll wait for comments about the disadvantages…

Improving EVE - Part 1

Oliver Brown
— This upcoming video may not be available to view yet.

Sorry about the recent EVE fixation. It will pass :P

There has been a lot of debate on the EVE forums recently about high security space vs low security space vs 0.0 space. Basically CCP (the company that makes EVE Online) prefer 0.0 space and would like everyone to move there. This is for a few reasons. Since it’s all player controlled it is a more accurate example of a world controlled by players. This also means that CCP don’t have to create content for it to be interesting (although they still do).

The problem is that a certain amount of dedication is required and some players simply don’t have the time and prefer a more casual play style. And low security space is even more dangerous than 0.0 space essentially forming a no-mans land. At least in 0.0, alliances have control of it (or have the option to control it).

I have a proposal to alleviate some of the problems. Many people on the forums have had proposals and most of been bad - and there is a chance mine would be no different. But read anyway :P

The basic idea is to remove the divide between players and NPCs. Previously I would have said this had no chance of happening. CCP want the player interaction to be most important and not let it become a “Massively Single Player Online Role Playing Game”. But with the announcement of factional warfare it seems more possible. In fact my whole idea is essentially an implementation of factional warfare (unfortunately the details about how it will work are probably set in stone by now so suggestions may not help). More details of that in part two.

The first step to bring NPCs and players closer together is to make Concord “real”. At the moment surviving a Concord attack is considered an exploit. The second step is to put Concord in low security space. If it’s considered “empire space” it should be protected. The clever part is to scale Concord involvement to the security level. And also have more patrols and fewer stationary blockade type setups. Having a concord fleet at every gate is kind a silly, and even if they’re become theoretically killable, it would still need a massive fleet.

This would make low sec a bit safer and high sec a bit more dangerous. You’re open to attack anywhere, however you’re more likely to be saved by Concord the higher the security status you’re in. In 0.1 Concord may send a couple of ships eventually, in 1.0 there’s probably 10 patrols just “round the corner”.

Next is the issue of NPC pirates and how Concord should react to them. It doesn’t really make sense for Concord to ignore them. At the moment NPC pirates are important to the game since they

  1. add a bit of risk to new players in high sec
  2. provide bounty for the more experienced
  3. are a necessary storyline part of agent missions

Number one is required in some level so players get to learn combat but this could easily be replaced by training complexes, or even normal rogue drone complexes that Concord could conceivably not be interested in. Number two is certainly not required, there are enough ways to make money. I’ll address number three later. But for now, lets assume NPC pirates are still needed in high sec. A way round this would be to have different parts of a system have effective security statuses lower than the rest of the system. Perhaps make asteroid belts 0.2 lower than the listed security status of the system they’re in - at least as far deciding Concord response. And they should try to run away if they think they’ll lose (and choose not to attack certain ships). This would frustrate experienced players trying to get bounty but would make sense for miners who are, after all, supposed to be the victims of pirates, not the other way round. And remember, you’d be vulnerable to real pirates anyway.

Some random revelations

Oliver Brown
— This upcoming video may not be available to view yet.

Well I’ve now been playing Revelations, the latest update for EVE Online for a couple of days now. At the moment I’m hastily training skills to use the new features. Contracting for instance lets you have multiple contracts (I do a lot of lazy trading with spare ISK - buy something, pay for it to be shipped, sell it).

I nearly trained Survey V for Salvaging since that is one of the listed requirements. But in their patch notes for the downtime today EVE announced that the requirements for Salvaging will be dropped to Survey III (and Mechanic III).

The final thing you might want is Astrometrics V so you can use the new scanner probes. These allow the funky new exploration. Random interesting sites that can be found (as far as I can tell from reading - no experience yet) in any system (although more interesting ones are in low security and 0.0 space).

Revelations (Kali part one) for EVE Online is here

Oliver Brown
— This upcoming video may not be available to view yet.

Well Kali is finally upon us. I haven’t really had chance to play yet. But the first thing I noticed was 29,000+ players online, the most I’ve seen personally (although I was apparently online when they first broke 30,000 - I was stuck in Jita with 700 other players).

They did post a dev blog about yet another cool idea they’ve had for the release beyond Kali - the ability to walk around stations in a nice 3D rendered world. Although they pointed out it will be mainly cosmetic at first. And to be honest isn’t high on my list of wanted features…

Will Wiktionary ever be more than a mess?

Oliver Brown
— This upcoming video may not be available to view yet.

Wikipedia is great. You can find out almost anything. The only criticisms of Wikipedia are strenuous at best and tend to either be: a) It’s unreliable (you shouldn’t use a single source anyway - that’s why Wikipedia articles are supposed to cite references) or b) It’s somehow elitist or a “members only club” - a view often held by banned users.

One of its oldest sister projects, Wiktionary on the other hand is not so good. I think it’s a marvelous idea that should be done and should definitely continue, but at the moment it is frankly a mess.

In case you don’t know what it is, it’s an attempt to create a free multilingual dictionary in every language. That is not a tautology - I’m emphasising the fact that it aims to translate from every language to every other language. That is the English version will contain every single word in every language with definitions and details in English. The German version will do the same but with definitions and details in German. And so on for every other language. Of course for some languages there will never be enough editors (English probably has the most and that’s nowhere near complete).

Ambitious. Possibly too ambitious. The number of editors doesn’t seem to be as high as Wikipedia and editing is far less fun - there is far more grunt work to do with laying out tables, sorting out headings, getting links pointing to the right places. There are quite a few bots which can automate some of it, but it’s still a large and largely dull undertaking.

Why am I telling you this? I don’t know. Maybe just to encourage a couple more editors to jump on board :)