# ATSC tuner cards?



## `Orum (Jan 27, 2018)

I'm looking to set up my own DVR for ATSC broadcasts here in the USA, but was hoping to do so on FreeBSD.  I've looked through a few other threads on the topic here on the forums, but most of these reference tuner cards that are no longer sold.  I was looking at the "Hauppage 1609 WinTV-quadHD", but I can't find any documentation from the manufacturer that tells me if this will is based on something covered by the bktr(4) driver or not.

Does anyone know if that card will work, or if not, one that will?  Half height would be required as this would be going in a rack-mounted server.


----------



## Phishfry (Jan 27, 2018)

I have an WinTV card working with the cx88 driver.
multimedia/cx88
http://corona.homeunix.net/cx88wiki

I am using these cards:
DViCO FusionHDTV 7 Dual Express
Hauppauge WinTV-HVR-1800


----------



## `Orum (Jan 27, 2018)

Ah, thanks, I wasn't aware of cx88 driver.  I'd read your other posts on the subject of TV tuning and was actually looking for that card, but it seems the Hauppage 18X0 (1800 and 1850) are discontinued, and I can't find them for sale.  The same appears to be case with the DViCO FusionHDTV 7 Dual Express, as they are listed as "sold out" as well on Newegg, and I don't see them listed at other US retailers.

I'm glad to see some older cards work, but I'd love to see some that are still available for purchase.

Edit: Did a little looking on the second-hand market for those cards, and although I can find the Hauppage 1800, it looks to be full height and thus won't fit in the 2U server.  

Edit 2: Looking over at the Linux support for the 1609, it looks like it is at least based on similar hardware:
	
	



```
tveeprom 4-0050: audio processor is CX23888 (idx 40)
tveeprom 4-0050: decoder processor is CX23888 (idx 34)
```
However, it sounds like that is not enough to state that it would work with the cx88 driver, per se.  Has anyone tried this card under FreeBSD?

Edit 3: I sit corrected.  It looks like according to this page on their wiki that it probably is supported.  What's unclear to me now though is if you can get anything other than MPEG-2 output from it, as I believe several of the stations here are using H.264.  Ideally I'd like to just copy the transport stream directly without any reencoding.  Is that possible?


----------



## Phishfry (Jan 27, 2018)

Looking at this other card you have, it really is a 3 part deal. You need tuner chip driver, demodulator driver and the multimedia bridge chip(cx88)
cx88 has support for some tuners but not all.

I don't recognize your tuner:

```
tuner model is SiLabs Si2157
```

The DVico card is half height. They are a bit rare on ebay I notice. Just keep your eyes open.


----------



## `Orum (Jan 27, 2018)

Ah, so it may not work then.  I have not yet purchased any cards, but I think for now I'll keep looking for a second hand DViCO then.  I've heard they aren't as good as the Hauppage cards, but that's only based on anecdotal evidence, and it's more important to me that it works with FreeBSD.

Thanks again.

Edit: Discovered a thread at the Plex forums from someone who was trying to get the 1609 working under FreeBSD.  It looks like Phishfry is correct that the tuner (and demodulator) are not supported, at least as of September of last year.


----------



## Phishfry (Jan 27, 2018)

There is also the issue of 'firmware' needed for each device. The cx88 builds it in for its supported devices.


----------



## jeffc (Aug 21, 2019)

The pcHDTV HD-5500 ATSC/NTSC TV tuner card uses the cx88 driver and works under FreeBSD, for example under tvheadend.  It's also supported under Linux, which apparently was its original target.  Here's a link to its site: http://www.pchdtv.com/

It's a low-profile (sometimes called half-height) PCI card and includes both full height and half height slot covers.

It runs pretty hot and should be placed where it gets good airflow, etc.

It was probably designed at least a decade ago, but apparently is still available.


----------



## bjs (Aug 21, 2019)

