Rev | Author | # | Line |
---|---|---|---|
4 | GerardSharp | 1 | !FreeView|HD and MythTv, setup notes |
1 | GerardSharp | 2 | (GerardSharp, October 2009) |
4 | GerardSharp | 3 | 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.<br> |
2 | GerardSharp | 4 | |
4 | GerardSharp | 5 | I've now moved my back-end onto a "real" server (with actual disk space) and set up another front-end using these instructions, so I hope they are helpful to other people too.<br> |
1 | GerardSharp | 6 | |
4 | GerardSharp | 7 | ---- |
1 | GerardSharp | 8 | !! Overview |
4 | GerardSharp | 9 | FreeView|HD is a DVB-T, Terrestrial Digital TV using UHF. In Hamilton this signal comes from Te Aroha and good frequencies are |
1 | GerardSharp | 10 | * 674 MHz = TVNZ |
4 | GerardSharp | 11 | * 690 MHz = ~MediaWorks? (TV3, C4, etc) |
1 | GerardSharp | 12 | * 706 MHz = Kordia (Prime, Parliament TV, Radio, etc) |
13 | |||
4 | GerardSharp | 14 | I'm going to use the Hauppauge HVR-2200; supported since about May 2009. This is a regional variant of the HVR-2250 (US version), and the same driver works for both. |
15 | I followed instructions from the [Ubuntu Forums|http://ubuntuforums.org/showthread.php?t=1167640], and the official homepage for the driver is [here|http://www.kernellabs.com/blog/?page_id=17]<br> | ||
1 | GerardSharp | 16 | Also consider getting VDPAU to work your GPU and save your CPU; requires an nvidia card and their binary blob, alas.<br> |
4 | GerardSharp | 17 | I'm going to use mythbuntu 9.04 and JYA's patches to get VDPAU and h.264 working, [here | http://www.avenard.org/media/MythTV_&_VDPAU/MythTV_&_VDPAU.html]<br> |
1 | GerardSharp | 18 | |
4 | GerardSharp | 19 | ---- |
1 | GerardSharp | 20 | !! Installation |
21 | 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.<br> | ||
22 | 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<br> | ||
23 | |||
4 | GerardSharp | 24 | ---- |
1 | GerardSharp | 25 | !! Slog |
5 | GerardSharp | 26 | Installed, aptitude run to get updates, installed new editor (<tt>Insert ReligiousWar here</tt>)<br> |
4 | GerardSharp | 27 | You also need to grab |
28 | * "mercurial" (command line version is "hg"), a revision control system some of the tools use | ||
29 | * "dvb-apps" from http://www.linuxtv.org/wiki/index.php/LinuxTV_dvb-apps | ||
30 | * "dvbtune" is very good for telling you the signal strength and thus how good your aerial is. sudo apt-get install dvbtune | ||
31 | * Any non-free software you need. JYA's repository rebundles the nVidia driver with VDPAU support. Handy. | ||
32 | * Kernel Headers, maybe even kernel sources | ||
33 | * Medibuntu has a nice repository of Media-related things for Ubuntu. Note, again, not all of this is Free. | ||
34 | |||
1 | GerardSharp | 35 | HVR-2200 is the NZ(/EU?) version of the HVR-2250 (US). Same driver. I got it working following instructions from |
36 | http://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-2200<br> | ||
37 | 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<br> | ||
38 | |||
39 | "dvb-apps" from http://www.linuxtv.org/wiki/index.php/LinuxTV_dvb-apps<br> | ||
4 | GerardSharp | 40 | dvb-apps lets you check your signal and even pipe TV to mplayer / vlc. Good for getting signal strength numbers.<br> |
41 | dvb-apps can't access the tuner / card if mythbacked-setup has been configured to use it; so stop the backend first.<br> | ||
1 | GerardSharp | 42 | |
43 | 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.<br> | ||
4 | GerardSharp | 44 | scan will give you a channels.conf file as output, mine is at the bottom of this page. This file can be put in /etc/channels.conf, /etc/mplayer/channels.conf, ~mythtv/.mythtv, ...<br> |
45 | vlc can be run with channels.conf and it will load it like a playlist. This can be used to check your card works; but only locally to the machine with the tuner - vlc doesn't work over ssh -X<br> | ||
46 | Note that TVNZ is using the h.264 codec for their channels; this requires a new codec to play as well as good signal strength (or the player dies with segfaults and the like)<br> | ||
1 | GerardSharp | 47 | |
4 | GerardSharp | 48 | Running dvbtune to check signal.<br> |
49 | (qam, gi, cr, bw, tm are properties of the DVB-T signal, values here from channels.conf are good for freeview nz) | ||
1 | GerardSharp | 50 | <verbatim> |
51 | dvbtune -f 674000 -I 0 -qam 64 -gi 16 -cr 3_4 -bw 8 -tm 8 -m 1 | ||
52 | FE_STATUS: FE_HAS_SIGNAL FE_HAS_LOCK FE_HAS_CARRIER FE_HAS_VITERBI FE_HAS_SYNC | ||
4 | GerardSharp | 53 | Signal=65535, Verror=100, SNR=252dB, BlockErrors=11, (S|L|C|V|SY|) |
54 | Signal=65448, Verror=123, SNR=230dB, BlockErrors=15, (S|L|C|V|SY|) | ||
1 | GerardSharp | 55 | </verbatim> |
56 | All the letters in brackets refer to the FE_ line above; all is good, some missing = bad signal<br> | ||
57 | The scale on the Signal and SNR columns seems a bit .. weird. Must be my card.<br> | ||
58 | Ideally, Verror should be as small as possible. 10000 or higher upsets MPEG2, 5000 or higher upsets h.264<br> | ||
4 | GerardSharp | 59 | Ideally, ~BlockErrors should be as small as possible.<br> |
1 | GerardSharp | 60 | |
4 | GerardSharp | 61 | I found by removing a splitter, I could go from trashy high Verror, no TVNZ and only just TV3/4 to working TVNZ. I then found that adding a mast-head amp would get me nice low Verror, zero ~BlockErrors. The mast-head amplifier can only really compensate for cable losses. You still need to point the aerial at the transmitter to get good signal.<br> |
62 | Roofs are dangerous, scary places, so be careful! (or hire someone who _isn't_ afraid of heights to do it for you!)<br> | ||
1 | GerardSharp | 63 | |
4 | GerardSharp | 64 | ---- |
1 | GerardSharp | 65 | !! MythTV |
66 | What A Mess. the EIT (over-the-air TV guide) only has "now" and "next"; no 8-day forecast.<br> | ||
67 | Most of the EPG sites and latest.xml offerings on the internet have *gone*<br> | ||
68 | Including that freeware windows-only (mono!) one mentioned in FreeViewMythTvSetup. They ask a "donation" now and the demonstration version don't work no more.<br> | ||
4 | GerardSharp | 69 | I eventually found a [forum thread|http://www.gossamer-threads.com/lists/mythtv/mythtvnz/290834] which lead me to |
1 | GerardSharp | 70 | http://nice.net.nz/scripts/tv_grab_nz-py<br> |
6 | JasonDrake | 71 | (This script is currently broken but only requires a minor change. On line 27 under sources replace nzepg.org with epg.org.nz)<br> |
4 | GerardSharp | 72 | Download it, put it in a system path and run mythtv-setup. "3. Video Sources" option will let you pick this script as your grabber. When selected as your grabber it has to be configured 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). My configuration comprised of picking which channels I wanted (freeview) and which I didn't (sky); so it will work with DVB-S (satellite) as noted over in FreeViewMythTvSetup. I called my Video Source "freeview".<br> |
73 | |||
74 | While we're in mythtv-setup, play with the rest of the settings. Under "4. Input Connections", you can assign your tuner(/s, HVR-2200 has Dual tuners) to the "freeview" video source you just created. Also you can scan for the transmitted channel to populate the channel list with the "EIT channels".<br> | ||
75 | |||
76 | When you leave mythtv-setup, it will ask to run mythfilldatabase. You probably don't want to run this automatic version, as you may want to run it by hand with the --manual option as noted below, to populate the channel list with the "XMLTV channels".<br> | ||
1 | GerardSharp | 77 | |
78 | 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.<br> | ||
4 | GerardSharp | 79 | I solved this by going into the Channel editor and disabling the XMLTV channels - giving them no channel number and unmarking the "visible" flag.<br> |
1 | GerardSharp | 80 | 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 <tt>~tv3.freeviewnz.tv</tt>. |
4 | GerardSharp | 81 | You can "cheat" and pull the XMLTV ID out of <tt>~~/.mythtv/freeview.xmltv</tt>, after you have run the grabber setup as noted above.<br> |
1 | GerardSharp | 82 | |
83 | * 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 | ||
4 | GerardSharp | 84 | * 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 watch them / record them. |
1 | GerardSharp | 85 | |
86 | Once all the channels are good and real, run mythfilldatabase. Maybe with the --manual like the xmltv_grabber suggested.<br> | ||
87 | |||
4 | GerardSharp | 88 | Subsequent to all of this, I have built a second backend, and I have learned that if you: |
89 | * setup the grabber | ||
90 | * setup the EIT channels | ||
91 | * assign each EIT channel an appropriate channel number (up to you, I like Prime on 5 myself) and the correct XML ID (look in <tt>~~/.mythtv/freeview.xmltv</tt>) | ||
92 | * delete the channel number and mark not Visible any channel you don't want to see | ||
93 | * quit mythtv-setup and run <tt>mythfilldatabase --manual</tt> - Now all the discovered channels will have correct details filled out, and you won't get "XMLTV channels" and "EIT channels" and life is good. | ||
1 | GerardSharp | 94 | |
4 | GerardSharp | 95 | Once you have a program guide ("what's on" information) and a valid channel list, you can fire up mythfrontend and try to "Watch TV". If Watch TV does nothing / goes blank briefly and kicks you back to the menu: |
96 | * the default channel (Backendsetup) might be illegal, | ||
97 | * the default channel has no program guide - no "what's on" information. | ||
98 | * the mythtv-backend might be unable to write to the Storage Directories | ||
99 | * Fiddle with your setup a lot; re-run mythfillbackend; fiddle some more. | ||
1 | GerardSharp | 100 | |
4 | GerardSharp | 101 | In the case where write permissions are incorrect, you will also be unable to schedule a recording; which might be possible in the first two cases. |
1 | GerardSharp | 102 | |
4 | GerardSharp | 103 | ---- |
1 | GerardSharp | 104 | !! Appendices |
105 | |||
106 | My /usr/share/dvb/dvb-t/nz-TeAroha: | ||
4 | GerardSharp | 107 | ---- |
1 | GerardSharp | 108 | <verbatim> |
109 | # TeAroha, Waikato NZ | ||
110 | # | ||
111 | # Channel allocation details for NZ can be found at | ||
112 | # http://www.rsm.govt.nz/cms/policy-and-planning/current-projects/broadcasting/digital-television-2007-frequency-plan | ||
113 | # | ||
114 | # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy | ||
115 | |||
116 | # Multiplex DA? | ||
117 | T 674000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE | ||
118 | # Multiplex DB? | ||
119 | T 690000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE | ||
120 | # Multiplex DC? | ||
121 | T 706000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE | ||
122 | </verbatim> | ||
4 | GerardSharp | 123 | ---- |
1 | GerardSharp | 124 | |
125 | My channels.conf: | ||
4 | GerardSharp | 126 | ---- |
1 | GerardSharp | 127 | <verbatim> |
128 | 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 | ||
129 | 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 | ||
130 | 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 | ||
131 | 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 | ||
132 | 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 | ||
133 | 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 | ||
134 | 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 | ||
135 | 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 | ||
136 | 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 | ||
137 | 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 | ||
138 | 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 | ||
139 | 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 | ||
140 | 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 | ||
141 | 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 | ||
142 | 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 | ||
143 | 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 | ||
144 | 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 | ||
145 | 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 | ||
146 | 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 | ||
147 | </verbatim> | ||
4 | GerardSharp | 148 | ---- |
lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 2 times)