Monday, January 11, 2010

Linux - Blocking IP addresses

Ever need to block an IP address from connection to you linux box?

This is quite easy and simple to acheive, with IPTABLES...

# sudo iptables -A INPUT -s 1.2.3.4 -j DROP

just modify the ip address to the one required.


Need to view what IP Addresses have been added to the system

# sudo iptables -L



Remove the blocked IP Address from the chain

# sudo iptables -D INPUT -s 1.2.3.4 -j DROP

Friday, January 8, 2010

MythTV 0.22 - mythrename.pl

Setting up and installing mythrename.pl

This makes a directory of links to the recordings the directory structure is the program name and the episode name is the filename, this makes it a breaze to find episodes over a network share.

Create a folder for the links to be placed into and make the script executable

sudo mkdir /home/showlinks
sudo chown mythtv:mythtv /home/showlinks
sudo chmod -R a+rw /home/showlinks/
sudo chmod a+x mythrename.pl

Chose a convenient time to run the script and add the scrip to the crontab scheduler,

sudo crontab -e

# m h dom mon dow command
0 3 * * * /usr/share/doc/mythtv-backend/contrib/user_jobs/mythrename.pl --link /home/showlinks/ --format '%T/%Y%m%d-%H%i-%eH%ei-%S' --separator '-' --replacement '_'

Use the system->shared folders application to add the showlinks directory to the list of network shares.

Run it now to check how it will all work...

Tuesday, November 10, 2009

MythTV 0.22 Migrating Recordings

Using the following SQL statements allows us to backup the mythtv recordings database

mysqldump -c -u mythtv -p -t mythconverg record recorded oldrecorded recordedprogram recordedrating recordedmarkup recordedseek > recordings.sql

It will ask for a password, which is the SQL database password not the system password.
After a few seconds it's done. All that is left to do is copy the backup file accros to the new machine an import it.

The following SQL will import to the database

mysql -f -u mythtv -p mythconverg < recordings.sql

Saturday, November 7, 2009

MythTV 0.22 Additional Software

Now the tv cards seem to work OK time to install all the extra bits I have gotten used to on the previous install of 0.21

Install and configure

video2ipod - Create podcast feeds straight into iTunes
mythrename.pl - Create a directory of sensibly named files for ease of access over the lan
mytharchive - Create DVD archives of video
remote control settings - So they match the way things worked on 0.22
remote power button -To allow the front end to be restarted

MythTV 0.22 Upgrade

Started playing with the new version of Mythbuntu 9.10 Karmic Koala,witch comes bundled with MythTV 0.22

I performed a clean install on a new hard disk from the CD, which went fairly easily, and then downloaded a bunch of updates.

Setup the tuner cards
downloaded and installed tv_grab_nz-py and setup with the required channels
setup a playback option for nvidia

Problems...

Video jumpy/skipping frames - seemed to be the fact that the correct frame sizes needed to be setup, the are found under
setup->tv settings->recording profiles->mpeg-2 encoders->default
and set to capture width and height to 768 x 576 for default and live tv

At the moment still switching between 0.21 and 0.22 till I am happy with the way that 0.22 is running, and all the other add-ons are back up and running.

MythTV - Convert Recordings to Podcast

I've been looking for an easy way to change recordings into something that will play nicely with iTunes and my iPod Touch.

After a little looking around I have settled on Video2ipod, available from http://wiki.1.jeffornot.com:8000/wiki/Video2ipod

It seems to work OK, but I have given it a few tweaks, will update when I get a chance the changes I made.