163d0 Digital TV (DVB, ATSC) on FreeBSD: A small guide - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Miscellaneous > Howtos & FAQs

Howtos & FAQs Would you like to share some of your solutions for certain problems? Tips or tricks? Post here.

Reply
 
Thread Tools Display Modes
  #1  
Old October 16th, 2012, 20:50
nox@ nox@ is offline
FreeBSD Developer
 
Join Date: Feb 2008
Posts: 66
Thanks: 1
Thanked 38 Times in 14 Posts
Default Digital TV (DVB, ATSC) on FreeBSD: A small guide

I just started writing this up, comments welcome!

Drivers:

There are at least three driver ports for digital TV providing the /dev/dvb api:

- multimedia/cx88 provides the /dev/dvb api for a few CX2388x-based PCI(e) DVB-T and ATSC tuners, see http://corona.homeunix.net/cx88wiki

- multimedia/sms1xxx-kmod provides the /dev/dvb api for a few Siano-based DVB tuners, see http://contribs.martymac.org

- multimedia/webcamd runs Linux v4l/dvb drivers in FreeBSD userland to access a lot of different USB DVB-T/T2/C/S/S2 and ATSC tuners, see http://wiki.freebsd.org/WebcamCompat for tuners people tested on FreeBSD and the linuxtv wiki for (incomplete) lists of more USB tuners that have good chances of working:
http://www.linuxtv.org/wiki/index.php/DVB-T_USB_Devices
http://www.linuxtv.org/wiki/index.ph...T2_USB_Devices
http://www.linuxtv.org/wiki/index.ph...S2_USB_Devices
http://www.linuxtv.org/wiki/index.php/DVB-S_USB_Devices
http://www.linuxtv.org/wiki/index.php/DVB-C_USB_Devices
http://www.linuxtv.org/wiki/index.php/ATSC_USB_Devices

To use webcamd:

