Project

General

Profile

Need help with docker setup

Added by m h over 1 year ago

Hello everyone.

I have an eyetv netstream 4C tuner, which is a DVB-C tuner, and it is a network device, so the PC and the tuner communicates over LAN.

I used the snap version of TVH, and it recognized automatically the device, with its all 4 tuners.

1) I want to switch to the docker version of TVH (currently trying linuxserver/tvheadend).
The problem is that TVH can't recognize the adapters.
I think I should write something to the devices part of docker compose, but I can't find the solution.

2) Also I want to make low quality streams from HD channels (on travel the mobile networks can't handle the raw bitrate of HD channels). What would be the best solution for this? Is there an external program, which can do something automatic scaling, like youtube makes scaling for eg from 240p to 1080p? Or I have to use the TVH stream profiles, and manually select the best profile? Should I have to change something for enable hardware encoding? (my server has a 4th gen i5 igpu, which can hardware encode h.264)


the stack now looks like this:

version: "2.1" 
services:
  tvheadend:
    image: lscr.io/linuxserver/tvheadend:latest
    container_name: tvheadend
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Budapest
#      - RUN_OPTS= #optional
    volumes:
      - /mnt/h/tv/config:/config
      - /mnt/h/tv:/recordings
    ports:
      - 9981:9981
      - 9982:9982
#    devices:
#      - /dev/dri:/dev/dri #optional
#      - /dev/dvb:/dev/dvb #optional
    restart: unless-stopped

With these settings I can reach the webUI. I had to write those # because I don't know what should I write to there to make it deploy and work properly.

OS: Ubuntu 22.10

The attached image shows: left side is the docker version, right side is how the snap version works.

Thank you for the help.


Replies (2)

RE: Need help with docker setup - Added by m h over 1 year ago

Solution:

The docker only can communicate ports which are opened for it. The defaults are 9981 and 9982, as you can see in my original docker-compose stack.

As my device is a SAT>IP tuner, it communicates on its own port. So in my case these settings are wrong. USB or PCIe tuner setups may work the default way, but IP tuners are not.

the solution is easy after this:
1) Network mode must switch to host in docker. Port settings must deleted.
example (# means ignored lines, #comments):

version: "2.1" 
services:
  tvheadend:
    image: lscr.io/linuxserver/tvheadend:latest
    container_name: tvheadend
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Budapest
#      - RUN_OPTS=
    volumes:
      - /mnt/h/tv/config:/config
      - /mnt/h/tv:/recordings
    network_mode: "host" 
#    ports:
#      - 9981:9981
#      - 9982:9982
    devices:
      - /dev/dri:/dev/dri #optional
#      - /dev/dvb:/dev/dvb #optional
    restart: unless-stopped

RE: Need help with docker setup - Added by A L over 1 year ago

Hi there - could you possibly explain why the # in red has been placed just before "optional" please?

    (1-2/2)