MythTV Freesat
Introduction
This page contains my notes on setting up MythTV with DVB-S/S2 Freesat in the UK. This is my second MythTV server, which follows on from the page MythTV_Paully.
My initial impressions are "this is not a walk in the park, and a lot harder than standard DVB-T".
- Installation Medium: Mythbuntu 9.10 CD
- Installation Date: Thursday 24 December 2009
- MythTV Version: 0.22.20091023-1
# apt-cache showpkg mythtv Package: mythtv Versions: 0.22.0+fixes22594-0ubuntu1
# mythfrontend --version MythTV Version : 22594 MythTV Branch : branches/release-0-22-fixes Network Protocol : 50 Library API : 0.22.20091023-1 QT Version : 4.5.2
Setup
All these notes relate to my setup...
- Mythbuntu 9.10
- MythTV 0.22
- NVIDIA UNIX x86_64 Kernel Module 185.18.36 Fri Aug 14 17:35:21 PDT 2009
- Asus M4A785TD-M EVO Motherboard
- Asus BIOS Version 0807 (09/04/09)
- ATI Radeon HD 4200 Graphics (onboard)
- NVIDIA GeForce 7300 GS (G72) 512Mb (PCI-E)
- Hauppauge Nova-HD-S2 PCI TV Card (Hauppauge WinTV-HVR4000(Lite) DVB-S/S2 [card=69,autodetected])
Problems From The Start
- Buzzing sound all the time (still unresolved)
- TV card not scanning (firmware fix for this below)
Hauppauge Nova-HD-S2 Firmware Bug Fix
sudo apt-get install unzip wget http://www.wintvcd.co.uk/drivers/88x_2_124_27191_1_WHQL.zip unzip -jo 88x_2_124_27191_1_WHQL.zip Driver88/hcw88bda.sys sudo dd if=hcw88bda.sys of=/lib/firmware/dvb-fe-cx24116-1.26.90.0.fw skip=105768 bs=1 count=32674 sudo mv /lib/firmware/dvb-fe-cx24116.fw /root/ sudo ln -s /lib/firmware/dvb-fe-cx24116-1.26.90.0.fw /lib/firmware/dvb-fe-cx24116.fw sudo reboot
ATI (Onboard GFX) Double Picture Bug Fix
You need to change your playback profiles to use the one field filter or no filter.
In myth, Utilities/Setup -> Setup -> TV Settings -> Playback
Hit Next a couple of times until you get to the Playback profiles screen
Edit each applicable profile, press Next on the screen that appears initially, and set the Primary de-interlacer to either none or one field. Set the Fallback de-interlacer to none. Remember to hit finish when done.
There are also per-channel settings you can stuff around with in mythtv-setup, but that’s probably not necessary.
Getting It Working!
Delete It All
OK, delete all your cards and connections, start from scratch - because MythTV locks the card and you cannot test it...
Testing The FreeSat Card
scan -x 0 /usr/share/dvb/dvb-s/Astra.28.2E | tee channels.conf mkdir ~/.mplayer cp channels.conf ~/.mplayer mplayer dvb://"CBeebies"
What NOT To Do
OK, despite reading about doing the above and then importing the channels.conf file, this did not work for me - and came back with nonsense about 'conflicting channels' etc.
What To Do
Follow the normal procedure...
- General
- Capture Card
- Video Source
- Input Connections
When you come to Scan For Channels, MythTV will default to the "Tuned Scan." You will need the transponder frequencies, polarities, and symbol rates for each transponder you wish to scan. A good source is Lyngsat. Note: Lyngsat transponders and symbol rates are in Megahertz, and Myth expects them to be in KiloHertz. Multiple each value by 1000. A Transponder on Lyngsat listed as "11715 R" and "SR 20000" would be a frequency of 11715000, Right Circular Polarity, and Symbol Rate of 20000000. Leave FEC and Inversion on auto and press next. Myth will attempt to scan given the setup you have created.
Here are the settings which worked for me...
Freq: 10714000 Polarity: Horizontal Symbol rate: 22000000 Mod Sys: DVB-S FEC: 5/6 Modulation: QPSK Inversion: leave at auto Rolloff: leave at 0.35
http://www.lyngsat.com/astra2d.html
10773 H and SR-FEC 22000 = x 1000 =
- Frequency: 10773000 (10773)
- Polarity: Horizontal (H)
- Symbol Rate: 22000000 (22000)
Channel Numbers
Log into MythWeb at http://your.ip.address/mythweb/settings/tv/channels and manually change the channels using these web pages for reference:-
http://www.digitalspy.co.uk/satellite/freesatfromskyepg/
Channel Logos
Hauppauge Nova-HD-S2 Remote Control
Oh my god, I cannot quite believe it, but instead of the days it took to get the Nova-T-500 working, this took minutes!
First, check the kernel log for the following output:-
input: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:14.4/0000:04:05.0/input/input5
Second, edit the LIRC hardware configuration file:-
sudo nano /etc/lirc/hardware.conf ... REMOTE="Hauppauge DVB-s card (ver. 2.1)" REMOTE_MODULES="lirc_dev" REMOTE_DRIVER="devinput" REMOTE_DEVICE="/dev/input/event5" REMOTE_SOCKET="" REMOTE_LIRCD_CONF="hauppauge/lircd.conf.hauppauge" REMOTE_LIRCD_ARGS=""
Third, start the lirc daemon:-
sudo /etc/init.d/lircd start
UPDATE: ReInstallation - Mythbuntu 10.10
It has been a year now since installing and it is time for an upgrade. A lot of changes have happened and I will benefit from better software. It also means I can control the MythTV box with my Palm Pre :-)
- Installation Medium: Mythbuntu 10.10 64-bit CD
- Installation Date: Wednesday 29 December 2010
- MythTV Version: 0.23
Details
- Mythbuntu 10.10
- MythTV 0.24
- NVIDIA UNIX x86_64 Kernel Module 260.19.06 Mon Sep 13 17:35:21 PDT 2010
- Asus M4A785TD-M EVO Motherboard
- Asus BIOS Version 2104 (08/13/10)
- ATI Radeon HD 4200 Graphics (onboard)
- NVIDIA GeForce 7300 GS (G72) 512Mb (PCI-E)
- Hauppauge Nova-HD-S2 PCI TV Card (Hauppauge WinTV-HVR4000(Lite) DVB-S/S2 [card=69,autodetected])
Plan Of Action
- Update the BIOS
- Partition hard disk drive properly (advanced format sector 64)
- Install Mythbuntu 10.10
- Clean out the rubbish
- Update software
- Set up MythTV
- Put stuff back
Update the BIOS
I used a USB flash drive to store the new BIOS rom file, and went into the EZ Flash Utility. The USB drive is shown as drive C:\ and I backed up the existing BIOS as '0807.ROM'. I then selected the new ROM file and chose to continue. It checked the file, but it failed on wiping the BIOS. So I went back into the normal BIOS and reset everything to defaults. Went back into EZ Flash and it then worked.
Partition hard disk drive properly
I used SystemRescueCD to partition the drive by hand. This is a real pickle when you want more than 1 partition. I still haven't got it perfect, but at least the first partition on the drive starts with the correct sector of 64. You are supposed to start every partition with a sector figure divisible by 8, but this proved impossible to do using fdisk - so my hard drive's second partition is not optimised properly. This is used as swap, so maybe no great loss...
Install Mythbuntu 10.10
During the first screen of installation, I chose 'manual partition setup' and allocated the first one as a mount point of / with formatting of ext4. Then allocated second partition as swap. It then proceeded as normal but without doing any updates. It finished after 20 minutes and I rebooted.
Clean out the rubbish
After the reboot, I checked to see if there was any software I could uninstall before performing the next stage, and because this was Mythbuntu with XFCE desktop (instead of Gnome), there was no rubbish.
Update software
After a while, the software Package Manager will automatically run and show a load of updates - 143 to be exact, so we do those and then reboot.
Set Up MythTV
Follow the instructions here - http://parker1.co.uk/mythtv_freesat.php
Put stuff back
- Copy back all files taken from /var/lib/mythtv/recordings/
- mysql -u root -p mythconverg < /path/to/recorded.sql
- Install the following extra software:-
- MakeMKV
- x264 and ffmpeg (from svn)
Still to do
- Delete all the unwanted channels from the 359 available!
- Change all the channel tv numbers to official ones from http://www.wildsat.com
- Start putting in Recording Rules
UPDATE: Upgrade to 0.24
Mythbuntu 10.10 installs version 0.23 of MythTV. If you want the latest version, then you have to install the Mythbuntu Repositories.
The Mythbuntu team provides a package (mythbuntu-repos) to allow users to easily activate additional update repositories for software shipped with Mythbuntu. The packaging used to create these builds is identical to that being used for content in the Ubuntu archive.
The MythTV-Updates repository will contain updated MythTV software. It is automatically built each day when there are upstream fixes available.
Selecting a MythTV series will only get you updates for that series. So if you select MythTV 0.24, you would receive any updates that upstream release to the 0.24 series only. To change to another series (such as 0.25), simply open the Mythbuntu Control Centre, and modify the Repositories tab.
The Mythbuntu-Updates repository will contain fixes for software written specifically for Mythbuntu such as Mythbuntu Bare, Mythexport, Mythbuntu Log Grabber.
- Go to http://www.mythbuntu.org/repos
- Install the .deb package
- Choose the new version to upgrade to (0.23 --> 0.24)
- Choose the PPA package
- apt-get update && apt-get upgrade
- Reboot and enjoy!
UPDATE: Retune Channels
http://en.wikipedia.org/wiki/List_of_free-to-air_channels_at_28%C2%B0E
http://www.freesat.co.uk/what-you-get/our-channels
http://www.freesat.co.uk/files/3412/9778/2074/Large_Print_Channel_Guide_15_02_11.pdf
From time to time, FreeSat will change channel frequencies and available channels. I noticed this when the show NCIS did not record any more... because the channel CBS Action had changed frequency number.
-~=| ROUGH NOTES |=~-
- Close all running apps including MythTV Frontend
- Run mythtv-setup (Appplications --> System --> Mythbackend Setup)
- Go to Channels
- Go to Delete All
- Go to Channel Scan
- Choose Full Tune and wait
- Choose Add All (you may have to Cancel All on some of the conflicts - sigh)
- Press ESC to come out and save
- Load up Mythweb in your favourite web browser
- Go to Settings --> TV
- Delete all the channels you don't want first
- Redo the numbers using this guide
- Reboot
- Run mythtv-setup (Appplications --> System --> Mythbackend Setup)
- Go to Channels
- Go to Download Icons (and follow the rather tedious choosing process)
- Press ESC to come out and save
I will write a MYSQL script to most of the work here...
e.g.
use mythconverg; update channel set 'channum' = '101', commmethod = '-2' where 'name' = 'BBC 1 S East'; delete from channel where channum>1000;
...and will back up all my icons (kept at ~/.mythtv/channels)
MYSQL Update Script - August 2011
mythtv_freesat_update_channels.sql
MYSQL Channel List - August 2011
UPDATE: How To Manually Add A Channel
After a rescan of all channels, some of them were missing. To fix that...
Do a manual scan in the console to get the list of channels with frequencies and serviceid in a text file...
scan -x0 /usr/share/dvb/dvb-s/Astra-28.2E | tee channels.conf
This will give you a text file that looks like this (for example, for channel 'POP')...
Channel Name:Frequency:Modulation:?:Symbol Rate:Channel Number:Frequency ID:Service ID
POP:11642:v:0:27500:2315:2316:52340
The important ones here are Name, Frequency, and Service ID.
Use PHPMyAdmin to look in the dtv_multiplex table to find the correspoding frequency.
e.g.
http://en.wikipedia.org/wiki/Pop_%28UK_TV_channel%29
For channel 'POP', the frequency is '11642' which is actually '11642000', which is multiplex_id '60' in my database.
Existing, working example:- Channel: BBC 1 S East Frequency: 10802750 = dtv_multiplex.mplexid = '25' Service ID: 6461 = channel.serviceid = '6461' New example:- Channel: POP Frequency: 11642000 = dtv_multiplex.mplexid = '60' Service ID: 52340 = channel.serviceid = '52340'
Then, we just need to add a new row to the channel table, and tweak it. So...
Now, go into the mythtv-backend setup > Channel Editor > Add New Channel (add Name, Frequency, etc. then...) > Download Icons > Rescan For Missing Icons > POP (uk)
Then, go into PHPMyAdmin and edit the channel table:-
freqid = (delete what's there) channum = '603' callsign = 'POP' name = 'POP' mplexid = '60' serviceid = '52340'
INSERT INTO `channel` (`chanid`, `channum`, `freqid`, `sourceid`, `callsign`, `name`, `icon`, `finetune`, `videofilters`, `xmltvid`, `recpriority`, `contrast`, `brightness`, `colour`, `hue`, `tvformat`, `visible`, `outputfilters`, `useonairguide`, `mplexid`, `serviceid`, `tmoffset`, `atsc_major_chan`, `atsc_minor_chan`, `last_record`, `default_authority`, `commmethod`) VALUES (56281, '603', , 1, 'POP', 'POP', '/home/paully/.mythtv/channels/pop_uk.jpg', 0, , , 0, 32768, 32768, 32768, 32768, , 1, , 1, 60, 52340, 0, 0, 0, '0000-00-00 00:00:00', 'www.popfun.co.uk', -1);
Many thanks to Garry Parker and this web page
Please, please - can someone add this to the official MythTV Documentation and Wiki?!
UPDATE: Guide Data Missing For Channel Added Manually
Using the above method works but you don't get any OTA (Over The Air) program information for the guide via EIT.
Help!
UPDATE: BBC HD Fix - Delete All Transports And Channels Then Rescan
UPDATE: Monday 5 November 2012
http://parker1.co.uk/mythtv_freesat.php
http://www.bbc.co.uk/reception//info/sat_frequencies.shtml
(http://www.gossamer-threads.com/lists/mythtv/users/482422#482422)
Please read all these instructions before starting. The whole process should take about 30 minutes.
- Make a full backup of your mysql database. How to do this is covered here.
- Close down the mythbackend service.
killall mythbackend
- Totally clear all the channelscan_dtv_multiplex and channel entries using the following commands in a terminal session.
mysql -umythtv -pxxxxxx -e"DELETE from mythconverg.channelscan_dtv_multiplex;"
mysql -umythtv -pxxxxxx -e"DELETE from mythconverg.channel;"
Please understand this will clear ALL your channels, even terrestrial ones if you have 2 sources.
- In a terminal session for the user that you would normally use to run the frontend start mythtv-setup.
- Choose option 5 Channel Editor
- Choose the Video Source
- Choose Channel Scan
- Make sure the Video Source is on the Terrestrial Source.
- Choose "ALL" as the desired service....Turn off "Only Free"
- Choose "Full Scan of All Existing Transports" let the Scan run till finished and follow any on screen prompts. Click finish when done.
- Choose the Satellite Source
- Choose Channel Scan
- Make sure the Video Source is the Satellite Source.
- Choose "TV" as the desired service....Turn off "Undecrypted Only"
- SCAN # 1 - Choose "Full Scan (Tuned)" enter the following values.
Freq: 10714000 Polarity: Horizontal Symbol rate: 22000000 Mod Sys: DVB-S FEC: 5/6 Modulation: QPSK Inversion: leave at auto Rolloff: leave at 0.35
- Add all the channels it finds.
- SCAN # 2 - Choose "Full Scan (Tuned)" enter the following values.
Freq: 10847000 Polarity: Vertical Symbol rate: 23000000 Mod Sys: DVB-S2 FEC: 2/3 Modulation: 8PSK Inversion: leave at auto Rolloff: leave at 0.35
- Add all the channels it finds.
- Let the scan finish and follow any on screen prompts to complete the Scan.
- Click "Finish"
- Exit mythtv-setup
- Restart the mythbackend and check to see if it's OK.
- Check all the channel IDs and then use the MySQL script to tweak the channel numbers and names, etc.
FIX for MYSQL Table Crash
If your system does not show upcoming recordings, it means your mythconverg.recordmatch table is corrupt. Check /var/log/mythtv/mythbackend.log for these messages...
Table './mythconverg/recordmatch' is marked as crashed and last (automatic?) repair failed
To fix it, stop the backend by Running : Applications > System > MythTV backend Setup.
Then, run the following commands to repair the table
mysqlcheck -uroot -p -c mythconverg mysqlcheck -uroot -p -r mythconverg
Restart the backend by quitting out of Backend Setup and start the Frontend.
Job done. God bless Open Source.
List Of Freesat Channels On Freesat
http://en.wikipedia.org/wiki/List_of_channels_on_Freesat
Beautiful Theme
HOWTO: Fix Crash On Frontend Startup
mythfrontend -O ThemePainter=qt
HOWTO: Scan Videos Directory Command Line
sudo -i su -c "mythutil --scanvideos" mythtv