Instead of a interface card have a look into a HDHomeRun network tuner... They offer units for OTA with multiple tuners as well as units for cable systems... I have one of their Extend models that has hardware encoding and while I don't currently use my FreeBSD system to record from it, I could if I wanted...


----------



## jeffc (Aug 22, 2019)

While using a network tuner or other appliance is a convenient solution and good suggestion, one nice thing about running open source software under FreeBSD is to be able to (and have the community) review the source code, understand what network traffic is going where, etc.  In other words, it may offer better security and privacy.  It does generally offer better transparency.

What software does HDHomeRun use?  How often is it updated?  Is it open source?


----------



## gpw928 (Aug 23, 2019)

jeffc said:


> What software does HDHomeRun use?  How often is it updated?  Is it open source?


The HDHomerun is a proprietary stand-alone TV tuner, in its own box, that you connect to a power plug, the LAN and TV aerial.
They have been around for a long time, and usually work well with just about any TV player you like to name (e.g. Kodi, MythTV).
I have had one for more than a decade (branded Kaiser Bass, which sold out to Silicon Dust), and it just sits there doing its job with absolute reliability.
I also have several USB tuners that work, but are prone to digital interference when tuned to high definition (DVB-T is Australia) broadcasts.
Funnily enough, I have been resisting getting another HDHomerun for years (they are not cheap), but I got fed up trying to get flakey USB tuners (Chinese RTL2832 dongle) going with my new MythTV server, and I just ordered a new quad tuner one today.
I generally avoid the bus resident tuners (Hauppauge has a good reputation) because they become redundant with the bus (remember PCI?), and passing a tuner to a VM is a pain, at best.
The advantages you get from a HDHomerun is that they are accessible by any client on the network, very well regarded, have quality components (much more so than many USB tuners), and just plain work.
My old HDHomerun has outlasted several PCI bus tuners and even more poor quality USB tuners.
The disadvantage is price.  Not quite double what you might pay for a quality bus-resident tuner.


----------



## tingo (Aug 26, 2019)

FWIW, I have a HDHomerun device, and used it while I had cable service (I don't currently have time for TV, so I don't have any TV service now). It performed flawlessly with tvheadend running on Linux.
For some reason, I never could get it to work properly when tvheadend was running on FreeBSD, but that might be caused by tvheadend refusing to talk properly to my OSCam server (also running on FreeBSD), even if tvheadend on Linux (on the same machine - dual boot) had no problem talking to the same OSCam server. I never figured that one out.


----------



## unitrunker (Aug 28, 2019)

gpw928 said:


> I got fed up trying to get flakey USB tuners (Chinese RTL2832 dongle) going with my new MythTV server


You can buy RTL2832U based DVB sticks made from quality components that don't suffer thermal drift for around USD $ 25 from Nooelec and rtl-sdr.com. The cheap $8 sticks are terrible. Beware these are DVB, not ATSC.


----------



## jeffc (Aug 29, 2019)

tingo said:


> FWIW, I have a HDHomerun device, and used it while I had cable service (I don't currently have time for TV, so I don't have any TV service now). It performed flawlessly with tvheadend running on Linux.
> For some reason, I never could get it to work properly when tvheadend was running on FreeBSD, but that might be caused by tvheadend refusing to talk properly to my OSCam server (also running on FreeBSD), even if tvheadend on Linux (on the same machine - dual boot) had no problem talking to the same OSCam server. I never figured that one out.


Another thread https://forums.freebsd.org/threads/ota-hdtv-tvheadend-port-cards-etc.56045/  suggested that using http://www.freshports.org/multimedia/libhdhomerun for a hdhomerun driver, and http://www.freshports.org/multimedia/plexmediaserver under FreeBSD worked.   Another post in the same thread seemed to indicate that plex may work directly with HDHomerun, i.e., without a driver, but it's a bit unclear whether that's the case.  That and other threads also suggest Emby and tvheadend may (or may not) work with HDhomerun under FreeBSD.  Emby appears to include DVR functionality only in the paid version.


