Blog archive

Friday 15 May 2009

Underworld series of films

Underworld (2003)
Underworld: Evolution (2006)
Underworld: Rise of the Lycans (2009)

Adam : 9:50 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Tuesday 5 May 2009

nuvexport in ubuntu jaunty 9.04

ffmpeg SVN build is required if you're using nuvexport or what to do some say H264 encoding.
# Sources / dependencies
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

apt-get install libgsm1-dev libvorbis-dev libxvidcore4-dev  libfaac-dev libmp3lame-dev libx264-dev libfaad-dev libtheora-dev libsdl1.2-dev

# Configure/build

./configure --enable-gpl --enable-postproc  --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree

make

# Install
checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --default


Nuvexport changes required in /usr/share/nuvexport/export/ffmpeg/MP4.pm
* remove -slice option
* remove -chroma option
* remove -title option 
Adam : 8:43 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Friday 10 April 2009

SPF with bethere.co.uk

Just in case you're using the ISP bethere.co.uk and you're geeky enough to know what SPF is. Here's the details.

Mail seems to come from a whole load of different servers, including the following.

135.255.194.87.in-addr.arpa	name = phil.london.02.net.
136.255.194.87.in-addr.arpa	name = jill.london.02.net.
137.255.194.87.in-addr.arpa	name = pip.london.02.net.
138.255.194.87.in-addr.arpa	name = josh.london.02.net.
139.255.194.87.in-addr.arpa	name = jenny.london.02.net.
140.255.194.87.in-addr.arpa	name = lillian.london.02.net.
141.255.194.87.in-addr.arpa	name = grundy.london.02.net.
142.255.194.87.in-addr.arpa	name = aldridge.london.02.net.
143.255.194.87.in-addr.arpa	name = april.london.02.net.
144.255.194.87.in-addr.arpa	name = honeysuckle.london.02.net.
145.255.194.87.in-addr.arpa	name = woodbine.london.02.net.
146.255.194.87.in-addr.arpa	name = phil-2.london.02.net.
147.255.194.87.in-addr.arpa	name = jill-2.london.02.net.
148.255.194.87.in-addr.arpa	name = pip-2.london.02.net.
149.255.194.87.in-addr.arpa	name = josh-2.london.02.net.
150.255.194.87.in-addr.arpa	name = 87-194-255-150.bethere.co.uk.
151.255.194.87.in-addr.arpa	name = jenny-2.london.02.net.
152.255.194.87.in-addr.arpa	name = lillian-2.london.02.net.
153.255.194.87.in-addr.arpa	name = grundy-2.london.02.net.

Rather than listing each in a a: record, it's prob just easier to allow their entire network with a rule like this.

v=spf1 ip4:87.194.255.1/24 mx ~all 
Adam : 11:39 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Sunday 1 February 2009

Mythtv - simple remote control

The mythtv remote control interface is too heavy weight for some PDAs/smart phones, it appears to use javascript (for AJAX), and cookies. This is a simple version that uses the same API, but uses only pure HTML.

Note, you'll need to tweak your /var/www/mythweb/.htaccess file to pass through the db_* environment variables.

$keys = array(
      array("id" => "escape", "name"=>"Back"),
      array("id" => "enter", "name"=>"Enter"),
      array("id" => "left", "name"=>"left"),
      array("id" => "right", "name"=>"right"),
      array("id" => "up", "name"=>"up"),
      array("id" => "down", "name"=>"down"),
      array("id" => "f10", "name"=>"Pause")
      );

if (isset($_REQUEST['key'])) {
$key = $_REQUEST['key'];

$frontend=$Frontends['brimstone'];

$ret=$frontend->connect(3);
$ret=$frontend->send_key($key);

}

foreach ($keys as $key_obj) {
$link=$_SERVER['PHP_SELF']."?key={$key_obj['id']}";
echo "<a href=\"$link\">{$key_obj['name']}</a> <br />\n";
}

Adam : 9:22 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Sunday 21 December 2008

Distorted (stretched) audio with DVB-T & Nuvexport

