mythtv

Dec 19 2008

MythTV recover Lost+Found

My MythTV store lives on an LVM volume that is spread over 2 disks, one of them is an external USB disk. So the cleaninglady seems to have touched a cable and after coming back from holiday I had a read-only filesystem that afer a remount had about 350Gb in lost+found with irrelevant filenames.

  1. total 337407844
  2. drwx------ 2 tv tv 4096 Dec 17 22:47 .
  3. drwxrwxrwx 15 tv tv 4096 Dec 17 22:44 ..
  4. -rw-r--r-- 1 root root 423343556 Dec 14 07:10 I303109.RCN
  5. -rw-r--r-- 1 root root 2990538924 Dec 13 19:05 I303107.RCN
  6. -rw-r--r-- 1 root root 1023691768 Dec 13 08:10 I319494.RCN
  7. -rw-r--r-- 1 root root 1023622348 Dec 13 07:45 I327684.RCN
  8. -rw-r--r-- 1 root root 423735892 Dec 13 07:10 I327682.RCN
  9. -rw-r--r-- 1 root root 466749476 Dec 12 15:43 I135169.RCN
  10. -rw-r--r-- 1 root root 1023314212 Dec 12 07:45 I098309.RCN
  11. -rw-r--r-- 1 root root 1022459928 Dec 12 06:35 I098306.RCN
  12. -rw-r--r-- 1 root root 2458822948 Dec 9 22:50 I139264.RCN
  13. -rw-r--r-- 1 root root 2129683736 Dec 9 21:30 I323592.RCN
  14. -rw-r--r-- 1 root root 466735992 Dec 9 15:43 I323590.RCN
  15. -rw-r--r-- 1 root root 1022747296 Dec 9 07:45 I323588.RCN

Obviously I wanted to recover my data.
So I had files with a wrong filename on a filesystem but with a correct timestamp and probably the right filesize.
Luckily the mythconverg.recorded table also gives me lots of information about the files that mythtv had originally stored the content in.

  1. mysql> select basename,lastmodified,filesize from recorded limit 10;
  2. +---------------------------+---------------------+------------+
  3. | basename | lastmodified | filesize |
  4. +---------------------------+---------------------+------------+
  5. | 1003_20081003230000.mpg | 2008-10-07 21:53:49 | 6197765380 |
  6. | 1093_20080320232600.mpg | 2008-03-20 23:25:31 | 0 |
  7. | 1075_20060301191300.mpg | 2006-03-24 22:48:42 | 0 |
  8. | 1002_20080729160500.mpg | 2008-07-29 19:20:30 | 3679223940 |
  9. | 592251_20081217072000.mpg | 2008-12-17 07:20:02 | 0 |
  10. | 1002_20080911143500.mpg | 2008-09-11 16:41:44 | 3486101572 |
  11. | 1002_20080923143500.mpg | 2008-09-23 16:49:41 | 3679789684 |
  12. | 1033_20081110153500.mpg | 2008-11-10 15:47:12 | 338877000 |
  13. | 1002_20080922144000.mpg | 2008-09-22 16:47:38 | 3485505140 |
  14. | 1002_20080721160500.mpg | 2008-07-23 20:52:16 | 3679559444 |
  15. +---------------------------+---------------------+------------+
  16. 10 rows in set (0.00 sec)

