# FreeBSD TV



## balanga (Jul 13, 2017)

Is anyone watching TV on a FreeBSD box?


----------



## ekingston (Jul 13, 2017)

Not at this moment, no.

I did many many years ago. Back in the day of analog TV, I had a Hauppauge TV turner card in a FreeBSD system. It encoded the tv signals as .mp4 (actually it was probably .ts but in any case) that could be watched through a video player (I forget witch one) like vlc.

Now-a-days I only do it indirectly by streaming from my Plex server running on FreeBSD to my Roku box connected to my TV. The Plex server is fed TV from a Tablo device. It's far more complicated but also more flexible than the old way.


----------



## SirDice (Jul 13, 2017)

I was. I had an Bt848 analog card that used the bktr(4) driver. That worked surprisingly well,  but this was at least 10 years ago. multimedia/webcamd supports a bunch of modern DVB cards but I'm not sure what works and what not.


----------



## Eric A. Borisch (Jul 13, 2017)

I have a Linux (Ubuntu) bhyve running mythtv backend with a network-connected HD Home Run. Works great.

I ended up with the bhyve as the native mythtv had numerous small quirks, and I didn't have the time to chace them down or have the family upset if we missed something. The Ubuntu packages for MythTV tend to just work.


----------



## balanga (Jul 14, 2017)

Eric A. Borisch said:


> I have a Linux (Ubuntu) bhyve running mythtv backend with a network-connected HD Home Run. Works great.



What does MYTHTV run on? And is there a FreeBSD version?


----------



## Eric A. Borisch (Jul 14, 2017)

balanga said:


> What does MYTHTV run on? And is there a FreeBSD version?



https://www.mythtv.org/download

There is a port (multimedia/mythtv and multimedia/mythtv-frontend) that builds last time I tried, but as I mentioned, I ran into quirks with it. Full disclosure, I was running it as a continuation/upgrade of an initial install on Linux many years earlier (imported config database) so my experience may be unique.

Capture card compatibility will be the stickiest point, but I did get the HD HomeRun (Ethernet connected HD tuner) working, but I don't recall the specifics anymore.


----------



## Criosphinx (Jul 14, 2017)

Two years ago I bought a used WinTV-HVR-1850 pcie tuner. 

Since then I use it daily to watch over the air local channels with mpv


----------



## tingo (Jul 16, 2017)

I watch TV (sometimes) via VLC on my FreeBSD machines. VLC gets the TV channels from a tvheadend server which is connected to a HDHomeRun 4DC network tuner. Sadly, the tvheadend machine runs Linux, I was unable to get the multimedia/tvheadend port to work in FreeBSD. I haven't tested in a while, it could be that the tvheadend ports works better now.


----------



## rufwoof (Jul 19, 2017)

Does it count if you use a 32" 720p TV as a monitor (Nvidia card, set to 1280x720 resolution)


----------



## balanga (Jul 22, 2017)

What I was originally thinking about is whether there was anything like a Dreambox or a Vu+ which was capable of running FreeBSD


----------



## balanga (Aug 11, 2017)

I've recently bought a USB TV stick. When inserted into a system running FreeBSD 11.0-RELEASE, `lsusb`shows

```
Bus /dev/usb Device /dev/ugen0.3: ID 040d:9006  Integrated Technology Express. Inc.  IT9135 BDA Afatech DVB-T HDTV Dongle
```

Is there any FreeBSD pkg which can use this device?


----------



## tingo (Aug 14, 2017)

The multimedia/webcamd port might work,, if there is a Linux driver for the device.


----------



## freebsdinator (Sep 14, 2017)

Criosphinx said:


> Two years ago I bought a used WinTV-HVR-1850 pcie tuner.
> 
> Since then I use it daily to watch over the air local channels with mpv



Hey Criosphinx;

I also have the same card, but never got it to work. I attempted to scan with w_scan, but although it's detected, no channels are detected.

Could you post what you did to configure it?

