lirc and LCDproc for Soundgraph iMON changes

well… after an update quite a while ago my lirc and lcdproc stopped working. starting lirc on the default ubuntu install would always result in:

unable to load LIRC kernel modules. Verify your selected kernel modules in /etc/lirc/hardware.conf

so trying to add the modules manually would tell me a bit more:

root@augustiner:~$ modprobe lirc_imon
FATAL: Error inserting lirc_imon (/lib/modules/2.6.31-21-generic/updates/dkms/lirc_imon.ko): Unknown symbol in module, or unknown parameter (see dmesg)
root@augustiner:~$ dmesg | grep lirc_imon | tail -n1
[  420.742877] lirc_imon: Unknown parameter `islcd'

i noticed a line in the options that was wrong and removed it:

options lirc_imon islcd=0

lirc was back up and running but not my LCD screen. the logs showed:

[  492.637968] lirc_imon: lcd_write: invalid payload size: 32 (expecting 8)
[  492.762951] lirc_imon: lcd_write: invalid payload size: 32 (expecting 8)
[  492.887947] lirc_imon: lcd_write: invalid payload size: 32 (expecting 8)
[  493.012940] lirc_imon: lcd_write: invalid payload size: 32 (expecting 8)
[  493.137946] lirc_imon: lcd_write: invalid payload size: 32 (expecting 8)
[  493.262958] lirc_imon: lcd_write: invalid payload size: 32 (expecting 8)
[  493.387957] lirc_imon: lcd_write: invalid payload size: 32 (expecting 8)
...

some further googling and i found out that the options line has changed from release to release. to get it back working use:

options lirc_imon display_type=1

to get the write type just look into lirc_imon.c

enum {
   IMON_DISPLAY_TYPE_AUTO,
   IMON_DISPLAY_TYPE_VFD,
   IMON_DISPLAY_TYPE_LCD,
   IMON_DISPLAY_TYPE_NONE,
};

opera mini 5 released

just noticed today that opera mini 5 is out of beta status. i have been using this awesome browser for quite some time and there’s just no better browser out there.

opera mini requests every page through opera’s servers which process and compress each site visited, that way your data usage is kept at a minimum while sites load faster.

so get it while it’s hot and just point your phone browser to:
m.opera.com and if you want more infos check opera mobile

USEFUL TIP: to edit speed dial links just select an existing one and hold down “open” for a popup to appear with the options “clear” or “edit”

apple blocking trailers for non quicktime users

well the apple trailer site is actually a pretty nice resource for watching new trailers… up until a few weeks ago!

apple has been so nice to start blocking trailer play for users that do not have quicktime installed, so everybody on linux has been locked out of watching trailers directly on the site.

the good thing though is that there’s always a solution (and in this case it’s pretty simple) to this kind of nonsense!

on most apple trailer pages you see the size button for the trailers on the right side… if you copy the url for let’s say the medium video you should get something like this:

http://movies.apple.com/movies/independent/ihopetheyservebeerinhell/ihopetheyservebeerinhell_h.480.mov?width=480&height=204

so to watch this video just open a shell and use mplayer.

  • first we need a user agent to trick apple into serving us the movie file. after some research i found that
    'QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)'

    works nicely.

  • second we need to strip the size parameters from the url which would result in
    http://movies.apple.com/movies/independent/ihopetheyservebeerinhell/ihopetheyservebeerinhell_h.480.mov
  • third since we are streaming the movie let’s add a little buffer so mplayer can seamlessly play the file. in my example i chose 2048

so if we put this all together… the command would be

mplayer -cache 2048 -user-agent 'QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)' http://movies.apple.com/movies/independent/ihopetheyservebeerinhell/ihopetheyservebeerinhell_h.480.mov

and there we go, watching the trailers again…

[EDIT]
changed my code to include linux as the os ;)

mplayer -cache 2048 -user-agent 'QuickTime/7.6.2 (qtver=7.6.2;os=`uname -or`)' http://movies.apple.com/movies/independent/ihopetheyservebeerinhell/ihopetheyservebeerinhell_h.480.mov

transcode could not find a FFMPEG codec for ‘mpeg2video’

to create a dvd out of different videos i often use transcode, for example:

transcode -i input.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o movie -D0 -b224 -N 0x2000 -m movie.ac3 -J modfps=clonetype=3 --export_fps 25

after an update (don’t recall what and when) i recently started getting this error:

[export_ffmpeg.so] Could not find a FFMPEG codec for 'mpeg2video'.
[transcode] warning : (encoder.c) video export module error: init failed
[transcode] critical: failed to init encoder

i found that libav received a stripped version in the official repository. so i checked the multiverse repos and they have the unstripped version there. so uninstall these packages:

libavcodec51
libavdevice52
libavformat52

and replace them with these:

libavcodec-unstripped-51
libavdevice-unstripped-52
libavformat-unstripped-52

and your transcoding can continue!

ubuntu chromium daily builds

for everybody that’s wanted to try the google browser on your ubuntu machines there are repositories to get the pre-alpha version up and running in a few seconds.

check out https://launchpad.net/~chromium-daily/+archive/ppa and add the repositories.

then simply sudo apt-get update && sudo apt-get install chromium-browser

and run chromium-browser

well it’s supposed to be that easy… somehow it doesn’t work for me because i can’t see the rendered pages (it does load the data though)

chromium

and i can’t be bothered to try and get it running at the moment…

[UPDATE 31.03.2009]
well just got an update today and it works now… like the speed but the tab system doesn’t really work correctly yet…

disable HTTP cache cleaner notification for KDE apps on gnome

if you keep getting the annoying “Launching HTTP Cache Cleaner” in the panel on ubuntu 8.10 Intrepid Ibex while running amaroK or other KDE apps you’ll need the new kde4 systemsettings manager to hide this.

to get this to work just type:
sudo apt-get install kdebase-workspace-bin systemsettings

and then run
systemsettings

then this windows should popup
systemsettings

then click on desktop and you’ll see the notifications

Desktop Notifications

just uncheck the “enable taskbar notification” part and you’re done!

[edit]
for those who don’t want to install this stuff you can also just edit the file:
~/.kde/share/config/klaunchrc

and set
TaskbarButton=false

mine looks like this:
[BusyCursorSettings]
Blinking=false
Bouncing=true
Timeout=30

[FeedbackStyle]
BusyCursor=true
TaskbarButton=false

[TaskbarButtonSettings]
Timeout=30

[edit #2]
somehow this doesn’t quite work as good as i thought. you might want to check the ubuntu bug for updates.

time lapse: convert single jpg images to a movie

since they’re tearing down the buildings in front of our office and there’s been a cool webcam positioned near the site i wrote a little script to get the images and wanted to convert them into a time-lapse…

here’s the knowledge i gained from this little experiment.

first i thought that image magick could do the trick, i noticed that to create a mpeg2 video i needed a little encode program that i found here.
compiled this and moved it to /usr/bin

then i executed convert in my image directory

convert -delay 10 *.jpg m2v:time_lapse-test.mpg

the output was a nice little motion jpeg which i couldn’t use in my little video software called open movie editor (there’s probably better stuff out there but this is the first one i found and tried and seemed simple)

so i tried the ffmpeg approach

ffmpeg -r 5 -i %12d.jpg -y -an time_lapse-test.mpg

which i didn’t get working at all since the regex type image path just didn’t seem to find any images… so i gave up quite quickly.

so the next try was mencoder (should’ve tried this to begin with since mplayer/mencoder can just about do anything)

mencoder -ovc lavc -mf fps=3:type=jpg 'mf://*.jpg' -o time_lapse-test.avi

the result was a bad quality video… so i started using some params to get this sorted out

using this as help i tried “-ovc copy”, which was great and gave me a 1 to 1 copy of the jpegs

mencoder -ovc copy -mf w=800:h=371:fps=6:type=jpg 'mf://*.jpg' -o time_lapse-test.avi

great!! … i’m back at the mjpg which i can’t use in open movie editor!

so let’s encode it into some other video codec… i installed x264 and tried:

mencoder mf://*.jpg -mf w=800:h=371:fps=15:type=jpg -ovc x264 -x264encopts subq=5:8x8dct:frameref=2:bframes=3:b_pyramid:weight_b:qp_constant=26 -o time_lapse-test.avi

and i just didn’t get it to work without having to compile things… so i gave up once more ;)

some more research and after testing a few different bitrates, this is what gave me good results:

mencoder -nosound mf://*.jpg -mf w=800:h=371:type=jpg:fps=15 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2160000:mbd=2:keyint=132:v4mv:vqmin=3:lumi_mask=0.07:dark_mask=0.2:mpeg_quant:scplx_mask=0.1:tcplx_mask=0.1:naq -o time_lapse-test.avi

the important things here is setting the frames per second to 15 and the codec to mpeg4 with a bitrate of 2160000. everything else was gathered on different sites and really almost make no difference (in what you see at least)

so then i quickly edited movie… and saved it, it was way too big so encoded it again but this time with 2 passes and a smaller bitrate:

mencoder -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=1620000:mbd=2:keyint=132:v4mv:vqmin=3:vlelim=-4:vcelim=7:lumi_mask=0.07:dark_mask=0.10:naq:vqcomp=0.7:vqblur=0.2:mpeg_quant -mf type=sgi:fps=25 -nosound -o /dev/null time_lapse-test.avi

to generate the divx2pass.log then in the second pass i also added the mp3 music:

mencoder -ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=1620000:mbd=2:keyint=132:v4mv:vqmin=3:vlelim=-4:vcelim=7:lumi_mask=0.07:dark_mask=0.10:naq:vqcomp=0.7:vqblur=0.2:mpeg_quant -mf type=sgi:fps=25  -audiofile "/home/me/music.mp3" -oac copy -o time-lapse_216k_mp3.avi time_lapse-test.avi

and there you have the final movie!

delete divx2pass.log and upload to youtube :)

oh yeah… and added some meta tags

ffmpeg -title "destruction time-lapse" -author "munzli" -comment "www.munz.li" -acodec copy -vcodec copy -i time-lapse_162k_mp3.avi time-lapse_162k_mp3_meta.avi

and here you have it (needs to be high quality because compressed it looks even worse)

[edit]
well youtube blocked my video saying that a copyright owner has claimed it owns some or all of the audio content in my video. oh well the music industry is just something you shouldn’t support! just don’t understand why you can’t have a little video online that even mentions the music at the end and might even bring a song to a wider audience!

i encourage everybody to use riaaradar before purchasing their next album!

mythtv with mantis and DVB-S2 (TechniSat SkyStar HD2 continued…)

well thanks to awf and his comment i checked out mythtv (the release-0-21-fixes branch) and applied this patch, compiled and it kinda works.

that was the short version, here’s the longer one:

check out mythtv
svn co http://svn.mythtv.org/svn/branches/release-0-21-fixes/

download this patch right here and apply it from the mythtv folder using
patch -p0 < mythtv_multiproto.5.patch

then make sure you've got all the qt3 development libraries, the XvMC development libraries aswell as LAME and all the others (don't quite remember the whole list) but if you compile you'll find out what your missing.

to configure i used awf's parameters described in his post
./configure --enable-xvmc --enable-dvb --disable-hdhomerun --disable-firewire --enable-xvmc-opengl --enable-opengl-video --enable-opengl-vsync --enable-proc-opt --extra-cxxflags=-I/path/to/mantis/linux/include --extra-cflags=-I/path/to/mantis/linux/include
of course don't forget to correct the path to the mantis driver build.

of course now
make
sudo make install

then configure mythtv using mythtv-setup.

awf was nice enough to send me the dtv_multiplex table (which contains all the transport information for hotbird 13°E and astra 19.2°E) and so i went on to channel scanning... have all the hotbird channels... but can't scan astra eventhough i think i've got the disecq settings correct! if i look into the database it has my card and the inputs doubled, i can delete everything and it recreates them like that. soooo, a little help on the diseqc settings would be greatly appreciated ;)

of course if anybody want's the dtv_multiplex for hotbird and astra i'll gladly send it to you since it did help me out a lot! (of course if awf is cool with that)

thanks a bunch for the comments left here they helped out alot!

UPDATE: ok, got the astra channels scanned too. thanks to awf who pointed out Western union fees that i needed two video inputs (right now both set to EIT Western union fees that 's why i thought one wouldn't make a difference).

it scans ASTRA HD+ and ANIXE HD but it can't get a lock on both channels through mythtv. so the multiproto myth patch is still missing something or does anybody else have a good idea?

howto run a TechniSat Skystar HD2 on linux

since i’m switching from my analog WinTV-PVR-500 to a DVB-S setup in my mythtv box I installed a TechniSat Skystar HD2 card (a rebranded Azurewave AD SP400 CI VP-1041) and to my surprise I got it running fairly quickly.

here’s a description on the first steps i took in creating a mythtv box with DVB-S and hopefully DVB-S2.

install mercurial (distributed version control system). In debian based systems:
sudo apt-get install mercurial

then obtain the latest mantis multiproto drivers. there is no patching necessary for the card to run.
hg clone http://jusst.de/hg/mantisthen compile and install.
make
make install

more info can be obtained here under “Method 2”.

the modules can be loaded manually but to test the correct loading a reboot is easier. now the card should be loaded at boot.

to create a channels.conf you’ll need scan from the dvb-apps located on linuxtv.org.
the way to get this working quite easy is described here. the TerraTec Cinergy S2 PCI HD CI is another clone of the same card.

make sure that the changed line in the Makefile has the correct path. in the example it is
CPPFLAGS += -I/usr/src/mantis/linux/includebut since i compiled in my home directory my path was different (this is quite obvious but i thought i’d state it to be sure).

EDIT:i noticed that scan with the patch don’t work anymore… it should work just using the compiled scan in the dvb-apps/utils directory!

while running scan:
./scan dvb-s/Astra-19.2E > ~/.szap/channels.confcheck to see if these lines (or any stating: Using ‘STB0899 Multistandard’ DVB-S2) appear.
----------------------------------> Using 'STB0899 Multistandard' DVB-S2
Tune to frequency 11914500
DVB-S IF freq is 1314500
0x0006 0x0081: pmt_pid 0x0062 PREMIERE -- PREMIERE HD (running, scrambled)
0x0006 0x0082: pmt_pid 0x0063 PREMIERE -- DISCOVERY HD (running, scrambled)
0x0006 0x0084: pmt_pid 0x0065 BetaDigital -- ANIXE HD (running)
0x0006 0x0083: pmt_pid 0x0064 BetaDigital -- ASTRA HD+ (running)
then you know that DVB-S2 is working also! yay!

afterwards i had 1187 services only on Astra 19.2E. half of them scrambled but hey, the numbers count ;)

now to test the whole thing enter the dvb-apps/test directory and try zapping to a channel (check in the ~/.szap/channels.conf to see which number is good to go and not scrambled).
./szap2 -r -n 085
the output will show you some channel data and as soon as “FE_HAS_LOCK” is displayed (keep szap running) open mplayer in a different terminal
mplayer /dev/dvb/adapter0/dvr0
and you should see a picture! alright, the card is up and running!

all seems good but i still have a problem with DVB-S2. and that is as soon as i’m trying to display a DVB-S2 channel like ANIXE HD (channel #550 in my channels.conf)
./szap2 -r -t 2 -n 550i get a “FE_HAS_LOCK” but mplayer then just returns:
TS file format detected.
VIDEO MPEG2(pid=1535) AUDIO A52(pid=1539) NO SUBS (yet)! PROGRAM N. 0

and that’s it…

i think i’m missing some codecs or something (w32codecs,DeCSS, x264, etc. is installed).
any help is appreciated though ;)

NOTE: don’t forget to add the option “-t 2” for DVB-S2 for szap

UPDATE: i noticed that when i zap to a HD station and wait long enough i get this error right after the “TS file format detected”:
Too many audio packets in the buffer: (4096 in 7340032 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
MPEG: FATAL: EOF while searching for sequence header.
Video: Cannot read properties.

so i’m still unsuccessful at watching HD tv.

UPDATE 2!!: to watch HD tv stations you need the option -p when calling szap2!
-p : add pat and pmt to TS recording (implies -r)

so try
./szap2 -r -p -t 2 "ASTRA HD+" and open mplayer… wow

my 3GHz system that’s gonna be the mythbackend sometimes quits with mplayer saying:
************************************************
**** Your system is too SLOW to play this! ****
************************************************
which means… my frontend system is gonna have to be upgraded!