Minisatip <-> Tvheadend over Wireguard tunnel

Support forum for minisatip
Post Reply
gurabli
Posts: 5
Joined: Fri Feb 14, 2020 10:53 am

Minisatip <-> Tvheadend over Wireguard tunnel

Post by gurabli » Fri Feb 14, 2020 11:19 am

Hi,
I have a remote location at my parents house with DVB-C access. I have a linux (Diepti/Armbian) box with a DVB-C dual tuner there. My goal is to stream live TV from that remote location to my current location (as I don't have access to that provider). I use Wireguard for this, being way more faster and lightweight than OpenVPN. Internet WAn upload and download is perfect at both location: remote location upload 300 Mbit, my location download 1000 Mbit. Wireguard is configured already, works like a charm.

I run Tvheadend now on the remote box, and a Tvheadend on my current location, where I added the remote Tvheadend as IPTC source over Wireguard tunnel. However, I'm not quite satisfied with the result, although it is working almost perfect. Anyway, I was thinking of replacing the remote instance of Tvheadend with minisatip. The reason is simple, I believe minisatip is much more stable and lighter on resources than Tvheadend.

Being new to minisatip, I don't really know how to configure it, but I will outline my goal here, in hope you will be able to help me out.

A) REMOTE LOCATION
Linux running DVB-C dual tunner and Wireguard interface on wg0 with ip 10.66.66.1
Tvheadend configured for all DVB-C muxes

B) LOCAL LOCATION
Linux running Tvheadend and Wireguard tunnel interface wg0 with ip 10.66.66.2
Tvheadend A location added as IPTV with ip 10.66.66.1 ip.

How should I configure minisatip to replace Tvheadend on A to stream the desired channel (mux) to local B Tvheadend over interface wg0, to IP 10.66.66.2?

Than how should I add the stream coming from minisatip in Tvheadend (preferably with EPG information too)?

What protocol would you recommend to use between A and B? UDP would be the best, considering the latency?

I don't really need multicast, as I don't want minisatip to stream the whole mux (actually two muxes being a dual tunner) all the time to local B, just on demand for the given channel (or mux). Is this possible?

Many thanks!

cata
Site Admin
Posts: 585
Joined: Tue May 12, 2015 1:01 am

Re: Minisatip <-> Tvheadend over Wireguard tunnel

Post by cata » Fri Feb 28, 2020 10:35 pm

I think this should work with not much issues:

On host A: run just ./minisatip

On host B: you may need to route also the eth0 ip address thru wg0 (eg: route add A_LAN_IP wg0 ). Make sure you add A_LAN_IP to allowed IPs for that peer.

./build.linux/tvheadend -d --satip_xml http://A_LAN_IP:8080/desc.xml

The best way is to configure RTSP over TCP for WAN links. Arguably you may do the same for LAN as well.

gurabli
Posts: 5
Joined: Fri Feb 14, 2020 10:53 am

Re: Minisatip <-> Tvheadend over Wireguard tunnel

Post by gurabli » Sat Feb 29, 2020 1:18 pm

cata wrote:
Fri Feb 28, 2020 10:35 pm
I think this should work with not much issues:

On host A: run just ./minisatip

On host B: you may need to route also the eth0 ip address thru wg0 (eg: route add A_LAN_IP wg0 ). Make sure you add A_LAN_IP to allowed IPs for that peer.

./build.linux/tvheadend -d --satip_xml http://A_LAN_IP:8080/desc.xml

The best way is to configure RTSP over TCP for WAN links. Arguably you may do the same for LAN as well.
Thanks you cata!

I just tried, but something must be wrong. I'm not sure if routing is configured properly, but I can ping both locations.

Now in Tvheadend I have the minisatip tuners detected, but when I add a new DVB-C network and try to scan I receive the following error:

Code: Select all

subscription: 0067: "scan" subscribing to mux "362MHz", weight: 6, adapter: "SAT>IP DVB-C Tuner #1 (192.168.1.125@UDP)", network: "Digi_satip", service: "Raw PID Subscription"
satip: SAT>IP DVB-C Tuner #1 (192.168.1.125@UDP) - RTSP error -5 (I/O error) [9874-200]
mpegts: 362MHz in Digi_satip - scan no data, failed
subscription: 0067: "scan" unsubscribing
Your help is very much appreciated!

9000h
Posts: 76
Joined: Tue May 12, 2015 1:49 pm

Re: Minisatip <-> Tvheadend over Wireguard tunnel

Post by 9000h » Sat Feb 29, 2020 5:44 pm

Hi,
as your TVH log shows you are still using UDP and not TCP.
CU
9000h

gurabli
Posts: 5
Joined: Fri Feb 14, 2020 10:53 am

Re: Minisatip <-> Tvheadend over Wireguard tunnel

Post by gurabli » Sat Feb 29, 2020 5:50 pm

9000h wrote:
Sat Feb 29, 2020 5:44 pm
Hi,
as your TVH log shows you are still using UDP and not TCP.
CU
9000h
So I should use TCP? Where should I set it, on minisatip side? Now minisatip is just started without any parameters.

cata
Site Admin
Posts: 585
Joined: Tue May 12, 2015 1:01 am

Re: Minisatip <-> Tvheadend over Wireguard tunnel

Post by cata » Sat Feb 29, 2020 6:01 pm

On tvh side, at the IP of minisatip page. It is a checkbox

gurabli
Posts: 5
Joined: Fri Feb 14, 2020 10:53 am

Re: Minisatip <-> Tvheadend over Wireguard tunnel

Post by gurabli » Sat Feb 29, 2020 6:08 pm

So I don't need to start minisatip with -O --satip-tcp option?

EDIT: Found the TCP checkbox in TVH, now it works great! Running over Wireguard tunnel, perfect, at least for now.

Are there any options I should set for minisatip? Or just simply run it without any specific options added. Still need to figure out how should I start minisatip on system startup (Ubuntu Server Bionic).

Finally: how should I add the "route add IP wg0" routing to Ubuntu Server to make it persistent over system restart?

9000h
Posts: 76
Joined: Tue May 12, 2015 1:49 pm

Re: Minisatip <-> Tvheadend over Wireguard tunnel

Post by 9000h » Sun Mar 01, 2020 11:30 am

Hi,
for minisatip there is no need for a specific option in regards to TCP transport, all other issues are not related to minisatip.
CU
9000h

cata
Site Admin
Posts: 585
Joined: Tue May 12, 2015 1:01 am

Re: Minisatip <-> Tvheadend over Wireguard tunnel

Post by cata » Wed Mar 04, 2020 10:17 pm

Probably there are couple of resources for that. I am adding all my setup to the /etc/rc.local interface. The other way is to do the setup in /etc/network/interfaces.

More details:

https://wiki.debian.org/Wireguard

Post Reply