In my /boot/loader.conf I have:
cuse4bsd_load="YES"
cx23885avfw_load="YES"
cx23885_load="YES"

In my /etc/rc.conf I have:
cx88d_enable="YES"

relevant modules from kldstat:
22    1 0xffffffff82828000 16ab     cx23885.ko
23    4 0xffffffff8282a000 7334     cx88.ko
24    1 0xffffffff82832000 1a13     cx88mpegcore.ko
25    2 0xffffffff82834000 28d6     cx88audiocore.ko
26    2 0xffffffff82837000 3086     cx88videocore.ko
27    2 0xffffffff8283b000 2d1b     cx23885av.ko
28    1 0xffffffff8283e000 41bb     cx23885avfw.ko
29    1 0xffffffff82843000 85b9     cuse.ko

Service cx88d is successfully running.

Also, if anyone has a modern card that works out of the box that they have experience with (Ideally, USB/PCI/PCIe), I'd love to hear their experiences.


----------



## Criosphinx (Sep 15, 2017)

I did nothing special. I have the same in both loader.conf and rc.conf

With w_scan I do: `w_scan -fa -M`

I put the results in ~/.config/mpv/channels.conf and then I can tune with `mpv dvb://"some channel"`


----------



## freebsdinator (Sep 15, 2017)

Thanks Criosphinx, it looks like it's simply a bad card!


----------



## balanga (Sep 17, 2017)

tingo said:


> I watch TV (sometimes) via VLC on my FreeBSD machines. VLC gets the TV channels from a tvheadend server which is connected to a HDHomeRun 4DC network tuner. Sadly, the tvheadend machine runs Linux, I was unable to get the multimedia/tvheadend port to work in FreeBSD. I haven't tested in a while, it could be that the tvheadend ports works better now.



Just wondered if anyone does have multimedia/tvheadend working on FreeBSD....

According to its home https://tvheadend.org/


> Tvheadend is a TV streaming server and recorder for Linux, *FreeBSD* and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT>IP and HDHomeRun as input sources.


----------



## balanga (Oct 17, 2017)

Has anyone tried/succeeded using an HP DVB-T TV Tuner ExpressCard under FreeBSD?


----------



## PacketMan (Oct 20, 2017)

balanga said:


> Just wondered if anyone does have multimedia/tvheadend working on FreeBSD....
> 
> According to its home https://tvheadend.org/



Yes I have it installed and 'working'.  By 'working' I mean it runs fine on FreeBSD. I however do not have a working tuner card in it. Seems the support for tuner cards in FreeBSD is sorely lacking.  I wrote these folks and asked them to write native code drivers for FreeBSD and advised them to work with the ports system; they wrote back and told me they would look into it. Never heard anymore, and don't see any mention of FreeBSD on their web site.  Maybe more of us should write them.

https://www.tbsdtv.com/products/tbs6704-atsc-or-clear-qam-quad-tuner-pcie-card.html

I tried to find some legit MPEG-TS IP streams but to no joy.  I did get working some foreign streams, but (a) one set would only run for 15 seconds, and (b) others were simply really questionable sites.  Would love to find some legit streams.

Anyway, I just purchased the Canadian version of SiliconDust HDHomeRun. I will try to integrate it with multimedia/tvheadend and/or multimedia/plexmediaserver.  We only get three OTA digital channels, and this does two so that will suffice.  I was really interested in trying to find an OTA satellite receiver that spit out MPEG-TS streams, but got no where. I might try again this winter; my heavy duty fishing is wrapping up, and hopefully I can find time between my home reno projects and my Juniper Networks exam studies.

Not posting this to hijack this discussion thread, but I and a few others had a chat before about this. You might find a nugget or two of info not already mentioned in here.
Thread 56045

EDIT: Back to multimedia/tvheadend, what I did not get try to get done was the building of my own TV guide. Until I get working stable usable sources what would be the point you know. Assuming all goes well with HDHomeRun I will try to get DVR functions up and running, as well as streaming to my 'remote' devices like cellphones, tablets, and my FreeBSD desktops.


