Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple streams at once #2

Open
dragon299 opened this issue Jul 22, 2018 · 7 comments
Open

Allow multiple streams at once #2

dragon299 opened this issue Jul 22, 2018 · 7 comments

Comments

@dragon299
Copy link

I love frizzante and it works perfectly but as mentioned in the readme file the support for multiple streams is still missing. I would love that feature and would like to know if this is coming in the near future.

Unfortunately I am not familiar with ruby. Otherwise I would have created a pull request already.

@tobsch
Copy link
Owner

tobsch commented Jul 22, 2018 via email

@tobsch
Copy link
Owner

tobsch commented Jul 28, 2018

@dragon299 your input is highly appreciated - if you have ideas or can propose a way on how to easily get around the ip limit, I would be glad to integrate it.

@dragon299
Copy link
Author

I do not use a fritzbox but a "AVM FRITZ!WLAN Repeater DVB-C (Dual-Tuner (DVB-C)". So this device is able to provide two streams concurrently. I guess the only missing part is to allow two frizzante sessions?

From my tests the fritz repeater does choose the tuner by its own. So its not necessary to provide anything in the RTSP url.

@dragon299
Copy link
Author

dragon299 commented Jul 28, 2018

Okay. I invested a few hours and this problem is really taff to fix. I am pretty sure you can not do it by code. Its working now for me. Here is what I did:

You need two different Ips when you access the tuner. It will not work from one ip.

Create a second IP on your interface:

vi /etc/network/interfaces
auto enp8s0
iface enp8s0 inet static
address 10.0.0.5
netmask 255.255.255.0
gateway 10.0.0.1
dns-nameserver 10.0.0.1

auto enp8s0:0
iface enp8s0:0 inet static
  address 10.0.0.6
  netmask 255.255.255.0

Create a new docker network:
docker network create --subnet=172.18.0.0/24 friz

Create two frizzante docker containers:

docker run -d -e FRITZBOX_HOST="10.0.0.86" -e PORT=4568 -p=4568:4568 --net friz --ip="172.18.0.2" efa98b576289
docker run -d -e FRITZBOX_HOST="10.0.0.86" -e PORT=4569 -p=4569:4569 --net friz --ip="172.18.0.3" efa98b576289

Create a iptables NAT rule to make sure the second container will use the second IP:
iptables -t nat -I POSTROUTING -s 172.18.0.3 -j SNAT --to 10.0.0.6

Install haproxy to loadbalance the two containers:
apt-get install haproxy

Setup the config for haproxy:

vi /etc/haproxy/haproxy.cfg
frontend http_front
   bind *:4567
   stats uri /haproxy?stats
   default_backend http_back

backend http_back
   balance leastconn
   server server1 localhost:4568 check
   server server2 localhost:4569 check

Start the haproxy:
systemctl start haproxy

Add frizzante to plex with IP:
localhost:4567

This is a huge workaround I guess but it works at least. I would really appreciate to hear other ideas on how to make this work.

@tobsch
Copy link
Owner

tobsch commented Nov 11, 2018

@dragon299 did you test fritzos 07.00?
I just upgraded and it seems that the ip limitation is gone. did not dig deeper though...

@dmahhhh
Copy link

dmahhhh commented Feb 16, 2019

Hi tobsch,

first of all thanks for providing this docker container! It's working properly.

I'm using following setup:

  • Fritz Repeater DVB-C with FritzOS 07.01.
  • PMS Version 1.15.0.659

I've noticed that two streams concurrently isn't working on my side with current OS version.

@dragon299
Copy link
Author

I tested my configuration with fritzos 7.12. It does still not work, if you try to open two streams from the same ip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants