Project

General

Profile

Raspberry Pi as SAT>IP server for another TVheadend?

Added by Just Me almost 5 years ago

Is it possible to use TVheadend just as SAT>IP (not IPTV) server?
Or is there some other software that runs on a RPi or Odroid that can stream up to 4 or 8 DVB-S2 USB tuners?

First idea was a XORO 8100: https://www.xoro.de/produkte/details/xoro-satip-server-8100/
But it seems like the device is not really sat>ip spec 1.2 compliant.
Seems like if you watch or record from the same transponder the device is using 2 tuners.
Also the XORO cant do UniCable.

So my idea is to run TVheadend (or something else) just as SAT>IP server on on a RPi or Odroid (or maybe two of them) and have the main TVheadend running on my server.
So there is no limitation in what is normally possible with 4 or 8 tuners/transponders.

EDIT:
Through google i found out there is a SAT>IP Server.
There already was port 9983 and a 1 in DVB-S and DVB-S2.
But how do i start that thing?


Replies (5)

RE: Raspberry Pi as SAT>IP server for another TVheadend? - Added by M A Ben Amara almost 5 years ago

on a rpi or similar boxes, what tuners do u want to use ? usb tuners ...

if you want to use USB tuner(s) and may stream some streams the rpi may just be a little weak ...
and i dont actually see the benefit for 2 tvh servers in chain (1 satip, 1 using satip source), limits are your tuner(s), nvm

satip is enabled pretty sure by default, if not, check config, general, satip>server, enable by set a port 554 or 9983

here as sample i use a octopus net v2 as satip server and tvheadend is using this as tuner

RE: Raspberry Pi as SAT>IP server for another TVheadend? - Added by Joe User almost 5 years ago

If you want "just" a satip server, use minisatip: https://github.com/catalinii/minisatip

I run it on an old linux stb and it works fine as a source for Tvheadend.

As for performance, it depends on which pi, which tuners, bitrate of channels, network, etc.

RE: Raspberry Pi as SAT>IP server for another TVheadend? - Added by Ledow Ledow almost 5 years ago

Perfectly possible, I just did this.

Two RPis with the official DVB uHat, both running tvHeadend.

Enable SAT>IP server on one and export 1 DVB-T2 service, set a RTSP port, and reboot both machines (you don't need to but it stops you chasing ghost problems caused by the config not updating on both ends).

On the client, it was more tricky. You should see the SAT>IP device start to appear under DVB Inputs on that, but you may need to make sure that the networking is correct.

From there, you have to faff a little, adding it as another adaptor for a Network (e.g. mine were both Freeview, so I added them - both local and SAT>IP - to a single DVB-T Network called Freeview).

Once it appears under DVB Inputs, you need to get the little tiny green dot showing on it (this should happen but if you don't have a green dot on it, then it's not going to work - something's not enabled or there's some problem somewhere).

You can then use the Status, Stream page to check what they are doing and that they both are being used.

Then, you should be able to browse two different bouquets (which you can see by watching two far-away channels and watching Status, Stream) at the same time.

Once that works, it'll work for recording and other things.

I'm about to also add on a DVB-S2 stick to the same setup. I'm presuming I do that as another "Network", but I will find that out in due course.

Reasons for doing this across two different Raspberry Pi's? I had one already setup as a DVR / Kodi TV with a DVB uHat. It's in a nice, custom, tight-fitting case. You can't fit another uHat on it (I suspect it's technically possible, but it involves bridging to a different I2C pin or something, when I read up on it, to avoid interfering with the first hat). I have another RPi with a DVB uHat in a similar case, doing not much else and has no display on it. When I don't need it, I leave that one switched off, and the DVR one does everything it used to on its own. But when I need dual-view or am going to be recording lots, I turn the headless one on and it's picked up and used as a secondary source of DVB-T over SAT>IP.

One is on one side of the room near an aerial socket. The other is on the other side of the room near another socket with a different aerial. There are no cables connecting them. Even over its internal wifi it streams HD perfectly fine to the DVR one (which has a larger SD card in it for recording) and I cannot tell the difference between local DVB and SAT>IP.