----------



## Phishfry (Oct 20, 2017)

I am back at it too. this time I have an Happauge HVR-1800 which was supported at one time via the wiki.
Looking at tvheadend it has been through some recent updating so that is good.


----------



## balanga (Oct 20, 2017)

Any idea if I can an HP Express Card EC300 working under FreeBSD?


----------



## balanga (Oct 21, 2017)

Phishfry said:


> I am back at it too. this time I have an Happauge HVR-1800 which was supported at one time via the wiki.
> Looking at tvheadend it has been through some recent updating so that is good.



Is tvheadend something that could incorporate cccam functionality?


----------



## tingo (Oct 21, 2017)

tvheadend supports OSCam at least. But - I haven't been able to make it work under FreeBSD. When my tvheadend machine runs Linux it is able to talk to my OSCam server (running on another machine) just fine. When I run tvheadend on FreeBSD, communication with the OSCam server fails. Same version of tvheadend, same configuration and the same OSCam server. Still doesn't work under FreeBSD. I've spent some time on this, but haven't figured out what the problem is.


----------



## Phishfry (Oct 21, 2017)

So oscam and cccam are some software card readers for TV encryption schemes?
Luckily this is not required for OTA in the US.

balanga  I looked up your PC express card and drew a blank. It has some similar chips as Happauge NOVA-T board but that was just one chip out of 3. Was not an Happauge rebranded card.

Just for reference I am trying on a HVR-1800 with revE1D9
The rev is a big deal on the Happauge cards. They wanton switched chips on the same models.



Criosphinx said:


> Two years ago I bought a used WinTV-HVR-1850 pcie tuner.
> 
> Since then I use it daily to watch over the air local channels with mpv


This is good to hear. At least it gives me hope.


----------



## tingo (Oct 22, 2017)

Phishfry said:


> So oscam and cccam are some software card readers for TV encryption schemes?


Yes, I use OSCam with a USB card reader (and the subscriber card, obviously).


----------



## Phishfry (Oct 22, 2017)

My dead end here on HVR-1800:
Similar to freebsdinator problem but service won't start.
Seems to be lacking a /dev/dvb node as well as any /dev/cx88* devices


```
root@TV:~ # kldstat
Id Refs Address            Size     Name
 1   29 0xffffffff80200000 1f67a88  kernel
 2    1 0xffffffff82169000 e690     cuse.ko
 3    1 0xffffffff82178000 4e30     cx23885avfw.ko
 4    1 0xffffffff8217d000 6888     cx23885.ko
 5    6 0xffffffff82184000 6fe0     iicbus.ko
 6    3 0xffffffff8218b000 7370     cx23885av.ko
 7    3 0xffffffff82193000 6fb8     cx88videocore.ko
 8    5 0xffffffff8219a000 e550     cx88.ko
 9    2 0xffffffff821a9000 4460     iic.ko
10    3 0xffffffff821ae000 7d10     cx88audiocore.ko
11    2 0xffffffff821b6000 4440     cx88mpegcore.ko

root@TV:~ # service cx88d start
ls: /dev/cx88mpeg*: No such file or directory

root@TV:~ # cx88
[cx88 2017-10-22 03:09:24] Error: You must specify a device (-d); Available devices:
Digital video:
   (No devices found)
Analog video:
   (No devices found)
Analog audio:
   (No devices found)
```


----------



## balanga (Oct 23, 2017)

Phishfry said:


> I am back at it too. this time I have an Happauge HVR-1800 which was supported at one time via the wiki.
> Looking at tvheadend it has been through some recent updating so that is good.




I got tvheadend working yesterday using LibreELEC on a RPi - I'd never used it before so wanted to see how it worked and it looks like the sort of thing I would like to have working permanently, but can't figure out what hardware to try to get it working on. I need to use a DVB-S2 interface, but not sure whether to use a dedicated receiver or get a DVB-S2 USB stick. Is any USB stick likely to be supported by FreeBSD?

