Penguin
Note: You are viewing an old revision of this page. View the current version.

FreeView | HD and MythTv, setup notes (GerardSharp, October 2009) This has been very difficult to get this far, requiring quite a lot of fiddling and surfing past several dozen websites to garner pieces of clues; so I want to write it all down and hopefully save someone else some of the pain.

Very-much work-in-progress. I got "record TV" working for the first time since starting on this Thursday night. Will edit Wiki later with more details and try to fix some of the rambling. Now I must dash off to Work in the RealWorld

Overview

FreeView HD is a DVB-T, Terrestrial Digital TV using UHF. In hamilton this signal comes from Te Aroha and good frequencies are

  • 674 MHz = TVNZ
  • 690 MHz = MediaWorks?? (TV3, C4, etc)
  • 706 MHz = Kordia (Prime, Parliament TV, Radio, etc)

I'm going to use the Hauppauge HVR-2200; supported since about May 2009. Drivers from link_needed_
Also consider getting VDPAU to work your GPU and save your CPU; requires an nvidia card and their binary blob, alas.
I'm going to use mythbuntu 9.04 and JYP's patches to get VDPAU and h.264 working, _link_check
here

Installation

The magic CD had some issues with my monitor, causing the bottom of the screen with the back/okay/next/cancel buttons to be cut off; this caused me some problems with disk formatting, but otherwise I proceeded by the magical trick of "guessing" where the button might be.
Didn't see options for disk-encryption or LVM; might need these on a more serious backend; but ext3 is fine for my play-around box

Slog

Installed, aptitude run to get updates, installed new editor (Insert HolyWar?)
HVR-2200 is the NZ(/EU?) version of the HVR-2250 (US). Same driver. I got it working following instructions from http://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-2200
the program "hg" it refers to is mercurial, which comes in handy.
Every time you update your kernel, you have to re-run the make / make install. Check when you update your kernel that this make is actually running against the new kernel, not the old one

"dvb-apps" from http://www.linuxtv.org/wiki/index.php/LinuxTV_dvb-apps
("hg" = mercurial, you'll want to install that)
dvb-apps lets you check your signal and even pipe TV to mplayer / vlc.
Good for getting signal strength numbers.
dvb-apps can't access the tuner / card if mythbacked-setup has been configured to use it; so stop the backend first.

the util "scan" can be fed a file from /usr/share/dvb/dvb-t/, and it will look for channels on those frequencies. Check out the one I added for TeAroha? at the bottom of this page.
scan will give you a channels.conf file, mine is at the bottom of this page.
vlc can be run with channels.conf and it will load it like a playlist. This can be used to check your card works.
Note that TVNZ is using the h.264 codec for their channels; this requires a new codec to play and good signal strength (or the player dies with segfaults and the like)

"dvbtune" is very good for telling you the signal strength and thus how good your aerial is
sudo apt-get install dvbtune
(numbers/settings below from channels.conf)

dvbtune -f 674000 -I 0 -qam 64 -gi 16 -cr 3_4 -bw 8 -tm 8 -m 1
FE_STATUS: FE_HAS_SIGNAL FE_HAS_LOCK FE_HAS_CARRIER FE_HAS_VITERBI FE_HAS_SYNC
Signal=65535, Verror=0, SNR=2552dB, BlockErrors=11, (S|L|C|V|SY|)
Signal=65448, Verror=1, SNR=2553dB, BlockErrors=15, (S|L|C|V|SY|)

All the letters in brackets refer to the FE_ line above; all is good, some missing = bad signal
The scale on the Signal and SNR columns seems a bit .. weird. Must be my card.
Ideally, Verror should be as small as possible. 10000 or higher upsets MPEG2, 5000 or higher upsets h.264
Ideally, BlockErrors? should be as small as possible.

I found by removing a splitter, I could go from trashy high Verror, no TVNZ and only just TV3/4 to working TVNZ.
Check your aerial

MythTV

running late for work, will have to finish this later.

What A Mess. the EIT (over-the-air TV guide) only has "now" and "next"; no 8-day forecast.
Most of the EPG sites and latest.xml offerings on the internet have *gone*
Including that freeware windows-only (mono!) one mentioned in FreeViewMythTvSetup. They ask a "donation" now and the demonstration version don't work no more.
I eventually found http://www.gossamer-threads.com/lists/mythtv/mythtvnz/290834 which lead me to http://nice.net.nz/scripts/tv_grab_nz-py
Put it in a system path and run mythbackendsetup and it will find this script and it will download stuff.
You have to configure it in the terminal that started mythbackendsetup, so I hope you ran it from a terminal! (mythbuntu spawns a terminal using a tiny font and runs the setup from that; so you're okay)

Now, I found that the EIT channels and the XMLTV channels promptly "fight" and the "watch tv" option in the front-end don't work anymore. Great.
I solved this by going into the Channel editor and disabling the XMLTV channel - giving them no channel number and unmarking the "visible" flag.
Then, use the Channel editor on each of the EIT channels, fix the channel number (Prime on 10? really?) and add the XMLTV ID field; it'll be something like tv3.freeviewnz.tv.

  • the XMLTV-found channels have good XMLTV ID, so they get "what's on" information correctly; but have incorrect Callsign / Channel details; so the Tuner can't tune to them
  • the EIT-found channels have good Callsign / Channel details, so you can tune to them; but they have no "what's on" information, so mythfrontend refuses to load.

Once all the channels are good and real, run mythfilldatabase. Maybe with the --manual like the xmltv_grabber suggested.

If you click "Watch tv" on the front end, and get nothing and kicked straight back to the menu, either the default channel (Backendsetup) is illegal, or the default channel has no program guide - no "what's on" information. Fiddle with your setup a lot; re-run mythfillbackend; fiddle some more.

Organise Me

Okay, this needs work.

Appendices

My /usr/share/dvb/dvb-t/nz-TeAroha?:

# TeAroha, Waikato NZ
#
# Channel allocation details for NZ can be found at
# http://www.rsm.govt.nz/cms/policy-and-planning/current-projects/broadcasting/digital-television-2007-frequency-plan
#
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy

# Multiplex DA?
T 674000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
# Multiplex DB?
T 690000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
# Multiplex DC?
T 706000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE

My channels.conf:

TV ONE:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:260:310:1200
TV2:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:261:311:1201
TVNZ 6:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:262:312:1202
TVNZ 7:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:263:313:1203
Zinwell SSU:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:0:1250
TV3:690000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:450:400:1300
C4:690000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:451:401:1301
TV3 PLUS1:690000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:452:402:1302
Maori Television:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:550:600:1400
Parliament TV :706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:551:601:1401
Test Channel:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:552:602:1402
ChineseTV:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:553:603:1403
PRIME:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:554:604:1404
Reserved 6KSD:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:555:605:1405
Freeview | HD:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:556:606:1406
Radio NZ National:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:620:2000
Radio NZ Concert:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:621:2001
BaseFM:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:622:2002
tvCentral:706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:560:610:1408