And I don't have to worry about pokey-out USB dongles, whether one RPi has the oomph to do what I need, or where to find my recordings. One is a Pi3 and one is a Pi4, too.

RE: Raspberry Pi as SAT>IP server for another TVheadend? - Added by Just Me almost 5 years ago

Thanks to all.
I already found MiniSatIP through google and it just works. For now with one DVBSky S960 USB DVB-S2 tuner.

First i was testing it on a RPi 3 with Raspbian. But i guess 100 Mbit/s will be bottleneck with 4K and 8K.
So i used my Odroid C2. First tested it with DietPi but couldn't make the DVBSky S960 working.
So i used Armbian Buster minimal and it worked right away.
The Odroid sucks less power from the socket then the RPi.
With Armbian IDL is 1.5 watts. With DietPi it was 3.1 watts.

Watching 3 HD stations it's 2 watts.

The reason for the MiniSatIP server is that Tvheadend is running in Hyper-V and there is no USB passtrough in Hyper-V.
The Hyper-V Server is a Haswell i5 and with the Tvheadend virtual machine running is consuming 14.3 watts IDL.
Watching the 3 HD stations on three different devices (workstation, shield tablet, Fire TV 4K) it goes up to ~18 watts.

I first tested Tvheadend in VMWare Workstation (it has USB passtrough) with the DVBSky directly connected to that machine.
But just watching one station the machine is using ~25 watts and more if you watch more stations.

I wonder how many 8K stations you can get from one USB 2.0 tuner without problems.
There is one 8K demo station that seems to be 86.900 Mbit/s :-)

RE: Raspberry Pi as SAT>IP server for another TVheadend? - Added by Echo Golf almost 2 years ago

I am also setting this up but it has been proving problematical for me as a newbie to TVHeadend. For some years I have had a number of Raspberry Pi3Bs which presently run LibreElec 9.2.8 (Kodi front end) dotted about the house with our TV's. These have been succesfully running as clients to a MediaPortal back end PVR running on a Windows 7 desktop with a Hauppauge dualHD USB DVB-T/T2 tuner. My objective now is to migrate to just using the Pi3Bs, each with a PiTVHat tuner installed (each Pi can only run one PiTVHat, and with the one it will also all just fit into the standard Pi3B case with a bit of fettling) and via SAT>IP use the tuners to service one of the Pis designated to be the TVHeadend server to record and stream live TV back to each of the Pi3Bs Kodi front ends. LibreElec conveniently has the software components needed available as addons within the LibreElec addon repository.

To get a feel for TVHeadend I started with a single Pi3B with the PiTVHat installed, then added TVHeadend 4.2 server addon (under Services) and TVHeadend Client (under PVR clients). I configured it all using the PiHut PiTVHat installation guide available online. That was straightforward and with a bit of extra tweaking, specifically establishing which Mux frequencies were right for my local transmitter because the pre-defined mux files storred under /storage/.kodi/addons/service.tvheadend42/dvb-scan/dvb-t were out of date, I had that all running correctly.

Next to distribute the Tuner and run that on one Pi using the TVHeadend Sat>IP server to serve TVHeadend running on a second Pi3B. Here the problems started as under Librelec, after a day of messing about with the Sat>IP tuners not showing from the TVHeadend SAT>IP server and looking through the service.log or debug.log, I finally realised that the SAT>IP server was failing to start at boot because the network was not ready. The difficulty is that nothing tells you within the TVHeadend web interface that the SAT>IP server has or has not started. This makes it difficult to know if the issue is configuration related or a system problem. You have to look in the log in here /storage/.kodi/userdata/addon_data/service.tvheadend42. So I then delayed the start of the TVHeadend server by 20 seconds through the Kodi Addon configuration and that solved that. If you don't see:

