Happy Christmas To All

gift

So, it’s that time of year, and I’d like to wish all my readers a very Happy Christmas and a great New Year (well, it can’t be much worse than this one ;) ). It’s been a brilliant year for pruperting, we’ve been going for just over a year now and we have already quadrupled our readership. I look forwarding to regaling you all with hints, tips, rants and posts next year.

Keep on rocking ;)

baull

Tags:

Wednesday, December 23rd, 2009 Uncategorized No Comments

You know it’s Xmas when VLC tells you so ;)

Ahh, good old VLC, you always know it’s Christmas time again when your VLC icon changes to a nice Xmassy one:

vlcxmas

Yup, it’s definately Christmas now.

Happy Xmas and a great New Year to all my readers, lets hope 2010 is the year that gets us out of this horrible global mire….

Monday, December 21st, 2009 Uncategorized No Comments

A little musical Remix

Occassionally I hear tunes that I really like, but something isn’t quite right with them. Either there are parts that just don’t fit, or a chorus just isn’t long enough.

So, I like to remix them to get them sounding better.

Here is one such example, a remix of the Crystal Methods – Black Rainbows:

Crystal method-black rainbows(feat stefanie king warfield)RPM Edit by prupert

And here is another one, a remix of Cascada’s Evacuate the Dance Floor:
Cascada-Evacuate The Dance Floor (RPM Remix) by prupert

Thursday, December 3rd, 2009 Music No Comments

Google Chromium OS – I was right!

So, the first build of Chromium is released and as I predicted, it is simply a super-fast web-browsing platform, no more, no less. All those people who are criticising it for not being an MS killer are totally missing the point of it. It is meant to allow you to quickly and easily access the web and Google’s services, using devices manufactured by certain partners. Why would it try to compete with the likes of Ubuntu and Fedora, when both are so advanced and well supported already?

There will be a lot of disappointed people out there, when they see what Chromium is, but that is only because there are lots of people out there who don’t understand what Google wanted to achieve and were, as usual, being unrealistic about what it could achieve.

Saturday, November 21st, 2009 Uncategorized No Comments

A Musical Interlude

Here is some music from the wonderful Metaform. Enjoy ;)


Electronic Press KitQuantcast

Sunday, November 15th, 2009 Music No Comments

MythTV Recordings: Rename, Move and Delete From The Database

So, I have been using MythTV for a while now and it is a.w.e.s.o.m.e.. However, I had one problem, since I transcode and store all my videos on my Ubuntu server and not my MythTV box (which is off most of the time via mythwelcome) I had to manually transfer recorded files to my Ubuntu server via mythweb.

I thought this was a bit of a hokey solution, so I asked around if there was a script that allowed you to rename MythTV recordings (to a more human readable version), move them to another location and remove them from the MythTV database. There were some solutions out there, but they all involved the recorded files being kept in the MythTV database.

mythtv

So, I wrote my own script. This script renames the MythTV files to a nice human understandable version using mythrename.pl, it then moves the recordings to a folder of your choice (in my case a mounted samba share on my server), it then uses myth.find_orphans.pl to delete the moved recordings from the mythTV database (I don’t know if it will still remember that these files were previously recorded so it doesn’t rerecord them or not, I guess time will tell).