Looking at LibreELEC, I wonder if it would be possible to put together an equivalent FreeBSD distrubtion  - LibreEFEC....


----------



## tingo (Oct 25, 2017)

LibreELEC is basically a "platform" for KODI. KODI has plugins for PVR / TV. Anything that works with a PVR plugin will work on LibreELEC. I use it as my frontend for tvheadend.


----------



## balanga (Dec 19, 2017)

tingo said:


> I watch TV (sometimes) via VLC on my FreeBSD machines. VLC gets the TV channels from a tvheadend server which is connected to a HDHomeRun 4DC network tuner. Sadly, the tvheadend machine runs Linux, I was unable to get the multimedia/tvheadend port to work in FreeBSD. I haven't tested in a while, it could be that the tvheadend ports works better now.



I installed multimedia/tvheadend on FreeBSD (11.1) yesterday and it came up ok and managed to pick up a few channels, although scanning seems to be a black art which sometimes works and sometimes doesn't. I couldn't figure out how to watch any of the channels though... Is there any other way to watch channels?


----------



## PacketMan (Dec 19, 2017)

Mine scan fine all the time. If you're are not then that suggests to me you either have a mux configuration issue, or a signals quality issue.  To watch channels you have to 'map' the muxes to services, etc. After that is done you can use an external player like VLC to request from TVHeadEnd the IPTV stream.  They have a Wiki and forum you can use.

I actually gave up on TVHeadEnd for a while, but I might circle back to it someday.  I'm using multimedia/emby-server mostly now, and still using multimedia/plexmediaserver some.


----------



## balanga (Dec 20, 2017)

PacketMan said:


> Mine scan fine all the time. If you're are not then that suggests to me you either have a mux configuration issue, or a signals quality issue.



I do have an issue with mux configuration... I don't really have a clue about how to set it up... There is a drop down list of pre-defined Muxes, but I'm not sure which to choose, I just want to scan for anything that is available...  There is a '--Generic--: auto-Default'  and a 'Poland: pl-Gdansk' which I think I could try, but I don't know what they provide.

I've just chosen 'Poland: pl-Gdansk' and the result was 3 muxes and 8 services. When I ran w_scan it found 30 channels...


----------



## RichardM (Dec 20, 2017)

Try using w_scan with the -L option to generate a vlc playlist (I simply run w_scan -c GB -L). Then open this playlist in vlc. vlc should play the first channel, and allow you to change channels from the playlist. At least then you know your setup is working.


----------



## balanga (Dec 20, 2017)

RichardM said:


> Try using w_scan with the -L option to generate a vlc playlist (I simply run w_scan -c GB -L). Then open this playlist in vlc. vlc should play the first channel, and allow you to change channels from the playlist. At least then you know your setup is working.



Can I use VLC on a different computer on my LAN? I managed to get Kodi set up using the TVheadend HTSP PVR client using TVheadend running on FreeBSD. I came across something called VLC HTSP Plugin but didn't manage to get anywhere with it...


----------



## PacketMan (Dec 20, 2017)

balanga said:


> Can I use VLC on a different computer on my LAN?



That is pretty much the intended 'design' concept.  You use TVHeadEnd to collect and process all of your TV signals and turn them into IPTV streams.  Then from LAN connected devices you pull those streams.


----------



## balanga (Dec 20, 2017)

PacketMan said:


> That is pretty much the intended 'design' concept.  You use TVHeadEnd to collect and process all of your TV signals and turn them into IPTV streams.  Then from LAN connected devices you pull those streams.



If I run`w_scan -c GB -L` to produce a playlist as suggested, can I use `vlc` on another computer using this playlist?

I seem to be missing a step in how to get this working...


----------



## PacketMan (Dec 20, 2017)