2022-12-04 16:10:12.615 [ INFO]:satips: Starting SAT>IP RTSP server 192.168.2.185:9985
2022-12-04 16:10:12.615 [ INFO]:satips: SAT>IP Server initialized
2022-12-04 16:10:12.615 [ INFO]:satips: HTTP 192.168.2.185:9981, RTSP 192.168.2.185:9985
2022-12-04 16:10:12.615 [ INFO]:satips: descramble 1, muxcnf 1
2022-12-04 16:10:12.615 [ INFO]:satips: tuner[fe=1]: DVB-T2 #1
2022-12-04 16:10:12.619 [ INFO]:config: loaded

in your debug.log (enable that also through the LibreElec Kodi Addon config and select satips as the debug string) then your Sat>IP server has not started. Your SAT>IP tuner should then automatically show up in your remote TVHeadend server. It should then be possible to use this virtual tuner as if it were hardware having linked it to your Servive Network. However that didn't work either for me. I found that after sucessfully tuning the first Mux, all the others would then fail one after the other. In the log I saw:

2022-12-04 16:14:16.593 [ INFO] mpegts: 602MHz in Freeview - tuning on SAT>IP DVB-T Tuner #1 (192.168.2.185:9985)
2022-12-04 16:14:16.593 [ INFO] subscription: 0001: "scan" subscribing to mux "602MHz", weight: 6, adapter: "SAT>IP DVB-T Tuner #1 (192.168.2.185:9985)", network: "Freeview", service: "Raw PID Subscription"
2022-12-04 16:14:24.374 [ INFO] mpegts: 602MHz in Freeview scan complete
2022-12-04 16:14:24.374 [ INFO] subscription: 0001: "scan" unsubscribing
2022-12-04 16:14:24.376 [ INFO] mpegts: 586MHz in Freeview - tuning on SAT>IP DVB-T Tuner #1 (192.168.2.185:9985)
2022-12-04 16:14:24.376 [ INFO] subscription: 0003: "scan" subscribing to mux "586MHz", weight: 6, adapter: "SAT>IP DVB-T Tuner #1 (192.168.2.185:9985)", network: "Freeview", service: "Raw PID Subscription"
2022-12-04 16:14:24.389 [ ERROR] satip: SAT>IP DVB-T Tuner #1 (192.168.2.185:9985) - RTSP SETUP error -5 (Input/output error) [6-455]
2022-12-04 16:14:29.376 [ INFO] mpegts: 586MHz in Freeview - scan no data, failed
2022-12-04 16:14:29.376 [ INFO] subscription: 0003: "scan" unsubscribing

You can see that the first Mux tuned correctly and then the next failed. So did all the others the same. The behaviour was consistent. I did manage to tune each Mux individually one by one, but was never able to play anything and it clearly wasn't right. After messing about for another day with the TVHeadend Sat>IP server settings and reading forums and failing to get it to work, I gave up trying to use it. I was never able to find out what the errors related to. It appeared to me that the TVHeadend server making the tuning scan was sending tuning requests symultaneously which timed out because there is only one tuner available but this is conjecture. I then found that others in various forums were recommending the minisatip server which I then found was also available as an addon within LibreElec and that it didn't need any configuration. It just grabs the tuners on reboot. I disabled TVHeadend on the Pi with the tuner in it and installed minisatip, added a 20s delay to the start of that within the addon, rebooted, and it indeed did just work! I saw the tuners within the TVHeadend Server on the other Pi3B immediately, linked them to the Network through the tuner settings and forced a scan, mapped what channels I wanted and tried to watch something. It all worked great! So that's my 2p. If you want to run your TV tuners remotely via Sat>IP servers under LibreElec to service TVHeadend, use the minisatip service addon not the TVHeadend service for the purpose.

I now have 3 Pi3Bs each with a PiTVHat tuner installed. 2 Pi3Bs run minisatip service addon and the 3rd TVHeadend server 4.2. The 2 Sat>IP tuners and the actual PiTVHat in the third Pi3b serve the TVHeadend 4.2 server running on the third Pi3B. All three Pi3Bs then run the TVHeadend PVR client addon linked to the TVHeadend Server on the 3rd Pi. I've also added an inexpensive SSD USB3 drive to hold TV recordings and the live TV timeshift buffer. All three Pis consume less than 20watts in total.

    (1-5/5)