My first idea was to use the mysql filesystem engine to query the filesytem and write me a simple query however I totally failed to build that engine :(
(Anyone else successfull here ? )

So I created a temp table

  1. CREATE TABLE `temp2` (
  2. `size` bigint(20) default NULL,
  3. `oldname` varchar(255) default NULL,
  4. `lastmod` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
  5. ) ENGINE=MyISAM DEFAULT CHARSET=latin1

And parsed the content of my lost+found directory into a set of insert statements

  1. ls -l --time-style=long-iso | awk -F' ' '{print "insert into temp2 values (" $5 ",\"" $8"\",\""$6" "$7"\");"}'

From there is a matter of grabbing the matching filenames

  1. echo "select \"mv \" , oldname, basename from recorded, temp2 where temp2.size= recorded.filesize ;" | mysql mythconverg

And moving the actual files ... now all is back to normal ..

Oct 23 2008

MythTV Broken again :(

The earlier posted fix , getting my data from mythportal seemed to be a temporary solution.

It also seems the solution that was mentioned at Kristof Vanhertum's blog , the agent fix doesn't work anymore either.

Somewhere in the comments of that post however people start referring to mc2xml a tool to get your info (even 14 days worth of it) from a really untrustworthy source and import it amongst other tools into MythTV

No source code to be found, just a binary .. something that always scares me .. But running the thing (first time as a dummy empty user, one never knows) actually seems to give me an XML file with relevant data , to be used by mythfilldatabase.

  1. ./mc2xml -c be -g 2610
  2. Loading ..... : mc2xml <mc2xml@gmail.com> (2008-09-15)
  3. Connecting .. : microsoft.com
  4.  
  5. Select lineup:
  6.  
  7. 0: TER Unmapped Analogue Terrestrial
  8. 1: TER Unmapped Digital Terrestrial
  9. 2: CAB Unmapped Analogue Cable
  10. 3: CAB Unmapped Digital Cable
  11. 4: SAT Unmapped Analogue Satellite
  12. 5: SAT Unmapped Digital Satellite
  13. 6: SAT TV Vlaanderen Digital Satellite
  14. 7: TER TV Vlaanderen Digital terrestrial
  15. 8: CAB Telenet Analog Kabel (132)
  16.  
  17. (0-8): 8
  18.  
  19. Downloading . : microsoft.com
  20. Downloaded .. : 353944 bytes
  21. Source ...... : BDS
  22. Headend ..... : 7200116
  23. Version ..... : 2693590756
  24. Start time .. : 2008-10-23T00:00:00 UTC
  25. End time .... : 2008-11-06T23:55:00 UTC
  26. Parsing ..... : Telenet Analog Kabel (132)
  27. Writing ..... : xmltv.xml
  28. Writing ..... : mc2xml.dat
  29. Completed ... : 5384193 bytes in 26s, 27 channels, 9409 programs scheduled.

Yes that's my actual postcode. Different postcode values will give you other alternatives such as Coditel/Integan .. so you better use the right one.

I`m not really satisfied however, it fails to recognize my already defined channels. So I seem to have something that at first sight looks like relevant data . Only my channel numbers are way way way off ..

I need to fix that asap. The only problem being that tomorrow it's Geekdinner and I`ll be spending the rest of the weekend at T-Dose hence I have no time to fix this anymore ...

Anyone got a quick fix for that ? Or will I just have to live with a weekend of non-recordings ? :)

Well.. maybe next week will be a productive one then :)

Oct 14 2008

MythTV Fixed

I guess I really was the only one still using the original program guide and not using the one from mythportal.be

So after replacing my good old mythfilldatabase script with the one as listed there things are back to normal and my database is filled again.


Last mythfilldatabase run started on 2008-10-14 22:01 and ended on 2008-10-14 22:01. mythfilldatabase ran, but did not insert any new data into the Guide. This can indicate a potential problem with the XML file used for the update.
There's guide data until 2008-10-19 19:00 (5 days).

Oct 14 2008