----------



## gpw928 (Aug 31, 2019)

unitrunker said:


> You can buy RTL2832U based DVB sticks made from quality components that don't suffer thermal drift for around USD $ 25 from Nooelec and rtl-sdr.com. The cheap $8 sticks are terrible. Beware these are DVB, not ATSC.


Thanks for that.  I guess that DVB-T is not relevant to the US market, so these quality dongles emphasise their Software Defined Radio (SDR) features, and DVB-T TV hardly rates a mention.  Wish I had known that before I bought the HDHomeRun (which is now delivered, and working).


----------



## jeffc (Sep 1, 2019)

gpw928 said:


> Thanks for that.  I guess that DVB-T is not relevant to the US market, so these quality dongles emphasise their Software Defined Radio (SDR) features, and DVB-T TV hardly rates a mention.  Wish I had known that before I bought the HDHomeRun (which is now delivered, and working).


Did you find DVR code that works with HDhomerun under FreeBSD?  If so, would you please consider posting a summary?


----------



## gpw928 (Sep 1, 2019)

jeffc said:


> Did you find DVR code that works with HDhomerun under FreeBSD?  If so, would you please post a summary?


Hi, 

I'm not sure what you mean by a "DVR code".

I had initial issues getting the new HDHomeRun working.  The MythTV backend setup could not scan any channels.  I upgraded the firmware, to no avail.  In the end, I lodged a ticket with SiliconDust and they wanted to know if it worked on Windows.  I found a Windows 8 custom PVR application on their web site, installed it on my old notebook, and everything worked.  Suddenly, after days of stubborn failure, MythTV was also able to scan channels.  So their app did something.  Don't know what.  It's now in production, working fine with MythTV.

Setting up MythTV can be a struggle.  Most of the development happens on Linux, principally Ubuntu.  At the moment I have two MythTV servers, and one client.  They all run Debian Linux.  I don't use it under FreeBSD (neither client nor server).

However, I observe that just about every PVR application I have ever seen, including "plex" mentioned above, has integral support for the HDHomeRun.  No driver required.  It's a network resident tuner, and you just tell your PVR software that you have a HDHomerun.  MythTV just finds them on the (local) network, all by itself.  You do have an option to provide an IP address.


----------



## jeffc (Sep 5, 2019)