The problem appears to be to do with the format of the files. The ones that don't encode have much higher bitrates, and take much much longer.

'Good' video
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 6500.0 kbps (812.5 kbyte/s)

'Bad' video
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 15000.0 kbps (1875.0 kbyte/s)

I found that mythtranscode has a mpeg2 to mpeg2 transcode option. I tried running this on my files first, and magically it fixed the problem.

I use a wrapper script to do my transcoding to which i added the following lines before I kick off nuvexport

# fix bad files first
store=/data/film/store
mythtranscode --mpeg2 -i $store/$file -o $store/$file.transcode.mpg
mv $store/$file $store/file.old
mv $store/$file.transcode.mpg $store/$file

Adam : 10:46 AM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Thursday 27 November 2008

Wii remote in ubuntu intrepid 8.10

Wii remote will only work if auth and encrypt are disabled

hciconfig hci0 noauth
hciconfig hci0 noencrypt
# required packages
apt-get install wminput wmgui lswm

# use uinput module (place this in your /etc/modules file maybe?)
modprobe uiinput

# test remote, press 1 and 2 buttons simultaneously, blue lights should flash
lswm
# You should see the MAC address of your Wii remote

# Connect with MACs you got in last step
wminput 00:1E:A9:44:82:9B
 
# If you want the wiis to be connected at anytime, but some
# lines like this in your startup script. One for each wii remote you have
wminput --daemon --reconnect 00:1E:35:1D:44:9C
wminput --daemon --reconnect 00:1E:A9:44:82:9B

For some applications you may need to change the keymappings in /etc/cwiid/wminput/buttons. For example for mythtv, these mappings are more useful that then the default.

Wiimote.A               = KEY_ENTER
Wiimote.B               = KEY_F10
Adam : 9:54 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Monday 24 November 2008

Ubuntu Hardy -> Intrepid upgrade : bluetooth

It seems that the hidd binary has disappeared after the upgrade. hidd is a server that allows bluetooth keyboards, mice, mobile phones etc. to be connected.

https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/281580

apt-get install bluez-compat

On closer inspection, many things have changed!!

  • daemons hcid and sdpd have been replaced with the new super daemon bluetoothd
  • New config file /etc/bluetooth/main.conf added
  • hcid.conf has also been removed.
  • pin number cannot be specified in a config file anymore, instead dbus is used.

I can't discover my linux box from my phone (Sony Ericsson K800), i tracked this down to PSCAN and ISCAN not being enabled on the bluetooth adapter. This can be fixed with the following:

# enable PSCAN and ISCAN
hciconfig hci0 piscan 

# check it worked
hciconfig 

hci0:   Type: USB
        BD Address: 00:12:34:56:78:9A ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:20425 acl:115 sco:0 events:526 errors:0
        TX bytes:5543 acl:84 sco:0 commands:340 errors:0

Now I can see my the bluetooth adapter, although I still can't pair

I found an application bluez-pin, supplied by a package of the same name (search with dpkg -S bluez-pin, but this seems to be obsoleted now.

I use bluetooth on a mythtv box with mythtv running fullscreen, therefore I cannot be doing with popup messages asking pin numbers etc. Instead I prefer to use a static code, not 1234, or 0000 though. This allows friends etc. to use their phones to control the tv.

I found a useful python script in the source code for bluez-utils

# get source
apt-get source bluez-utils

# look in source code
cd bluez-4.12/test
./simple-agent

# you may need to remove bluez-gnome, because it tries
# to use same ID on the dbus (error message dbus.exceptions.DBusException: 
# org.bluez.Error.AlreadyExists: Agent already exists)
apt-get remove bluez-gnome
killall bluetooth-applet

Note, if you get this error then it is because bluetoothd is not running

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files

If you want to use a fixed pin code change the code in test/simple-agent. An exercise for the reader could be to read the value from /etc/bluetooth/pin

        def RequestPinCode(self, device):
                print "RequestPinCode (%s)" % (device)
                return "1234";    #raw_input("Enter PIN Code: ")

Now onto hidd, the mobile phone doesn't seem to be able to connect. Errors such as the following are seen

hidd --connect 00:12:34:56:78:9A
HID create error 77 (File descriptor in bad state)

I tracked the problems to hciconfig parameters do not match previous settings in the now defunct hcid.conf. Setup is now:

hciconfig hci0 piscan
hciconfig hci0 lm master
hciconfig hci0 auth
hciconfig hci0 encrypt

# Check the settings
hciconfig -a
hci0:   Type: USB
        BD Address: 00:12:34:56:78:9A ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN AUTH ENCRYPT
        RX bytes:64712 acl:1063 sco:0 events:2090 errors:0
        TX bytes:29613 acl:1028 sco:0 commands:645 errors:0
        Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy:
        Link mode: MASTER

Back to the problems with HID. My phone simply won't connect, I just get messages (on the phone saying) Bluetooth connection failed. Check Bluetooth settings on other decice. Bluetooth on. Device visible. Device in range.

It seems the new bluetooth system has a HID daemon built-in. This is in the form of an 'input' plugin. I have found by deleting this file, and running the legacy hidd program supplied in bluez-compat that I'm able to use my phone

# remove input plugin (it won't work with my phone)
rm  /usr/lib/bluetooth/plugins/input.so

# Restart the bluetooth daemon
/etc/init.d/bluetooth stop
/etc/init.d/bluetooth start

# Load the legacy HID daemon (hidd)
hidd --server

# Now I can connect my mobile phone !! 
echo "Happy days"
Adam : 7:37 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Ubuntu Hardy -> Intrepid upgrade : screen saver

The screensaver appears to have been enabled again.

Traced to rogue DPMS entry in the

Solution: Comment out Option "DPMS" line.

Adam : 7:34 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Saturday 22 November 2008

Ubuntu Hardy -> Intrepid upgrade : nuvexport

The update knocked out ffmpeg which i need to transcode mythtv programs. This is distilled from this ubuntu forum post
# This step will knock out mythtv if you have it but you can reinstall later
# Pas de panic: All the settings will still be in mySQL
 
# Step 1 - remove old stuff, update dependencies

apt-get purge ffmpeg x264 libx264-dev libx264-57 libx264-59
apt-get remove libavutil-dev libavcodec-dev 

apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaad-dev libfaac-dev libmp3lame-dev libtheora-dev

# step 2 - 264 codec

cd ~/
git clone git://git.videolan.org/x264.git
cd x264
./configure --prefix=/usr --enable-shared
make
checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1"
ldconfig

# Step 3 - make/install ffmpeg

cd ~/
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
make
checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" 
Now we should have ffmpeg installed. Next onto nuvexport, the mythtv transcoder. Nuvexport (nuvexport_0.21.0-0ubuntu2) supplied with intrepid seems to be broken, or perhaps a configuration problem?
mythtv@brimstone:~$ nuvexport  --profile adam --input 1001_20081121205900.mpg
Not connected to mythbackend.
It seems I had an old version lurking around. I deleted /usr/local/bin/nuvexport and reinstalled nuvexport
apt-get install nuvexport
Now I get
ffmpeg had critical errors:
ffmpeg: unrecognized option '-me'
This is because ffmpeg -me is now ffmpeg -me_method. => Change the line in /usr/share/nuvexport/export/ffmpeg/MP4.pm from -me to -me_method Run again, a new error this time:
ffmpeg had critical errors:
ffmpeg: unrecognized option '-flags2'

It turns out flags2 does exist but the parameters passed to it have changed. see ffmpeg -h, it's not mentioned in the man page.

Edit /usr/share/nuvexport/export/ffmpeg/MP4.pm again.

  • - remove brdo, apparently now implied with -subq of less than 7
  • - change 8x8dct to dct8x8
Run again
ffmpeg -threads 2 -y -f s16le -ar 48000 -ac 2 -i /tmp/fifodir_15529/audout -f rawvideo -pix_fmt yuv420p -s 720x576 -aspect 1.77777777777778 -r 25.000 -i /tmp/fifodir_15529/vidout -aspect 1.77777777777778 -r 25 -deinterlace -croptop    8 -cropright 10 -cropbottom 8 -cropleft  10 -s 320x176  -vcodec libx264 -b '96k' -title 'Have I Got News for You' -level 30 -loop 1 -g 250 -keyint_min 25 -sc_threshold 40 -rc_eq 'blurCplx^(1-qComp)' -bt '96k' -maxrate '1404k' -bufsize '2000k' -i_qfactor '0.71428572' -b_qfactor '0.76923078' -bf '0' -me_method umh -refs 2 -subq 7 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -flags2 +wpred+mixed_refs+dct8x8 -me_range 21 -trellis 2 -chroma 1 -slice 2 -cmp 1 -deblockalpha 0 -deblockbeta 0 -acodec libfaac -ar 48000 -async 1 -ab '96k' foo.mp4
FFmpeg version SVN-r15905, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
  libavutil     49.12. 0 / 49.12. 0
  libavcodec    52. 3. 0 / 52. 3. 0
  libavformat   52.23. 1 / 52.23. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Nov 22 2008 09:10:42, gcc: 4.3.2
Input #0, s16le, from '/tmp/fifodir_15529/audout':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0.0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Input #1, rawvideo, from '/tmp/fifodir_15529/vidout':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #1.0: Video: rawvideo, yuv420p, 720x576, 25.00 tb(r)
Output #0, mp4, to 'foo.mp4':
    Stream #0.0: Video: libx264, yuv420p, 320x176 [PAR 44:45 DAR 16:9], q=2-31, 96 kb/s, 25.00 tb(c)
    Stream #0.1: Audio: libfaac, 48000 Hz, stereo, s16, 96 kb/s
Stream mapping:
  Stream #1.0 -> #0.0
  Stream #0.0 -> #0.1
[libx264 @ 0xa230780]using SAR=44/45
[libx264 @ 0xa230780]using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0xa230780]profile High, level 3.0
Press [q] to stop encoding
[libx264 @ 0xa230780]error, non monotone timestamps -2147483648 >= -2147483648
av_interleaved_write_frame(): Error while opening file