So, without further ado, here is the script, in lovely Bash (the script is called mythtvremodel (mythtv REname MOve DELete, geddit?):


#! /bin/sh
### BEGIN INIT INFO
# Provides: mythtvremodel
# Required-Start:    $local_fs $syslog $remote_fs dbus
# Required-Stop:     $local_fs $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: rename, move delete recordings
### END INIT INFO
# script to rename files recorded from mythtv and then to move them and delete them
#made by prupert.co.uk
#creative commons licence, whichever is the most FREE (as in beer)


#lets put in some variables so others can use this
#location of log file, you can choose anything and any name
log=/path/to/mythtvremodel.log
#this is the full path to mythrename.pl
mrename=/location/to/mythrename.pl
#this is the full path to your recordings folder
record=/var/www/mythweb/data/recordings/
#this is the extension your recordings are stored as, usually mpg or nuv
ext=mpg
#this is the full path to where you want your files moved to
dest=/path/to/folder/to/move/recordings/to/
#this is the full path to myth.find_orphans.pl
morphan=/path/to/myth.find_orphans.pl
#mythtv database password for myth.find_orphans.pl
pass=yourmythtvdatabasepassword


# first, run mythtvrename to get nice names for the recordings
echo starting mythtvremodel on `date "+%m/%d/%y %l:%M:%S %p"` > $log
perl $mrename --underscores --format %T-%S-%d%m%y >> $log
# use find to search for all recorded files in the recording folder and move them to the TV folder
find "$record" -name "*.$ext" >> $log
find "$record" -name "*.$ext" -exec mv {} "$dest" \; >> $log
# use mythorphan to remove the now missing recorded files from the database
perl $morphan --pass=$pass --dodbdelete >> $log
#that should be it
echo stopping mythtvremodel on `date "+%m/%d/%y %l:%M:%S %p"` >> $log
exit 0

And there you have it. Now, since I run mythbuntu, I have put this script in /etc/rc0.d (thats rc zero . d) and have named it K03mythtvremodel, thus it is run when my system shuts down, but before all the samba shares and drives are unmounted. As I said, since I use mythwelcome to shutdown my machine when idle, this seemed like the best solution.

Hope it helps someone!

Thursday, November 12th, 2009 HTPC, MythTV, Scripts No Comments

MediaCenter: PS3 No, XBMC YES!

So, for many months I have been slaving away with my PS3 and server, getting Mediatomb to work well and finding a setting for ffmpeg that my PS3 will like. What a waste of time!!

The fact that the PS3 only supports UPnP or locally stored videos is a joke, I mean, come on Sony, Windows Shares are where it is at. Mediatomb is great at what it does, but the interface of any UPnP device is just SO horrible.

aeon_home_watchmen

However, the interface on XBMC is just liquid gold, that can be further customised via skins like Aeon or Mediastream. Both look truly beautiful and put the PS3 to shame. I would dearly love to run XBMC on my old Xbox, but sadly it just hasn’t got the processing power to play my .x264 encoded mp4 videos, so I will use it just as my Music player (still using XBMC on it though). Thus my HTPC, which primarily runs MythTV will now also be used to view my videos via XBMC. It seems rediculous to me that a machine as powerful as the PS3 comes with such an ugly and limited Media Player interface as the UPnP protocol. I guess because Sony are shortly to release Video Store to stream and download Videos, they want that to be the main way PS3 users access videos, and not ones they already own. At the end of the day, it is all about new revenue streams :(

Still, all I can say is that XBMC rules, and I wish I had an Acer Revo with the new Nvidea Ion platform to truly appreciate the full power of XBMC without worrying about messing up my MythTV set-up ;)

Wednesday, November 11th, 2009 HTPC No Comments

Fix the Dell Mini 10v Touchpad

So, my lovely Wife recently got a rather cute Dell Mini 10v.

dell_mini_10v2It comes with a horribly stripped down version of Ubuntu 8.04 from Dell pre-installed. Luckily, however, that can be ripped out and a nice new install of 9.04 can take its place and it all works wonderfully….except the touchpad. To save space, Dell has used a horrible touchpad that integrates the two left and right mouse buttons into the touchpad itself, so when you go to click on something, you actualy end up moving the mouse at the same time. I was amazed that no one mentioned this in any of the reviews about the mini 10v, I guess everyone was embarrassed since they thought it was just them and they had fat fingers! Luckily, the Open Source Ubuntu community being what it is, there is a fix out there.

If you follow this post there is a clear step-by-step guide telling you how to download some specialised drivers for the touchpad that disable the lower portion of the touchpad, so that it works just as a left and right mouse button and not as part of the touchpad. THANK YOU. My Wife was getting ready to throw her netbook out the window until I found that fix. Be warned though, it only works on the 9.04 (and hopefully later) versions of Ubuntu and not on the version of Ubuntu that comes pre-installed, so you will have to install a new normal version of Ubuntu from their website first (though this is a simple process). I hope this helps some one else and allows them to love their Mini 10v, not hate it!

Tags: , ,

Friday, October 16th, 2009 How To, Operating Systems, Software No Comments

Stop snort detecting local traffic

I use the rather excellent and Open Source snort to help monitor and protect my network. However, it was causing muchos havoc with my VNC, SSH and samba connections. I found out this was all down to (as is sadly normal for most opensource projects) confusion related to the configuration.

snort

In the snort.conf file, you are meant to set you home network (the place you are protecting, but don’t want to detect), using

HOME_NET XXX.XXX.X.XXX

And then your external network (the place where attacks might come from and do want to detect) using

EXTERNAL_NET XXX.XXX.X.XXX

Now, the method the configuration and snort documentation tells you to use is, to basically tell snort that anything that isn’t in your home network is in your external nework, so

EXTERNAL_NET !HOME_NETWORK

The exclamation basically meaning NOT. However, if you put an IP address string as your home network, for example (as is suggested in the configuration)

HOME_NET 192.168.1.1/24

for some reason, using !HOME_NETWORK for your external network doesn’t work and snort will happily go and detect all traffic coming from your local network…GRR. Luckily, after some Googling I came across this message and found that the way to get EXTERNAL_NETWORK to work correctly was to use

EXTERNAL_NET [!192.168.1./24]

Finally, snort no longer goes ape about my local traffic and now only finds the retarded script kiddies from Russia and China and the Netherlands (since that is where most of the attacks I get come from) and blocks them. Thanks mailing list, no thanks snort.conf….

Tags: , ,

Friday, October 16th, 2009 How To, security No Comments

How To Use FFMPEG To Transcode Video For The PS3

So, it seems my last post actually wasn’t the best solution. Although using Mediatomb and VLC worked some of the time, often I found that the audio and video was out of sync, making it impossible to watch the movie.

ffmpeg-logo

So, I looked for another alternative. I already use HandBrakeCLI to transcode my videos, but that is essentially a front end to ffmpeg and x264. They are moving away from providing decent support for transcoding videos on the Playstation 3, so I decided to use ffmpeg directly. I used this guide to install the latest svn versions of ffmpeg and x264 on my Ubuntu 8.04 server. I then spent about two weeks trying to find an up-to-date command to actually use ffmpeg to create a PS3 compatible file. It seems most of the instructions on the web are way out of date and use commands that ffmpeg no longer accepts. Finally, after lots of trying I finally asked on the IRC channel #ffmpeg. This very nice dude called relaxed suggested the following:

ffmpeg -t 120 -i $input -vcodec libx264 -level 41 -vpre hq -crf 24 -threads 0 -acodec libfaac -ab 128k -ac 2 output.mp4

Sadly I had problems with this code, since the .mpg files I was using (I am now using MythTV instead of MediaPortal, but that’s another post) were not accepted by the libfaac codec.

However, with a little modification, I got the perfect command. So, without further ado, the best command I have found to convert ANY video accepted by ffmpeg into a PS3 compatible file using x264 that is good quality and low file size is:

ffmpeg -y -i "$1" -vcodec libx264 -level 41 -vpre normal -crf 24 -threads 0 -acodec libfaac -ab 128k -ac 2 -ar 48000 "$1".mp4

Obviously change $1 into your input file and “$1″.mp4 into your output file. If you want to send the command line output to a log file so you can see what is going in, use:

ffmpeg -y -i "$1" -vcodec libx264 -level 41 -vpre normal -crf 24 -threads 0 -acodec libfaac -ab 128k -ac 2 -ar 48000 "$1".mp4 > /where/you/store/your/logs/ffmpegprog.log 2>&1

Now, when I first saw this I thought, hey, its got hardly any switches (all the -XYZ stuff), therefore it must be cack.  However, the key is the “-vpre normal” switch.  This tells ffmpeg to use some of its built-in presets, or in this case built-in x264 presets that are created when you build x264 from SVN. I was initially told, as you can see from above, to use the “hq” preset, but I found this resulted in files that were quite big. Using the “normal” preset seemed to produce files that were of great quality compared to my original source (SD DVB-T transport streams in MPG format) but much smaller files size, for example, a .mpg transport stream movie that is originally 2.5GBs in size gets reduced to around 650 MBs, awesome.

X264_Logo

So, this is the command I now use to convert all my videos. I also use comskip run via Wine to check for commercials and mp4box to mux in the chapter markers from comskip. Weirdly, I do find that when playing these resultant files via VLC they appear to have their audio and video out of sync, but on the PS3 they are fine. Whether this is due to me using an old VLC or my PC being too slow to play em, I don’t know, but hey, if it works.

So, if you are looking for the best ffmpeg command to transcode video files for the PS3 using ffmpeg and x264, I am pretty sure this is it.

As an aside, I also built HandBrakeCLI from SVN and it now also has a basic preset, called Normal, that also produces PS3 compatible files. I will play with them to see how they do, though I find that occasionally HandBrake can crash, and get stuck, so I try to avoid it. Sadly though, the HandBrake dev’s wont help you with this, since you are using the HandBrakeCLI and it is not the CLI that is crashing so they wont look into it for you. In fact (<rant>) I am really shocked at the rudeness and arrogance that the HandBrake devs demonstrate on their forum. I have read so many well worded and polite posts from confused people on their forums, where the devs (mainly a guy called jbrake) just answers back incredibly sarcastically and very rudely, providing little to no help. Maybe they get loads of annoying whiny posts from people who haven’t RTFM, but still, there is no need to be rude about it. In fact, that is the main reason I don’t want to use HandBrake, since I don’t like the attitude those guys have (</rant>).

Anyway, hope this awesome command for a recent SVN ffmpeg and x264 version to convert video files for PS3 works for you!

Saturday, October 10th, 2009 HTPC, How To, PS3, Transcode 8 Comments