Saturday, June 12, 2010

MythTV on an EeeBox

As many other geeks, I've spent considerable time in my life setting up MythTV and trying really hard to set it up for the perfect media center experience. I'm still struggling with some points, but I've got it working pretty decently, so I thought I'd post the result of my process, along with the still quirky points. Then hopefully somebody can use it for setting up a decent media center, and if I'm really, really lucky, some of you über geeks may have a few tips to share in the comments, so I can iron out the last weird issues.

Please note: I live in Denmark, so certain points in this post may not be relevant to you (especially the XMLTV guide). For that, you'll have to consult other blogs or - shiver! - some actual documentation.

What I bought
To get up and running, I bought the following hardware:
  • EB1012 (an Asus EeeBox with the ION graphics chipset, no optical drives)
  • Anysee EC30 Combo Plus DVB-C/T (a USB tuner supporting both DVB-C and DVB-T, and it comes with a remote control)
Apart from that, I bought an antenna splitter and the shortest, cheapest HDMI cable I could find.

Characteristics of the system
There are thousands of possible setups for running MythTV, and many people have "enterprisey" setups with a monster back-end and several front-ends. So why did I choose this simple setup?
  • Decent power consumption. With everything plugged in and running, expect an average power consumption of about 22W (excluding your TV and other stuff, of course).
  • Discrete. The EeeBox is very quiet, and it hides nicely behind my TV. The Anysee tuner "peeks out" from below, exposing the IR receiver.
  • Enough CPU and GPU power to easily play back all the contents I need to play, including HD content.
  • HDMI, separate digital optical audio (note: the EeeBox comes with a converter to plug into the jack plug at the back of the computer, so you don't need to buy one), enough USB ports, card reader, 802.11n wireless (and gigabit ethernet if you want), eSATA, ...
  • MythTV has a lot of nice features, and Ubuntu lets you fiddle with everything.
The EeeBox "only" has a 250GB harddisk, which may be too small for you. For me, it works, since I like to delete old, watched recordings anyway (and delete the ones I accept that I won't see anyway).

MythTV isn't for the faint-hearted, which this guide should make clear. I expect you to have basic Linux skills, otherwise this guide is probably useless, and in that case you should go for something simpler like EyeTV on a Mac or Windows Media Center on a Windows box.

Get Mythbuntu 10.04 from Put it on a USB key, and make this USB key bootable.

Well, that's just not as easy as I thought it would be. There are lots of blogs out there telling you how to do it, but the only way I got it working, was with the help of a little Windows program called "Linux Live USB Creator" ( It does not recognize Mythbuntu directly, but it supposes it's an Ubuntu variant, which is correct.

Anyway, when you have your bootable USB key ready, put it in one of the USB ports on the EeeBox, and power on the EeeBox while holding down the F8 key on the keyboard.

How you choose to partition your hard disk is entirely up to you. I chose 20GB for the root partition, 5GB for swap, and the rest mounted as "/data". Other values will probably fit your needs better.

When prompted, choose having a combined front-end and back-end.

When your new MythTV box has booted for the first time, open "Mythbuntu Control Centre", go to the "Repositories" page, and select updates from "0.23 fixes". After that, run Update Manager, install all updates, and reboot.

Without this step, several components of MythTV didn't work properly for me.

Storage paths
Before you start using MythTV for real, remember to adjust the paths in MythBackend that define where recordings, live-tv, etc. go. It's under "Storage Directories". If, like me, you've mounted most of the EeeBox harddisk under "/data", you probably want values such as "/data/mythtv/recordings", "/data/mythtv/livetv", etc.

You should also create these directories in the file system, and remember to give proper rights to the mythtv user. I've just set all these directories to the mythtv user, the mythtv group, and given all rights possible. Perhaps that's a bit too much, but I don't want to spend time fiddling with this.

Open "Mythbuntu Control Centre" again, go to the "Graphics Drivers" page, click "Launch Restricted Drivers Manager", and select both "Firmware for DVB cards" and "NVIDIA accelerated graphics driver". You'd think you didn't need the firmware for DVB cards, but without it, you cannot make the Anysee remote control work later.

Tuner in DVB-C mode
(I'm not sure if this first step is necessary - I'll check it out next time I re-install from scratch). Run this from a terminal:

modprobe dvb_usb_anysee delsys=0

Unfortunately, there is both a DVB-C driver and a DVB-T driver recognizing the tuner, so you'll still have trouble using the tuner after this. To fix this, you have to blacklist one of the drivers. In this case, we want to blacklist the DVB-T tuner. Add the following lines to /etc/modprobe.d/blacklist.conf:

# Force Anysee tuner into DVB-C mode
blacklist zl10353

If you want to run in DVB-T mode instead, you have to blacklist "tda10023" instead.

Setting up the tuner in MythTV
The card type must be set to "DVB DTV capture card (v3.x)", and the DVB Device Number should be set to "/dev/dvb/adapter0/frontend0". The next line should then tell you that "Frontend ID" is "Philips TDA10023 DVB-C Subtube DVB-C".

I've set my "Signal Timeout" to 5000ms and "Tuning Timeout" to 20000ms.

Channel search and setup
It's somewhat of a circus setting up channels, since subsequent, identical searches can yield different results. My only advice is to try a few times and then hope you can stitch together your channel setup. Try setting "Signal Timeout" and "Tuning Timeout" high (as I've done - see above).

I use a Danish provider called Stofa, and I can find all of their channels on frequency 346000000, modulation QAM64, symbol rate 6900000. This is probably different for your setup.

Sometimes MythTV tells me it has found a number of "off-air channels". I've no idea what that means, but typically they are channels already found as regular channels anyway.

In Denmark, the main national TV provider, DR, has a service that lets you grab the program information of the most used channels. You can use a grabber like "".

The XMLTV Perl package is installed by default in Mythbuntu, but you need to install "libparse-recdescent-perl". Then you can put the grabber script in your home directory and create the following script:

source /home/me/.profile
mv /var/log/mythtv/tvgrabbed.xmltv.1 /var/log/mythtv/tvgrabbed.xmltv.2
mv /var/log/mythtv/tvgrabbed.xmltv /var/log/mythtv/tvgrabbed.xmltv.1
cd /home/me/
./tv_grab_dk_dr_2009.mgr --days 10 --output /var/log/mythtv/tvgrabbed.xmltv > ${LOGFILE} 2>&1
/usr/bin/mythfilldatabase --file 1 /var/log/mythtv/tvgrabbed.xmltv >> ${LOGFILE} 2>&1

Then set up a Cron job: Run "crontab -e", define a line like:

00 06 * * * /home/me/

Additionally, you ned to start "mythtv-setup" and define a new "Video Source" with the name "dr-xmltv" and "No grabber" as "Listings grabber". Under "Input Connections", this video source must be connected to the tuner.

Finally, run your new script. Then in MythWeb you can insert the right XMLTV IDs on the corresponding channels. Run the script again, and you get a proper channel listing in MythWeb.

Sound via HDMI or TOSLINK
If you want sound through the HDMI cable, create the file /etc/asound.conf with the following contents:

pcm.!default {
  type hw
  card 0
  device 3

If instead you want sound through the optical digital out, specify device 1.

Start "alsamixer" from a terminal and unmute "S/PDIF 1" by clicking M on it.

Picture quality
Turn on VDPAU in the "Setup -> TV Settings -> Playback", otherwise the EeeBox doesn't stand a chance when playing HD content.

Enable "OpenGL Vertical Sync" under "Setup -> TV Settings -> Playback". Otherwise you get "tearing" in the picture (i.e., the content is updated in the middle of the picture, so you have one part of the picture showing the previous frame, and the rest is playing the next frame).

Still, playback isn't always perfect, since the refresh rate on your TV doesn't necessarily match the refresh rate of the played material. To fix this, you need to do two things: First, go to "Setup -> Appearance", and on the "Video Mode Settings" page, check "Separate video modes for GUI and TV playback". Just choose "Any" as the rate for the GUI, and don't change the values in the "Overrides for specific video sizes" section.

Secondly, open nvidia-settings and uncheck the "Force Full GPU Scaling" on one of the pages. Voila! Playback is now perfect! (At least on my setup :-) )

The remote control
First and foremost you need to open "Mythbuntu Control Centre", go to the "Infrared" page, and check "Enable a Remote Control". Choose "Linux input layer (/dev/input/eventX)". If you cannot find this, it's because you didn't install the proprietary drivers - see above!

Run "cat /proc/bus/input/devices" from a terminal. Near the bottom of the output you'll see something like this:

I: Bus=0003 Vendor=1c73 Product=861f Version=0100
N: Name="IR-receiver inside an USB DVB receiver"
P: Phys=usb-0000:00:04.1-6/ir0
S: Sysfs=/devices/pci0000:00/0000:00:04.1/usb1/1-6/input/input6
U: Uniq=
H: Handlers=kbd event6
B: EV=3
B: KEY=148fc010 2353041 0 0 0 800 108000 4080 304801 9e0000 0 0 ffc

From the "H:" line, you can see that the remote control exists on "/dev/input/event6" - it is probably different on your system, since it depends on which USB port your tuner is in, and which other peripherals you have attached to your EeeBox.

Edit "/etc/lirc/hardware.conf", change the line




Then you can restart lirc with "sudo service lirc restart".

There is one real downside to doing this: Each time you reboot your EeeBox, you must have the same peripherals attached, otherwise your remote control will appear as another path. I haven't fixed this, but it should be fixable by doing this: Create "/etc/udev/rules.d/60-anysee.rules" (owner root, group root, "-rw-r--r--", just like the other files in that directory) with contents:

ATTRS{name}=="IR-receiver inside an USB DVB receiver", SYMLINK+="input/dvb-ir"

Now the remote control (also) appears as "/dev/input/dvb-ir", so you can set REMOTE_DEVICE in the lirc hardware.conf file to that. However, lirc refuses to use it, and even worse, as long as the udev rule exists, it even refuses to use "/dev/input/event6". So, I need to attach my keyboard and mouse each time I reboot my EeeBox...

Key bindings for the remote control
The remote control's "|<<" and ">>|" buttons are not "mapped" to anything in MythFrontend. I've chosen to let them work as "rewind" and "fast forward", respectively. You do this by opening "~/.lirc/mythtv" and insert the following lines:

  remote = devinput
  prog = mythtv
  button = KEY_NEXT
  config = Right
  repeat = 0
  delay = 0

  remote = devinput
  prog = mythtv
  button = KEY_PREVIOUS
  config = Left
  repeat = 0
  delay = 0

Playback in MythWeb
A really nice "gimmick" in MythWeb is the Flowplayer media player, which gives a YouTube-like interface to your recordings. In MythWeb, click the "MythTV:" link (upper left corner), select "Settings -> MythWeb -> Video Playback", and select "Enable Video Playback".

Securing MythWeb
There are several guides "out there" that tell you how to fiddle with stuff in /etc/apache2, /etc/httpd, etc. None of those guides seem to work... but that doesn't matter, since you just have to open "Mythbuntu Control Centre" (start it as root), go to the "Plugins" page, and enable password protection.

Start/end of recordings
It's nice to start recording e.g. 2 minutes before the official starting time, and end recording e.g. 5 minutes after the official ending time. In MythWeb, you can alter the setting "DefaultStartOffset" and "DefaultEndOffset". Both are specified in minutes, so I've set them to 2 and 5, respectively. This implies that the default values of the fields "Start Early" and "End Late" in the recording dialog page will be set to 2 and 5 minutes.

Issues still not sorted out
My daily Cron job doesn't always run. However, it successfully runs often enough that I don't have problems with my channel listing.

When I reboot the EeeBox, I need to have my keyboard and mouse attached, otherwise the remote control won't work. It seems like udev and lirc don't like each other.

Update (25th of August 2010): My setup has been working quite badly the last month or so, since the back-end sometimes takes 30 to 40 minutes to change the channel. I've borrowed another Anysee tuner from a friend, but that didn't fix the problem, so either my cable provider is sending a poorer signal (which would be weird, since my TV has no problem), or a bug has been introduced either in MythTV or the kernel driver. At around the same time, the 0.23-fixes branch was ended, and no Mythbuntu updates switched to the 0.23.1-fixes branch. I've switched to the 0.23.1-fixes branch by executing this from the command-line:

sudo add-apt-repository ppa:mythbuntu/0.23.1
sudo apt-get update

I haven't updated MythTV yet (it takes proper planning in a busy household...), so I've yet to see if this helps.

Helping me get this far required a number of resources on the net. In all fairness I'll list them here:


  1. Does you Anysee Remote still works fine with Mythbuntu 11.04?

    I'm only able to use the number keys for switching channel and the volume keys.

  2. Oh, sorry about the late reply... don't know if I can configure Blogger to send me an e-mail when comments are added.

    I think it worked fine after I upgraded to Mythbuntu 11.04, but I have ditched the Anysee tuner + remote in favour of a HDHomeRun box and a decent remote. I've described the HDHomeRun change here:

    I haven't documented how to make the remote work, simply because it was mostly "plug'n'play". I bought this remote, but other MCE remotes probably work just as well:

    All you have to do to get the remote working is to choose "Windows Media Center Tranceivers/Remotes (all)" as "Remote Control" in Mythbuntu Control Center and check "Generate dynamic button mappings". At least, this should work in LIRC 0.8.7 and newer.

    In my opinion it's worth the extra money, since the Anysee remote is quite crappy compared to e.g. the Foxconn remote.

  3. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.

    selenium Training in Chennai

    amazon web services Training in Chennai

    rpa Training in Chennai

  4. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.

    rpa Training in Chennai

    rpa Training in bangalore

    rpa Training in pune

    blueprism Training in Chennai

    blueprism Training in bangalore

    blueprism Training in pune

    rpa online training

  5. After seeing your article I want to say that the presentation is very good and also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.
    python training in pune
    python online training
    python training in OMR

  6. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    Devops training in velachery
    Devops training in annanagar
    Devops training in sholinganallur

  7. Really nice experience you have. Thank you for sharing. It will surely be an experience to someone.
    Blue Prism Training Course in Pune

    Blue Prism Training Institute in Bangalore

  8. Good Post, I am a big believer in posting comments on sites to let the blog writers know that they ve added something advantageous to the world wide web.
    angularjs-Training in sholinganallur

    angularjs-Training in velachery

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in btm

  9. Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
    AWS Training in Bangalore |Best AWS Training Institute in Bangalore BTM, Marathahalli
    AWS Training in Chennai | AWS Training Institute in Chennai Velachery, Tambaram, OMR

  10. Hey, Wow all the posts are very informative for the people who visit this site. Good work! We also have a Website. Please feel free to visit our site. Thank you for sharing.Well written article Thank You Sharing with Us pmp training Chennai | pmp training centers in Chennai | pmp training institutes in Chennai | pmp training and certification in Chennai | pmp training in velachery

  11. hank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me 

    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

  12. java
    Very good information. Its very useful for me. We need learn from real time examples and for this we choose good training institute, we need to learn from experts . So we make use of demo classes . Recently we tried java demo class of Apponix Technologies.

  13. Definitely a great post. Hats off to you! The information that you have provided is very helpful.

    Data Science Bangalore

  14. Very nice post here and thanks for it .I always like and such a super contents of these post.
    date analytics certification training courses
    data science courses training

  15. I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more.

    Data Science Course

  16. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good science course in dubai

  17. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!data science course in dubai

  18. Super site! I am Loving it!! Will return once more, Im taking your food likewise, Thanks.
    Data Science Course in Pune

  19. Really I Appreciate The Effort You Made To Share The Knowledge. This Is Really A Great Stuff For Sharing. Keep It Up . Thanks ForQuality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing. data science course in singapore

  20. If you have Natural Curls or Curly Hair, you are just blessed. You can experiment with many Hairstyles which will Look Stylish here we tell about top best and easy Curly Hairstyles

  21. I like viewing web sites which comprehend the price of delivering the excellent useful resource Python training in pune free of charge. I truly adored reading your posting. Thank you!


  22. Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.
    How to Start A blog 2019
    Eid AL ADHA

  23. I am looking for and I love to post a comment that "The content of your post is awesome" Great work!
    Data Science Courses

  24. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.
    machine learning course malaysia


  25. thanks for your information really good and very nice web design company in velachery

  26. Awesome..I read this post so nice and very imformative information...thanks for sharing
    Click here for data science course

  27. I Love your website i am ready your all website article 먹튀검증

  28. i love your website thanks for share this amazing content 파워볼사이트

  29. Really i found this article more informative, thanks for sharing this article! Also Check here

    Download and install Vidmate App which is the best HD video downloader software available for Android. Get free latest HD movies, songs, and your favorite TV shows

    Vidmate App Download

    Vidmate apk for Android devices

    Vidmate App

    download Vidmate for Windows PC

    download Vidmate for Windows PC Free

    Vidmate Download for Windows 10

    Download Vidmate for iOS

    Download Vidmate for Blackberry

    Vidmate For IOS and Blackberry OS

  30. Really i found this article more informative, thanks for sharing this article! Also Check here

    Download and install Vidmate App which is the best HD video downloader software available for Android. Get free latest HD movies, songs, and your favorite TV shows

    Vidmate App Download

    Vidmate apk for Android devices

    Vidmate App

    download Vidmate for Windows PC

    download Vidmate for Windows PC Free

    Vidmate Download for Windows 10

    Download Vidmate for iOS

    Download Vidmate for Blackberry

    Vidmate For IOS and Blackberry OS

  31. Really nice post. Thank you for sharing amazing information.
    ccc exam related all full forms

  32. Very Nice and Great i was lucky to find a good language school near berlin where i live.

    I took some private language lessons and was really suprised how much better i picked up the language 우리카지노

  33. Nice blog,I understood the topic very clearly,And want to study more like this.
    Data Scientist Course

  34. After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.

    digital marketing course

  35. 이러한 최고의 노치 팁으로 비즈니스의 SEO 개선에 도움을주십시오!

    웹 사이트의 각 카테고리별로 높은 게재 위치를 달성하는 방법을 이해하는 것은 문자 그대로 성공적인 비즈니스와 실패한 벤처의 차이입니다. 비즈니스 거래에 성공하려면 아래에 제공된 검색 엔진 최적화 팁을 읽으십시오.

    URL에서 관련 키워드를 사용하여 최대 검색 엔진 순위에 맞게 웹 사이트를 설정하십시오. 키워드가 페이지의 다른 곳에 나타나는 한 검색 엔진은 URL에 사용 된 용어에 상당한 가중치를 부여합니다. 사이트에 사용 된 도메인 이름을 제어 할 수없는 경우에도 페이지 이름은 귀하에게 달려 있습니다.

    사이트 SEO를 설정할 때 사이트의 URL을 잊지 마십시오. 도메인을 설정하면 하위 도메인보다 도메인이 더 좋습니다. 또한 약 10 단어를 초과하는 URL은 스팸으로 분류 될 위험이 있습니다. 도메인에서 약 3-4 개의 단어를 원하고 페이지 이름에서 6 또는 7을 넘지 않아야합니다.

    웹 사이트에 권한이 있는지 확인하십시오. 검색 엔진 최적화는 고객 및 / 또는 고객이 브랜드를 신뢰하는 경우에만 성공할 수 있습니다. 기억하기 쉬운 전용 도메인 이름은 사람들이 웹 사이트 체크 아웃을 마치고 오랫동안 기억할 수있는 브랜드를 구축하는 첫 번째 단계입니다.

    검색 엔진 결과 페이지 상단에 도달하는 확실한 방법 중 하나는 훌륭한 콘텐츠를 보유하는 것입니다. 흥미 롭거나 재미있는 정보를 지속적으로 제공하면 사람들이 자연스럽게 귀하의 사이트로 돌아 가기를 원할 것입니다. 훌륭한 콘텐츠를 만들기 위해 노력하는 경우 전문 작가를 고용하는 것이 좋습니다.

    이러한 아이디어 중 일부를 바로 사용할 수 있지만 다른 아이디어는 장기적으로 효과적 일 수 있습니다. 귀하의 사이트를 더 잘 인식하려면 다음 정보를 현명하게 사용하십시오 구글상단대행.


  36. Really awesome blog!!! I finally found a great post here.I really enjoyed reading this article. It's really a nice experience to read your post. Thanks for sharing your innovative ideas. Excellent work! I will get back here.
    Data Science Course in Marathahalli
    Data Science Course Training in Bangalore

  37. Attend The Data Science Training Bangalore From ExcelR. Practical Data Science Training Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Science Training Bangalore.
    Data Science Training Bangalore
    Data Science Interview Questions

  38. Very useful blog thanks for sharing very nice 아바타배팅

  39. i think you are very nice person because your website is very great 코인카지노

  40. Great Blog! The concept has been explained very well. Thanks for sharing nice information
    Machine Learning Training in Hyderabad

  41. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.

    artificial Intelligence course

    machine learning courses in mumbai

  42. Your Website is very good, Your Website impressed us a lot, We have liked your website very much.
    We have also created a website of Android App that you can see it.

  43. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science training

  44. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science training

  45. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries.
    Data science Interview Questions

  46. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries.
    Data science Interview Questions
    Data Science Course

  47. It's a wonderful post and very helpful, thanks for all this information about Java. You are including better information regarding this topic in an effective way.Thank you so much.
    Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

  48. Attend The Business Analytics Courses From ExcelR. Practical Business Analytics Courses Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Analytics Courses.
    Business Analytics Courses