I don't know.  But here is what I did that did work.  After you have the mux correctly built, and mapped to a service, you will see a little play button icon next to the service.  If you hover your mouse over it you will see the URL.  If you click it, and open it with say VLC it will grab that playlist and work.  Inside VLC you can find and copy that URL, and use it on other media players.


----------



## balanga (Dec 20, 2017)

PacketMan said:


> I don't know.  But here is what I did that did work.  After you have the mux correctly built, and mapped to a service, you will see a little play button icon next to the service.  If you hover your mouse over it you will see the URL.  If you click it, and open it with say VLC it will grab that playlist and work.  Inside VLC you can find and copy that URL, and use it on other media players.



Do you have any issue with authentication? I would like to set up tvheadend without needing to login... I keep getting 'access denied' msgs...


----------



## PacketMan (Dec 21, 2017)

Nope.  The default configuration allows unauthenticated access to the admin account. If you are getting access denied messages then it sounds like you have made a change and blew yourself up.


----------



## balanga (Dec 21, 2017)

PacketMan said:


> Nope.  The default configuration allows unauthenticated access to the admin account. If you are getting access denied messages then it sounds like you have made a change and blew yourself up.



When I click on play, Firefox attempts to open VLC with a link provided by the play icon, but VLC refuses to play the link.

Is there a logging function in VLC that I can switch on to see what the problem is?

I've found this error msg:-

```
Your input can't be opened:

VLC is unable to open the MRL 'http://192.168.1.2:9981/stream/channel/98527749be9cfe5a156bad894cbeccdb?ticket=33CCA797E4166325FCE898E5F50D355C5C73CC99'. Check the log for details.
```
but I don't know where the log is...


----------



## Phishfry (Dec 21, 2017)

I am using multimedia/mpv to playback recordings via the web interface.


----------



## Donald Baud (Dec 30, 2017)

- tvheadend without authentication can be done by creating username "*" and password "*"

- I have the exact same issue as balanga :
I point VLC to http://mytvheadend-ip:9981/playlist and I get an error that VLC is unable to open MRL
I checked the logs: in /var/log/tvheadend/tvheadend.log and I don't see anything wrong except that "client hung up"

I am able to schedule a recording and watch it but I just can't get livetv to work.


----------



## poorandunlucky (Jan 5, 2018)

Every time I see this thread, I think of the FreeBSD TV podcast/youtube video series thing...  -_-


----------



## balanga (Jan 5, 2018)

Do you mean BSD Now?


----------



## poorandunlucky (Jan 5, 2018)

balanga I guess I do...  I think that's what "BSD TV" refers to, anyway...  lol


----------



## balanga (Jan 5, 2018)

poorandunlucky said:


> balanga I guess I do...  I think that's what "BSD TV" refers to, anyway...  lol



I started this thread because I had no idea about the capabilities of FreeBSD in the field of TV reception and viewing, which seem quite capable.  I'm now in the process of getting to grips with setting up FreeBSD as a TV/Media server...


----------



## poorandunlucky (Jan 19, 2018)

balanga said:


> I started this thread because I had no idea about the capabilities of FreeBSD in the field of TV reception and viewing, which seem quite capable.  I'm now in the process of getting to grips with setting up FreeBSD as a TV/Media server...



If you have a YouTubeI wouldn't mind seeing what that looks like...


----------



## balanga (Jan 20, 2018)

poorandunlucky said:


> If you have a YouTubeI wouldn't mind seeing what that looks like...



This shows how it works although getting it installed on FreeBSD is a little more complicated...


----------



## poorandunlucky (Jan 22, 2018)

balanga said:


> This shows how it works although getting it installed on FreeBSD is a little more complicated...



That's pretty neat...  There's only like 3 or 4 stations that broadcast around here, though...  Kinda useless for me, but if there were more, I'd definitely look into setting something up like that...

If I want TV it's cable/sat/ip or nothing, essentially...  : \


----------