It seems the non monotone timestamps errors occur when using mythtv output any (according to various forum posts).

A solution on this forum seems to work. It involves removing the check in ffmpeg.c / write_frame() so that exit() is not called when the timestamp error condition occurs.

Happy days.

Side issue. Filenames are now incorrect in moving from nuvexport 0.4 to 0.5

The following used to give a human friendly filename, e.g 2008-11-17 20-28 - Panorama - What Happened to Baby P.mp4

filename=%m - %t - %s
Now, i need to use the following. Madness !
filename=%pY-%pm-%pd %pH-%pi - %T - %S

Hmmm, I spoke too soon. The fix above to ffmpeg.c doesn't seem to work. The files that are created only have one frame in!!

Right. I've finally given up. It can't be done, or not by myself, in any reasonable time period. For now I'm just going to swap to the standard mpeg4 encoder. Quality is much lower per bit, but it works, and it is x5 faster, 100fps compared to 20fps.

In the /etc/nuvexportrc file change h264 to mpeg4

mp4_codec=mpeg4
Adam : 12:02 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Sunday 19 October 2008

Bluetooth not visible ubuntu - solved

I've discovered that I can't discover my bluetooth adapter from my mobile phone. I'm using Ubuntu 8.04 Hardy Heron. It turns out a new required option has been added (discovto 0).

I'd upgraded from a previous version of ubuntu, and edited my /etc/bluetooth/hcid.conf file so I didn't have the option . (When you upgrade you're given the option to keep or replace various config files).

options {
        autoinit yes;
        security auto;
        pairing multi;
        passkey "1234";
        pin_helper /usr/bin/bluez-pin;
}
device {
        name %h;
        class 0x3e0100;
        iscan enable; pscan enable;
        discovto 0;
        lm accept, master;
        lp rswitch,hold,sniff,park;
}
Adam : 6:41 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Saturday 11 October 2008

Nuvexport for mythtv

You can configure MythTv to automatically transcode recordings to other formats (iPod MP4 etc).

If you're using ubuntu hardy 8.04 (or some other package based distros) then you may need to compile ffmpeg from source to get xvid and other support.

https://wiki.ubuntu.com/ffmpeg is great, but fails to mention you need to enable support for mp3 with the option --enable-libmp3lame when you're running configure.

If you do not, you'll get the following error when running nuvexport. This refers to the audio codec mp3 not being supported.

Error while opening codec for output stream #0.1

To check what is supported run ffmpeg -formats. The output is a little cryptic. D and E refer to decode and dencode support. Also, don't confuse file (container) formats with the actual codecs...

Integrating with myth tv

Use mythweb (or the mythtv interface) to edit the entry "User job 1". This will be called after each file is recorded and transcoded. Mythweb -> settings -> mythtv -> settings table -> user job 1. Read for full details, including the need to restart myth backend etc.

/home/mythtv/mythexport.sh %FILE

Contents of /home/mythtv/mythexport.sh

Note you'll need ubuntu package mpeg4ip-server to get the mp4creator tool.

#!/bin/bash

#
# Simple wrapper to convert then upload
# mythexport 
#

DEST="user@host:/file/path/foo/bar/etc"

file="$1"

if [ "$file" = "" ]; then
  echo "Usage `basename $0` "
  exit
fi;

# create a temporary directory and change to it
dir=`mktemp -d`
cd $dir

# transcode the video
nuvexport --profile adam --input $file

# Make the MP4 file playable before load completion
# i.e. without this the quicktime plugin (or other player)
# will download the entire file before playing it
mp4creator -hint=1 *.mp4
mp4creator -hint=2 *.mp4
mp4creator -optimize *.mp4

# upload
scp -l 512 *.mp4 $DEST

# clean up
rm *.mp4

New profile in /etc/nuvexportrc

<profile::adam>

    underscores=yes
    filename=%m - %t - %s
    date=%Y-%m-%d %H:%M

    vbr          = yes
    multipass = yes
    export_prog = ffmpeg
    mode        = mp4

    width        = 320
    height       = auto

    a_bitrate    = 96
    v_bitrate    = 400

</profile::adam>

Adam : 7:13 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Tuesday 7 October 2008

Wake on LAN issues : RT 8111 / 8168B

There is a problem with the drivers that support this chipset

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

Linux version 2.6.24-18-386

First, "upgrade" to the realtek supplied module (r8168), and blacklist/remove r8169

This taken from http://ubuntuforums.org/showthread.php?t=723569

1 - Downloaded current driver from :
http://www.realtek.com.tw/downloads/...&GetDown=false
2 - Unpacked on the Desktop
3 - $ sudo mv r8168-8.004.00 /usr/src
4 - $ cd /usr/src/r8168-8.004.00
5 - $ sudo make clean modules
6 - $ sudo make install
7 - $ sudo depmod -a
8 - $ sudo insmod ./src/r8168.ko
9 - $ lsmod -a | grep 8186 #just to check it was there
10 - $ cd /etc/modprobe.d
11 - $ sudo touch blacklist-network
12 - $ vi blacklist-network # add "blacklist r8169" to the file
13 - $ sudo update-initramfs -u #to make the change permanent
14 - reboot
15 - ethtool -i eth0 #to see new driver assigned

Next, modify your start-up scripts so that the interfaces are not shutdown. This is because there is a bug in the shutdown routine of the module which causes the wake-on-lan state to be reset.
- Comment out ifdown where ever it occurs in files in /etc/init.d/networking
- Remove the "-i" option from any calls to halt in /etc/init.d/halt


Adam : 7:50 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Wake on LAN issues: Speed touch 780

To get WOL to work over the Internet (through a router), you need to create a forwarding rule that directs UDP packets at the machine you wish to wake. Note TCP will not work because the connection can never be formed without an active TCP stack on the receiving machine (which is powered off!!).

i.e. external port X on your router directs to port X on the machine on your network. Low level hardware detects the 'magic packet' in hardware and generates a wake up event.

Unfortunately, you can't just use a "SpeedTouch 780" for this out-of-the-box. Tinkering is required.

Following taken and corrected from http://bbs.adslguide.org.uk/showthreaded.php?Cat=&Board=beunlimited&Number=2984217&page=3&view=expanded&sb=1&o=0

1.) Telnet 192.168.1.254 (or wherever it lives) and login with your normal username and password.

2.) Type ip.

3.) Type arplist, this should print out your routers current arp table which should contain an entry for your machine.You need to delete this dynamic entry and add a static one so you need to take a note of the Interface, IP-Address and Mac address.

3b) Physically disconnect the machine you're trying to set up the route to and continue following these instructions from another computer. Otherwise you'll not be able delete the entry, it will keep appearing.

4.) Type arpdelete, enter "LocalNetwork" for intf, your machine's ip for ip and your machine's mac address for [hwaddr].

5.) Type arpadd and enter the same parameters above.

6.) Type arplist again, your machine should be back in the table but the entry in the type column should now read static instead of dynamic.

7) Reconnect the target machine

Adam : 7:35 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Friday 4 January 2008

MythTv - more madness

Update to ubuntu 7.10

Problem:

Can't get Terratec Cinergy XS DVB tuner USB stick to work.
Device is recognised but dvbdate does not work, channels cannot be viewed or recorded with mythtv


Cause:

Using USB 1.1 support by disabling ehci_hcd. ehci_hcd is required for USB 2.0. note the message in dmesg

em28xx: setting up device on a USB 1.1 bus
em28xx: your device won't work properly when
em28xx: not attached to a USB 2.0 highspeed bus


Solution

Re-enable ehci_hcd. Perhaps you added it to /etc/modprobe.d/blacklist? If so remove it.

Now lsusb doesn't list the device. Just blank entries, but you're sure it's plugged in. What's going on ????

You need to add this to your /etc/fstab

usbfs /proc/bus/usb usbfs auto 0 0

Now force a mount:

mount /proc/bus/usb


Now, you can reboot or force a reload of everything with something like this:

lsusb
/etc/init.d/mythtv-backend stop
sleep 1
rmmod em2880_dvb
rmmod em28xx
rmmod uhci_hcd
rmmod ehci_hcd
rmmod usbcore
rmmod tuner
rmmod tveeprom
rmmod xc3028_tuner
modprobe usbcore
modprobe ehci_hcd
#modprobe uhci_hcd
modprobe usbcore
modprobe em28xx
modprobe em2880_dvb
modprobe xc3028_tuner
/etc/init.d/mythtv-backend start
lsusb
dvbdate

dvbdate should return the current date from the "air". This is a good test of full functionality of a dvb tuner.

dmesg should show something like this instead

em28xx: device is attached to a USB 2.0 bus

Further reading

Official em28xx module support
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/88746

Adam : 9:21 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Saturday 10 November 2007

Converting mythtv recorded files

In order to use TV programs recorded by mythtv with a video editor such as Final Cut Pro some conversion needs to be done.

The first step is to fix the video using mythtranscode. Raw mpeg TS files recorded by mythtv will only play with mplayer/VLC but crash most other programs


mythtranscode --mpeg2 --infile input.mpg --outfile output.mpg

However, mythtranscode appears to loose the audio stream!

So run this to extract the audio from the original file


mplayer -vo null -hardframedrop -ao pcm:file=soundtrack.wav input.mpg

Now output.mpg and soundtrack.wav can be loaded into Final Cut Pro and you can edit away. This does not deinterlace the file though and various deinterlace filters in final cut do not appear to work.


Another way possibly better way to convert the files is use nuvexport. This has the disadvantage of quality loss of re-encoding the files. It does do de-interlacing. nuvexport also seems tied into mythtv, i.e. you can't give it arbitary mpeg files to work with as it queries the mythtv database to lookup the file.


nuvexport-xvid --transocde --deinterlace --quantisation 1 --a_bitrate 192 --v_bitrate 5000 --nice 10 --input=1001_20071025193000.mpg

Adam : 11:09 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Powered by
Movable Type 4.12