Many tuners need firmware files, put them in /boot/modules. (See also http://wiki.freebsd.org/WebcamCompat and http://linuxtv.org/wiki/index.php/Fi...g_the_Firmware.)
Then install the webcamd port, add your user to the webcamd group (and log it back in), make sure cuse4bsd.ko gets loaded (add it to /boot/loader.conf), add webcamd_enable="YES" to /etc/rc.conf, and plug in the tuner. Now you should see device nodes like /dev/dvb/adapter0/demux0, /dev/dvb/adapter0/dvr0 and /dev/dvb/adapter0/frontend0. If the tuner has a CI slot (for decoding crypted channels) you should also get /dev/dvb/adapter0/ca0. (I think for crypted channels you need VDR or maybe MythTV, and of course the right CAM and smartcard.)

You can build the webcamd port with the DEBUG knob and start it manually on a root shell with "-d x.y -H" to see log messages by the Linux drivers in case there are problems (run usbconfig as root to find the usbus x and device y the tuner is on.)

Some tuners need webcamd run with "-m dvb-usb-init.force_pid_filter_usage=1" to receive clean streams (you can put that in webcamd_flags in /etc/rc.conf), tho that breaks some methods of channel scanning like multimedia/w_scan and the scanning in multimedia/kaffeine so you need to restart webcamd (for example by re-plugging the tuner) with webcamd_flags commented out for the duration of the scan.

Receiving TV, now that you have /dev/dvb nodes:

- The easy (GUI) way: multimedia/kaffeine (This looks for the /dev/dvb nodes via hald which I think currently only works for webcamd when it's started with -H; and it should now also work for the cx88 drivers that meanwhile know about hald too.)

To use kaffeine for digital TV install the port, make sure hald and dbus are running and webcamd was started with -H (should be default), start kaffeine, select "Configure television", click on "Update scan data over the Internet", select your tuner and region (or satellite details), then select "Channels" and start a scan. If the scan finished without finding channels (and it's not the antenna setup) then check for missing firmware files and that webcamd isn't run with "-m dvb-usb-init.force_pid_filter_usage=1", see above for how to get logs from webcamd.
One you have setup your channel list (for example "copy filtered" w/o filters will copy all the found channels, then click "OK"), you can select "Digital Television" from the main menu and zap to your channels.

- The 'minimal' way: multimedia/w_scan and multimedia/mplayer

If you want to use mplayer make sure it's built with the V4L knob enabled and that you have a ~/.mplayer/channels.conf file. To get one you can use w_scan with 'scan' channels.conf type, i.e. that's -X . See the w_scan homepage http://wirbel.htpc-forum.de/w_scan/index_en.html for options and examples.

Once you have a channels.conf you can try: $ mplayer dvb://<channelname>

- The 'full-featured'/automated/networked way: multimedia/vdr and related ports:

This has its own page on the FreeBSD wiki: http://wiki.freebsd.org/VDR (and it's what I prefer. )

- The alternative 'full-featured'/automated/networked way: multimedia/mythtv and related ports:

This is probably preferred for ATSC. It has a page on the FreeBSD wiki too: http://wiki.freebsd.org/MythTV

Note there was a bug in the Linux dvb drivers used by webcamd < 3.9.0.1 affecting mythtv-setup, if that happens to you (symptom is a failed FE_GET_INFO ioctl) just update your webcamd port.

- Others:

There are more apps that can receive from /dev/dvb like vlc, xine, etc (some people even use Linux binaries like SageTV via the Linuxolator and multimedia/linux_dvbwrapper-kmod), but from what I tested VDR works best, closely followed by current kaffeine.

Last edited by nox@; May 13th, 2013 at 20:17. Reason: cx88 is for atsc too and meanwhile also knowns about hald; underline headers
Reply With Quote
The Following 7 Users Say Thank You to nox@ For This Useful Post:
drhowarddrfine (October 17th, 2012), htutt (November 24th, 2012), jandegr1 (January 14th, 2013), myso (October 17th, 2012), nemysis (October 16th, 2012), SirDice (October 17th, 2012), wblock@ (November 24th, 2012)
  #2  
Old November 23rd, 2012, 23:48
nox@ nox@ is offline
FreeBSD Developer
 
Join Date: Feb 2008
Posts: 66
Thanks: 1
Thanked 38 Times in 14 Posts
Default XBMC can be used for DVB too...

Btw you can also use XBMC to watch digital TV, currently that's via multimedia/xbmc-pvr using VDR backend as explained on the VDR wiki page http://wiki.freebsd.org/VDR, but once XMBC mainline 12.0 gets released PVR support will be merged there too so the main multimedia/xbmc port probably will be updated later to support it also. First using VDR as backend, but work has also started on porting tvheadend so maybe that can be used as PVR backend for XBMC later too.

Just thought I'd mention...
Juergen

Last edited by nox@; November 24th, 2012 at 18:18. Reason: Typo
Reply With Quote
The Following User Says Thank You to nox@ For This Useful Post:
htutt (November 24th, 2012)
  #3  
Old December 31st, 2012, 19:33
nox@ nox@ is offline
FreeBSD Developer
 
Join Date: Feb 2008
Posts: 66
Thanks: 1
Thanked 38 Times in 14 Posts
Default New webcamd version with the MythTV fix for testing

Hi!

The MythTV fix has finally been committed to Linux media tree for_3.9 [1] and Hans posted a new webcamd version for testing the has the patch:

http://lists.freebsd.org/pipermail/f...er/013734.html

Testers welcome, also non-MythTV ones...

Juergen

[1] http://git.linuxtv.org/media_tree.gi...d10a82ab544b21
Reply With Quote
  #4  
Old January 12th, 2013, 21:46
nox@ nox@ is offline
FreeBSD Developer
 
Join Date: Feb 2008
Posts: 66
Thanks: 1
Thanked 38 Times in 14 Posts
Default Webcamd 3.9.0.1 now in ports

I just committed Hans' webcamd update so the MythTV bug should be history now...

(And there are a few more rtl28xxu-based tuners working for DVB among other things.)

Enjoy,
Juergen
Reply With Quote
  #5  
Old January 14th, 2013, 15:20
jandegr1 jandegr1 is offline
Junior Member
 
Join Date: Nov 2011
Posts: 1
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi,
With wecamd 3.9.0.1 I could get my Hauppauge wintv-hvr-930c working for dvb-c and
dvb-t. I did not(yet) get analogue tv working.
To get the wintv-hvr-930c working, the webcamd port has to be reconfigured to build the
drxk module as well.
I used this http://lists.freebsd.org/pipermail/f...ch/012899.html post to know how to reconfigure the port to build more modules.
I use mencoder for recording and mplayer for playback and liveTV, unfortunatly no HW acceleration for my AMD zacate .
@ nox and hps : thx for all the efforts

regards,
Jan
Reply With Quote
  #6  
Old January 18th, 2013, 23:36
patmcevoy patmcevoy is offline
Junior Member
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello All,
Do you have any recommendations for a US-based (time warner)digital cable system dvb/atsc tuner card? I would like to use it on a network PVR using MythTV or VDR on an FreeBSD 9 box and view the content using a Raspberry Pi XBMC elsewhere on the network. An internal card would be preferable, but if USB is easier, that would be a consideration. Thank you.
P
Reply With Quote
  #7  
Old January 20th, 2013, 18:44
nox@ nox@ is offline
FreeBSD Developer
 
Join Date: Feb 2008
Posts: 66
Thanks: 1
Thanked 38 Times in 14 Posts
Default

Quote:
Originally Posted by patmcevoy View Post
Hello All,
Do you have any recommendations for a US-based (time warner)digital cable system dvb/atsc tuner card? I would like to use it on a network PVR using MythTV or VDR on an FreeBSD 9 box and view the content using a Raspberry Pi XBMC elsewhere on the network. An internal card would be preferable, but if USB is easier, that would be a consideration. Thank you.
P
I'm not sure about https://en.wikipedia.org/wiki/QAM_%28television%29 support (which afaik you need for U.S. cable) for PCI cards supported by multimedia/cx88 (see the list at http://corona.homeunix.net/cx88wiki/...SupportedCards), but the one USB ATSC/QAM tuner listed on the wiki (https://wiki.freebsd.org/WebcamCompat), PCTV 801e SE, did work for cable channels transmitted in the clear for at least one guy too (QAM256, yes this isn't noted in the wiki yet), and it also seems to be not very expensive.

HTH,
Juergen

Last edited by nox@; January 20th, 2013 at 20:26.
Reply With Quote
  #8  
Old January 26th, 2013, 22:05
nox@ nox@ is offline
FreeBSD Developer
 
Join Date: Feb 2008
Posts: 66
Thanks: 1
Thanked 38 Times in 14 Posts
Default

Quote:
Originally Posted by jandegr1 View Post
Hi,
With wecamd 3.9.0.1 I could get my Hauppauge wintv-hvr-930c working for dvb-c and
dvb-t. I did not(yet) get analogue tv working.
To get the wintv-hvr-930c working, the webcamd port has to be reconfigured to build the
drxk module as well.
I used this http://lists.freebsd.org/pipermail/f...ch/012899.html post to know how to reconfigure the port to build more modules.
I use mencoder for recording and mplayer for playback and liveTV, unfortunatly no HW acceleration for my AMD zacate .
@ nox and hps : thx for all the efforts

regards,
Jan
You are welcome!

I just commited Hans' update to webcamd 3.9.0.4 that now also builds the drxk driver by default, do you want to test your tuner with 3.9.0.4 and send me an entry for the wiki? See here: https://wiki.freebsd.org/WebcamCompat#DVB.2FATSC

Thanx!
Juergen
Reply With Quote
  #9  
Old January 27th, 2013, 01:39
patmcevoy patmcevoy is offline
Junior Member
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Cheers. I will check this out when I get a minute and share anything I can add to the conversation.
Reply With Quote
  #10  
Old January 27th, 2013, 16:06
dareni dareni is offline
Junior Member
 
Join Date: Nov 2010
Posts: 11
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Thanks for the great work!

This usb device Leadtek DTV Dongle Gold works with af9015(4) with mplayer. Please add an entry on the wiki.
Reply With Quote
  #11  
Old January 27th, 2013, 18:03
nox@ nox@ is offline
FreeBSD Developer
 
Join Date: Feb 2008
Posts: 66
Thanks: 1
Thanked 38 Times in 14 Posts
Default

Quote:
Originally Posted by dareni View Post
Thanks for the great work!

This usb device Leadtek DTV Dongle Gold works with af9015(4) with mplayer. Please add an entry on the wiki.
Done.

Thanx for testing!
Juergen
Reply With Quote
Reply

Tags
atsc, dvb, kaffeine, mythtv, vdr

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD pf - definitive guide? urbanriot Firewalls 2 March 6th, 2012 09:04
[Solved] <Guide at post #19> FreeBSD concise updating guide request dcbdbis Installing & Upgrading 33 March 20th, 2011 02:54
One Linux'rs guide to FreeBSD Updating dcbdbis Howtos & FAQs 13 December 8th, 2010 23:55
FreeBSD Ports Guide. ciscoh4x0r Installation and Maintenance of FreeBSD Ports or Packages 4 July 13th, 2010 20:25
[Solved] FreeBSD 7.x and authpf guide ustuntas Firewalls 6 May 6th, 2009 11:20


All times are GMT +1. The time now is 14:18.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0