Page 1 of 1

Pi 3 as media center/DVR

Posted: Mon Feb 29, 2016 7:53 pm
by Tonylmiller
Hello, this is my first post here!

I am really excited about the new Raspberry Pi 3. I am wanting to use it as a DVR and media player. Here is what I want to do:

*Hook up two tuners (or a single dual-tuner) so that I can record two over the air channels at one time.
*Play the video to the HDMI output with 5.1 audio.
*Record and play (previously recorded) video at the same time.
*Browse the internet sometimes via wifi.
*Receive bluetooth audio from my phone and output to my receiver via HDMI (2 channel stereo)

I have found that a powered USB hub will be required for most tuners. Someone let me know if this is not the case, assuming I use a 2.5 amp power supply for the Pi 3. Please list the specific tuner you are using without a hub.

Has anyone tried the WinTV-dualHD TV Tuner from Hauppauge with Pi 2 (or 3)? I think that would be my first choice.

Thank you very much for any help you can provide.

Re: Pi 3 as media center/DVR

Posted: Tue Mar 15, 2016 1:38 pm
by Cyberdove2
I'm working on the same thing. So far I'm using a rpi2 which seems to work very well but I'm planning to try out a rpi3. What I'm using so far is an rpi2 running Lubuntu with a Mythtv backend, and an HDhomerun dual networked tuner. And then several rpi2 around the house running Kodi/Openelec as frontends. Thru very much effort I have it working (watch/record streaming tv and watching movies on my networked hard drive. However, I'm having difficulty getting scheduling data to download from Schedules Direct. I'll be happy to give you some pointers.

Re: Pi 3 as media center/DVR

Posted: Thu May 11, 2017 1:01 pm
by dumbo25
I am having an issue with dvb driver. Any help would be appreciated.

I have raspberry pi 3 and latest raspbian (2017-04-10-raspbian-jessie.img) installed running 4.9 kernel with WinTV-dualHD. I am not using powered USB hub.

I downloaded and copied firmware to /lib/firmware/v4l-cx231xx-avcore-01.fw and rebooted.

Plugged in WinTV-dualHD

The WinTV-dualHD device seems to appear (?):
$ lsusb
Bus 001 Device 011: ID 2040:026d Hauppauge

However, when I run (I live in US and need to use ATSC)
$ w_scan -fa -A1 -c US -X

I get an error message:
"main:3228: FATAL: ***** NO USEABLE TERRCABLE_ATSC CARD FOUND. *****
Please check wether dvb driver is loaded and
verify that no dvb application (i.e. vdr) is running."

And that is where I get stuck. I know I should use modprobe to load the dvb driver, but which driver?
or how do I check that a vdr application is running? The output from $ ps -A is very long.

Here are some commands from my system. Please let me know if any other info is required
$ uname -r
4.9.24-v7+

so, driver should be there

no vdr/pvr seems to be running, but I know vdr can be called something else
$ ps -A | grep v
27 ? 00:00:00 kdevtmpfs
41 ? 00:00:00 vmstat
95 ? 00:00:00 ext4-rsv-conver
96 ? 00:00:00 ipv6_addrconf
138 ? 00:00:00 systemd-udevd
456 ? 00:00:01 avahi-daemon
485 ? 00:00:00 avahi-daemon
777 ? 00:00:00 gvfsd
781 ? 00:00:00 gvfsd-fuse
837 ? 00:00:00 gvfs-udisks2-vo
876 ? 00:00:00 gvfs-mtp-volume
880 ? 00:00:00 gvfs-gphoto2-vo
892 ? 00:00:00 gvfs-afc-volume
903 ? 00:00:00 gvfs-goa-volume
924 ? 00:00:00 gvfsd-trash

dvb is not running:
$ lsmod
Module Size Used by
joydev 9988 0
hid_logitech_hidpp 20558 0
hid_logitech_dj 12173 0
bnep 12051 2
hci_uart 19956 1
btbcm 7916 1 hci_uart
bluetooth 365511 22 hci_uart,bnep,btbcm
evdev 12423 4
brcmfmac 222874 0
brcmutil 9092 1 brcmfmac
cfg80211 543027 1 brcmfmac
rfkill 20851 4 bluetooth,cfg80211
snd_bcm2835 24427 1
snd_pcm 98501 1 snd_bcm2835
snd_timer 23904 1 snd_pcm
snd 70032 5 snd_timer,snd_bcm2835,snd_pcm
i2c_bcm2835 7167 0
bcm2835_gpiomem 3940 0
uio_pdrv_genirq 3923 0
uio 10204 1 uio_pdrv_genirq
fixed 3285 0
i2c_dev 6913 0
fuse 99603 3
ipv6 406279 46

$ ls /dev/dvb
ls: cannot access /dev/dvb: No such file or directory

$ ls /etc/modprobe.d
blacklist-rtl8192cu.conf fbdev-blacklist.conf libpisock9.conf
blacklist-rtl8xxxu.conf ipv6.conf raspi-blacklist.conf

Re: Pi 3 as media center/DVR

Posted: Mon May 15, 2017 3:27 pm
by Tdi-Me
Greetings,
This seems like the right thread to talk about these little pi devices as media centers.
Its been driving me nuts until recently. I think i have come to the conclusion that using raspberian is just causing me headaches on this front.
My goal is to set up mythtv backend on my pi3 along with plex server. The plex server setup was easy. Mythtvbackend i havent gotten to work and i am going to go at from a different angle at this point.
I have seen a couple of youtube video's on setting up mythtv backend and they all use ubuntu 14 on the pi rather than raspberian I am sure there is reason for that now that i have banged my head against the wall on this for a bit.

My big question on this really is this. Is a external hard drive required to run mythtv backend? If so is it because of size constraints of most microsd cards? Or because of potential wear ( does sql write that often that it will burn out a sd card? )
If its size how much room would be adequate? I happen to be using a 64gig class10 microsd card that i had handy. I also have several 2.5 drives laying about ( I never throw drives out when i dispose of a computer, yes i am paranoid ) so maybe one of those will work.

Thank you very much for any advice on this. Also anyone else looking around to do this here is a link to the youtube video i found: https://www.youtube.com/watch?v=dmSZ8krQM_8
I am sure once i set up the mythtv backend the plex server setup will be easy by comparison.
Also for what its worth my setup will be pi3 as a mythtv backend and plex server ( it will have a separate powered usb hard drive for movies and recordings ) a amazon fire tv with kodi / mythtv trontend and a hdhomerun prime with cablecard. I will likely be expanding this setup to include either another fire tv or fire stick once i get the details ironed out.

Re: Pi 3 as media center/DVR

Posted: Wed Jun 07, 2017 5:10 pm
by t2rich
dumbo25 wrote:I am having an issue with dvb driver. Any help would be appreciated.

I have raspberry pi 3 and latest raspbian (2017-04-10-raspbian-jessie.img) installed running 4.9 kernel with WinTV-dualHD. I am not using powered USB hub.

I downloaded and copied firmware to /lib/firmware/v4l-cx231xx-avcore-01.fw and rebooted.

Plugged in WinTV-dualHD

The WinTV-dualHD device seems to appear (?):
$ lsusb
Bus 001 Device 011: ID 2040:026d Hauppauge

However, when I run (I live in US and need to use ATSC)
$ w_scan -fa -A1 -c US -X

I get an error message:
"main:3228: FATAL: ***** NO USEABLE TERRCABLE_ATSC CARD FOUND. *****
Please check wether dvb driver is loaded and
verify that no dvb application (i.e. vdr) is running."

And that is where I get stuck. I know I should use modprobe to load the dvb driver, but which driver?
or how do I check that a vdr application is running? The output from $ ps -A is very long.

Here are some commands from my system. Please let me know if any other info is required
$ uname -r
4.9.24-v7+

so, driver should be there

no vdr/pvr seems to be running, but I know vdr can be called something else
$ ps -A | grep v
27 ? 00:00:00 kdevtmpfs
41 ? 00:00:00 vmstat
95 ? 00:00:00 ext4-rsv-conver
96 ? 00:00:00 ipv6_addrconf
138 ? 00:00:00 systemd-udevd
456 ? 00:00:01 avahi-daemon
485 ? 00:00:00 avahi-daemon
777 ? 00:00:00 gvfsd
781 ? 00:00:00 gvfsd-fuse
837 ? 00:00:00 gvfs-udisks2-vo
876 ? 00:00:00 gvfs-mtp-volume
880 ? 00:00:00 gvfs-gphoto2-vo
892 ? 00:00:00 gvfs-afc-volume
903 ? 00:00:00 gvfs-goa-volume
924 ? 00:00:00 gvfsd-trash

dvb is not running:
$ lsmod
Module Size Used by
joydev 9988 0
hid_logitech_hidpp 20558 0
hid_logitech_dj 12173 0
bnep 12051 2
hci_uart 19956 1
btbcm 7916 1 hci_uart
bluetooth 365511 22 hci_uart,bnep,btbcm
evdev 12423 4
brcmfmac 222874 0
brcmutil 9092 1 brcmfmac
cfg80211 543027 1 brcmfmac
rfkill 20851 4 bluetooth,cfg80211
snd_bcm2835 24427 1
snd_pcm 98501 1 snd_bcm2835
snd_timer 23904 1 snd_pcm
snd 70032 5 snd_timer,snd_bcm2835,snd_pcm
i2c_bcm2835 7167 0
bcm2835_gpiomem 3940 0
uio_pdrv_genirq 3923 0
uio 10204 1 uio_pdrv_genirq
fixed 3285 0
i2c_dev 6913 0
fuse 99603 3
ipv6 406279 46

$ ls /dev/dvb
ls: cannot access /dev/dvb: No such file or directory

$ ls /etc/modprobe.d
blacklist-rtl8192cu.conf fbdev-blacklist.conf libpisock9.conf
blacklist-rtl8xxxu.conf ipv6.conf raspi-blacklist.conf

I have had the exact same problem with the Hauppauge WinTV-dualHD Model 01595 USB ID 2040:026d

I've tried everything you mentioned, and I also compiled and installed the media_build drivers from the linuxtv project with no luck as well. I've tried a few different kernels (4.4 & 4.9) and patches that were supposed to provide support for this device, but still no luck.

Has anyone successfully got the Hauppauge WinTV-dualHD Model 01595 USB ID 2040:026d device working on the rapsi?

Re: Pi 3 as media center/DVR

Posted: Sun Jun 25, 2017 3:59 am
by f1lbr
I have backported the requisite patches from the 4.11.y branch to 4.9.y and have tested with my dualHd. I just added the patches today for the second tuner but have not had a chance to test them yet.

As soon as I can validate functionality, I will submit a merge request.

And, yes. I have the same model, WinTV-dualHD Model 01595 USB ID 2040:026d.

Can we post files? If you are on the latest firmware, you could probably just drop in the fixed drivers.

Re: Pi 3 as media center/DVR

Posted: Mon Jun 26, 2017 3:46 pm
by f1lbr
I have dual tuner working. I'm currently testing real time transcoding. Even with hardware h264 encoding I can't get it real time, which I believe is caused by the mpeg2 decoding. I'm patiently awaiting my mpeg2 license. :) My hope is that I can do real time mpeg2->h264 encoding on at least one tuner. Even better would be two, but I would be happy with one.

I'll send a merge request for the patches and we can hope they go into the next firmware update.

Re: Pi 3 as media center/DVR

Posted: Mon Jun 26, 2017 4:39 pm
by gkreidl
f1lbr wrote:I have dual tuner working. I'm currently testing real time transcoding. Even with hardware h264 encoding I can't get it real time, which I believe is caused by the mpeg2 decoding. I'm patiently awaiting my mpeg2 license. :) My hope is that I can do real time mpeg2->h264 encoding on at least one tuner. Even better would be two, but I would be happy with one.

I'll send a merge request for the patches and we can hope they go into the next firmware update.
viewtopic.php?f=38&t=123876

Re: Pi 3 as media center/DVR

Posted: Fri Aug 04, 2017 4:16 pm
by 1414213sqd
Did everything end up working out? Could you point me at the right way to get it going?

Re: Pi 3 as media center/DVR

Posted: Wed Jan 03, 2018 12:10 am
by djwesty
I'm also having the same issue with my pi. My dualHD tuner (2040:826d) won't register as a DVB device, the same exact issue as dumbo25, t2rich.

I've tried every relevant firmware from each post on this topic, and different kernel versions (went ahead now to 4.14.7). It seems like some people have it working with just one or the two tuners, but I can't even get one of them running. I've gotten other v4l devices to register before like an analog TV tuner, and a webcam. Anyone have luck with the digital tuner?

Re: Pi 3 as media center/DVR

Posted: Sat May 12, 2018 5:29 am
by courageon
*bump*
The new kernel seems to support this device now:
https://www.linuxtv.org/wiki/index.php/ ... nTV-dualHD

However, there is no /dev/video0 device that you can open for actual viewing... I'm so frustrated with this.

Re: Pi 3 as media center/DVR

Posted: Sat May 12, 2018 10:52 am
by gkreidl
courageon wrote:
Sat May 12, 2018 5:29 am
*bump*
The new kernel seems to support this device now:
https://www.linuxtv.org/wiki/index.php/ ... nTV-dualHD

However, there is no /dev/video0 device that you can open for actual viewing... I'm so frustrated with this.
Did you try to tune it with one f the tools from dvb-tools (zap, tzap, GnuTV)?

No. 1 rule for adding a DVB-Device: check for Linux compatibility before buying something.