MythTV Broken :(

Dear Lazyweb,

Disaster just stroke.. my old and trustworthy mythtv box just stopped getting it's program data.

Running mythfilldatabase gives me numerous

WARNING: &channel; is not mapped! Please check the code!
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
self.run()
File "/usr/bin/tv_grab_be_tvb", line 482, in run
prog_list = self.grabber.get_programs( html_struct )
File "/usr/bin/tv_grab_be_tvb", line 240, in get_programs
table_struct = html_structure.children[ 4 ]
IndexError: list index out of range

tv_grab_be_tvb fails on me :( I can't be the first one to run into this problem .. or amy the only one around still using tv_grab_be_tvb ? Yes I know my mythtv setup could use some updating (0.19 now) but I have no time for that...

So anyone got a clue what could have caused this ? And why I haven't read about it yet ?

Apr 22 2008

MythTV Woes

Totally forgot to blog about this, or I can't find my own post back.

A couple of weeks ago I was chatting with Tom about MythTV and MPEG bitrates, and I modified mine from my lazy chair.

A week passed by and I realized that I couldn't replay any of the recordings I had made :(

It seemed that while I had changed the bitrate I also accidently had changed
my default recording profile from MPEG-2 PS, to MPEG-2 TS.

Upon realizing that I changed the value back and I had recordings again :)

Jan 24 2008

Where to get Miro

I totally missed out about Democracy being rebranded to Miro , so I ended up downloading the RPM from getmiro.com It totally kept crashing on me ..
while looking at the reasons and if there were updates I noticed the FC7 version at the Miro site being totally outdated when compared to what Fedora itselve already had in it's repository.
guess what .. that version works like a charm ..

Now I only need to figure out a way to integrate Miro with my MythTV box
I`m running an rsync --delete from my laptop where I`m downloading stuff to /var/lib/mythvideo
and I delete videos I've seen on my laptop via the Miro interface.
So far that beats watching video's on my laptop screen.

However .. I actually would like to be able to tag video my videos and have my MythTV box download the content by the time I get home to watch it.

Werner ?

Nov 14 2007

Digital Television in Belgium

Beste Frank

Too bad you spend some unneeded money.. what you should have done is build yourselve a nice MythTV box.
Has all the features you list.. and doesn't need a subscription .

Sep 26 2007

Zatoo

I've just been Zattood, meaning that I can now watch real time local TV on my computer.

There is both an OSX client and a Linux client and some weird OS client for those who care too
I just tested it and it seems pretty fast an usable for someone who has an IP connection and sporacdially wants to watch TV.
However I couldn't care less .. I have cable and I never watch realtime TV anymore.

MythTV does that for me .. and I watch the shows weeks later :)

Jul 06 2005

iMon for Linux

Just ran into the Linux Drivers for Soundgraph Imon page , google really hid it well this time.
Got a working module now

The lsusb output shows

root@mythtv-fc3 misc# lsusb 
Bus 002 Device 002: ID 15c2:ffdc

Upon modprobing lirc_imon we get

 lirc_dev: IR Remote Control driver registered, at major 61
/usr/src/lirc-0.7.1/drivers/lirc_imon/lirc_imon.c: Driver for Soundgraph iMON MultiMedian IR/VFD, v0.3
/usr/src/lirc-0.7.1/drivers/lirc_imon/lirc_imon.c: Venky Raju <dev@venky.ws>
/usr/src/lirc-0.7.1/drivers/lirc_imon/lirc_imon.c: imon_probe: found IMON devicelirc_dev: lirc_register_plugin: sample_rate: 0
/usr/src/lirc-0.7.1/drivers/lirc_imon/lirc_imon.c: imon_probe: Registered iMON plugin (minor:0)
/usr/src/lirc-0.7.1/drivers/lirc_imon/lirc_imon.c: imon_probe: iMON device on usb<2:2> initialized
usbcore: registered new driver lirc_imon

And irw gives us the following output

root@mythtv-fc3 misc# irw
0000000029b715b7 00 AppLauncher iMON-PAD
00000000288195b7 00 AppExit iMON-PAD
00000000298115b7 00 Record iMON-PAD
0000000028a195b7 00 Enter iMON-PAD
0000000028b715b7 00 MouseMenu iMON-PAD
000000002b8195b7 00 WindowsKey iMON-PAD
00000000299115b7 00 MouseKeyboard iMON-PAD
0000000028a395b7 00 Vol+ iMON-PAD
0000000028a595b7 00 Vol- iMON-PAD
00000000289395b7 00 Ch+ iMON-PAD
00000000288795b7 00 Ch- iMON-PAD
000000002b8395b7 00 Timer iMON-PAD
000000002b9595b7 00 Mute iMON-PAD
0000000028b595b7 00 1 iMON-PAD
000000002bb195b7 00 2 iMON-PAD
0000000028b195b7 00 3 iMON-PAD
000000002a8595b7 00 4 iMON-PAD
00000000299595b7 00 5 iMON-PAD
000000002aa595b7 00 6 iMON-PAD
000000002b9395b7 00 7 iMON-PAD
000000002a8515b7 00 8 iMON-PAD
000000002aa115b7 00 9 iMON-PAD
0000000028b515b7 00 ShiftTab iMON-PAD
000000002ba595b7 00 0 iMON-PAD
0000000029a115b7 00 Tab iMON-PAD

As said before.. to be continued :)

And I got to see some results from the remote :