Thanks!  By DVR code, I mean PVR applications.  Do we know of any PVR programs that work with HDHomeRun under FreeBSD?  (Not including Plex, since it looks like they may be dropping HTPC support at the end of 2019.  Reference:  https://www.plex.tv/blog/desktop-af/ )

Regarding configuration of the HDHomeRun, its Windows configuration program has a setting for BDA compatibility mode that includes: Default, Windows Media Center, J River Media Center, MediaPortal, NextPVR, For The Record, Easy HDTV DVR.  Perhaps that's what needed to be set (to some specific value) in order to work with Myth.


----------



## gpw928 (Sep 5, 2019)

jeffc said:


> Do we know of any PVR programs that work with HDHomeRun under FreeBSD?  (Not including Plex, since it looks like they may be dropping HTPC support at the end of 2019.  Reference:  https://www.plex.tv/blog/desktop-af/ )


I just installed the multimedia/tvheadend package on a FreeBSD 11.3 virtual machine.
I started the application under the UID of the user "tvheadend", using `tvheadend -C` from the command line.
The application started, and immediately found both my HDHomeRun tuners on the network.
I got the front end up by pointing chrome at http://localhost:9981.
I configured it to use my older Kaiser Bass dual tuner (because it was not in use), and after the tuner scan was complete, was able to watch TV on my desktop.
Sound was not working because I didn't have speakers connected to the VM, but video was good.
So I would say that tvheadend works...


----------



## bjs (Sep 5, 2019)

jeffc said:


> Do we know of any PVR programs that work with HDHomeRun under FreeBSD? (Not including Plex, since it looks like they may be dropping HTPC support at the end of 2019. Reference: https://www.plex.tv/blog/desktop-af/ )



I believe that PLEX has decided to keep HTPC support passed the Jan 2020 deadline as previously stated... If you go back to the link you will see it has been edited to state as much...


----------



## CraigHB (Sep 5, 2019)

gpw928 said:


> So I would say that tvheadend works...


Good info, would like to set up a FreeBSD TV box one of these days and TVHeadend is a big part of it.  ATSC tuners are also a consideration.  Possibility I would want to use one being in the USA, but may just stick with IPTV.


----------



## jeffc (Sep 9, 2019)

To follow up, tvheadend 4.2.8 as currently packaged with FreeBSD 12.0 works with hdhomerun with the following caveats:

1.  Install tvheadend from packages.  (tvheadend includes a dependency for libhdhomerun, so it's clearly meant to support for it.)

2.  Do the initial configuration using tvheadend -C from /etc/rc.conf or rc.d via service start so that it creates and uses configuration files in the default location /usr/local/etc/tvheadend .  If started from the command line, even run as user tvheadend, it creates configuration files in a different directory /usr/local/etc/tvheadend/.hts .  If tvheadend is run as root, it puts configurations in ~root/.hts , which then are not used when started from the rc.conf via rc.d, whose default flags run tvheadend as user and group tvheadend.  Flags for initial configuration in rc.conf are:

```
tvheadend_flags="-f -C"
```

3.  Comment out tvheadend_flags in /etc/rc.conf after initial configuration.  Defaults flags are fine for normal operation, for example after a reboot.

4.  Allow the hdhomerun UDP discovery and streaming packets through a FreeBSD firewall.  They should be visible in firewall logs.  It not opened, the tvheadend mux mapping fails since it can't get streaming results for EPG, etc., info.

plex and emby may work under FreeBSD but appear to not support recording (DVR/PVR functionality) without purchasing a license.


----------



## gpw928 (Oct 26, 2019)

unitrunker said:


> You can buy RTL2832U based DVB sticks made from quality components that don't suffer thermal drift for around USD $ 25 from Nooelec and rtl-sdr.com. The cheap $8 sticks are terrible. Beware these are DVB, not ATSC.


My sincere thanks to *unitrunker* for this advice.
RLT-SDR.COM keep a shop front with AlliExpress, and ship world-wide for free using China Post. 
It took a while for the RTLSDR RTL2832U DVB-T Tuner Dongle to arrive, and a while longer for the PAL co-ax adapter, but they are now operational, and I am very pleased with the results.
The Australian High Definition TV broadcast signal reception is rock solid.   This is the only USB tuner I have ever owned that can do that (HD HomeRuns can do it too).
Note: these are DVB-T tuners being used for TV (Europe/Russia/Africa/India/Middle East/Australia), not ATSC (USA).  They can also be used for Software Defined Radio (SDR), which is what they are used for in the US.


----------



## balanga (Oct 26, 2019)

tingo said:


> FWIW, I have a HDHomerun device, and used it while I had cable service (I don't currently have time for TV, so I don't have any TV service now). It performed flawlessly with tvheadend running on Linux.
> For some reason, I never could get it to work properly when tvheadend was running on FreeBSD, but that might be caused by tvheadend refusing to talk properly to my OSCam server (also running on FreeBSD), even if tvheadend on Linux (on the same machine - dual boot) had no problem talking to the same OSCam server. I never figured that one out.



Any idea what's happening with multimedia/oscam? I had it installed at one point and almost worked out how to use it, but it is no longer available. On Freshports  it is marked as broken


> IGNORE: is marked as broken on FreeBSD 12.0: field has incomplete type 'BIGNUM' (aka 'struct bignum_st')


It has been like this for a long time.


----------



## tingo (Oct 27, 2019)

Sorry, don't follow OSCam as I don't watch TV anymore.


----------

