Autor Thema: qnap docker, tvheadend + sundtek  (Gelesen 10087 mal)

snoopy78

  • Newbie
  • *
  • Beiträge: 14
    • Profil anzeigen
qnap docker, tvheadend + sundtek
« am: September 05, 2022, 04:49:55 Nachmittag »
Hi there,

i have a x86 qnap with several docker container running.
For testing (if i can replace my windows iptv server) i want to use tvheadend with sundtek usb adaptor.

When i install from qnap store the driver and tvh package, i can see the usb adaptor.

However, i don't want to use the plain system but docker instead.

So uninstalled the TVH and sundtek drivers and created my container for testing like this:

docker create --name=TVHeadend \
-e PUID=1000 -e PGID=0 \
-e TZ=CET \
-p 9981:9981 \
-p 9982:9982 \
--device=/dev/dvb:/dev/dvb \
--device=/dev/sundtek:/dev/sundtek \
--device=/dev/bus/usb:/dev/bus/usb \
linuxserver/tvheadend

I also checked from here https://sundtek.de/wiki/index.php?title=Docker and created the required folders before the docker:

mkdir -p /dev/dvb/adapter0
mknod /dev/dvb/adapter0/frontend0 c 212 1
mknod /dev/dvb/adapter0/dvr0 c 212 5
mknod /dev/dvb/adapter0/demux0 c 212 3
mkdir -p /dev/dvb/adapter1
mknod /dev/dvb/adapter1/frontend0 c 212 7
mknod /dev/dvb/adapter1/dvr0 c 212 11
mknod /dev/dvb/adapter1/demux0 c 212 9
mkdir -p /dev/dvb/adapter2
mknod /dev/dvb/adapter2/frontend0 c 212 13
mknod /dev/dvb/adapter2/dvr0 c 212 17
mknod /dev/dvb/adapter2/demux0 c 212 15


Also i did set the ownership to
sudo chown -R marcus:administrators /dev/dvb/

When i then start the container i do not see any error, so then i switch into my docker and install the driver
docker exec -it TVHeadend /bin/bash
wget http://sundtek.de/media/sundtek_netinst.sh
chmod 777 sundtek_netinst.sh
./sundtek_netinst.sh -docker -use-custom-path /config

As it seems the driver is beeing installed correctly..

"


Wollen Sie fortfahren [J/N]:
J
adding /opt/bin to environment paths
adding administrator to audio group for playback...
unpacking...
checking system... installing (netinstall mode) ...
Downloading architecture specific driver ... 64bitmusl
Download finished, installing now ...
Starting driver...
2022-09-05 14:46:17 [359] UID: 0 SUID 0
done.
root@9e9f864869ab:/#
"

However, i can't enter /opt/bin to check the installed devices..
"
done.
root@9e9f864869ab:/# cd /opt/bin
bash: cd: /opt/bin: No such file or directory
root@9e9f864869ab:/#
"
&&
"
root@9e9f864869ab:/# cd /opt/bin
bash: cd: /opt/bin: No such file or directory
root@9e9f864869ab:/# ./opt/bin/mediaclient -e
bash: ./opt/bin/mediaclient: No such file or director
"

here the startup script from docker..

"
^C2022-09-05 14:53:34 [168] UID: 1000 SUID 0
2022-09-05 14:53:34 [168] UID: 1000
2022-09-05 14:53:34.891 [   INFO] main: Log started
2022-09-05 14:53:34.891 [   INFO] http: Starting HTTP server 0.0.0.0:9981
2022-09-05 14:53:34.891 [   INFO] htsp: Starting HTSP server 0.0.0.0:9982
2022-09-05 14:53:34.924 [   INFO] config: loaded
2022-09-05 14:53:34.924 [   INFO] config: scanfile (re)initialization with path <none>
2022-09-05 14:53:34.924 [   INFO] transcode: 'video' context type registered
2022-09-05 14:53:34.924 [   INFO] transcode: 'audio' context type registered
2022-09-05 14:53:34.924 [   INFO] transcode: '&TVHH264Decoder' decoder helper registered
2022-09-05 14:53:34.924 [   INFO] transcode: '&TVHTHEORADecoder' decoder helper registered
2022-09-05 14:53:34.924 [   INFO] transcode: '&TVHAACDecoder' decoder helper registered
2022-09-05 14:53:34.924 [   INFO] transcode: '&TVHVORBISDecoder' decoder helper registered
2022-09-05 14:53:34.924 [   INFO] transcode: '&TVHOPUSDecoder' decoder helper registered
2022-09-05 14:53:34.924 [   INFO] transcode: '&TVHMPEG2VIDEOEncoder' encoder helper registered
2022-09-05 14:53:34.924 [   INFO] transcode: '&TVHH264Encoder' encoder helper registered
2022-09-05 14:53:34.924 [   INFO] transcode: '&TVHHEVCEncoder' encoder helper registered
2022-09-05 14:53:34.924 [   INFO] transcode: '&TVHAACEncoder' encoder helper registered
2022-09-05 14:53:34.924 [   INFO] codec: 'mpeg2video' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'mp2' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'aac' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'vorbis' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'flac' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'libx264' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'libx265' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'libvpx' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'libvpx-vp9' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'libtheora' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'libvorbis' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'libopus' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'h264_vaapi' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'hevc_vaapi' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'vp8_vaapi' encoder registered
2022-09-05 14:53:34.924 [   INFO] codec: 'vp9_vaapi' encoder registered
2022-09-05 14:53:34.925 [   INFO] codec: 'webtv-vp8' codec profile created
2022-09-05 14:53:34.925 [   INFO] codec: 'webtv-h264' codec profile created
2022-09-05 14:53:34.925 [   INFO] codec: 'webtv-vorbis' codec profile created
2022-09-05 14:53:34.925 [   INFO] codec: 'webtv-aac' codec profile created
2022-09-05 14:53:34.926 [   INFO] descrambler: adding CAID 2600/FFFF as ConstCW interval 10000ms pc 20 ep default (BISS)
2022-09-05 14:53:34.926 [   INFO] descrambler: adding CAID 0E00/FFFF as MultiPID interval 1000ms pc 2 ep default (PowerVu)
2022-09-05 14:53:34.926 [   INFO] iptv: Using 2 input thread(s)
2022-09-05 14:53:34.926 [   INFO] dvr: Creating new configuration ''
2022-09-05 14:53:34.927 [   INFO] epggrab: module uk_freesat created
2022-09-05 14:53:34.927 [   INFO] epggrab: module uk_freesat_eit created
2022-09-05 14:53:34.927 [   INFO] epggrab: module uk_freeview created
2022-09-05 14:53:34.927 [   INFO] epggrab: module nz_freeview2 created
2022-09-05 14:53:34.927 [   INFO] epggrab: module nz_freeview1 created
2022-09-05 14:53:34.927 [   INFO] epggrab: module viasat_baltic created
2022-09-05 14:53:34.927 [   INFO] epggrab: module Bulsatcom_39E created
2022-09-05 14:53:34.927 [   INFO] epggrab: module uk_cable_virgin created
2022-09-05 14:53:34.927 [   INFO] epggrab: module eit created
2022-09-05 14:53:34.927 [   INFO] epggrab: module psip created
2022-09-05 14:53:34.930 [   INFO] epggrab: module opentv-ausat created
2022-09-05 14:53:34.930 [   INFO] epggrab: module opentv-skyit created
2022-09-05 14:53:34.931 [   INFO] epggrab: module opentv-skynz created
2022-09-05 14:53:34.931 [   INFO] epggrab: module opentv-skyuk created
2022-09-05 14:53:34.931 [   INFO] epggrab: module xmltv created
2022-09-05 14:53:34.932 [   INFO] spawn: Executing "/usr/bin/tv_find_grabbers"
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_file created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_wg created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_ar created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_ch_search created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_combiner created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_eu_epgdata created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_eu_xmltvse created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_fi created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_fi_sv created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_fr created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_huro created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_is created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_it created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_na_dd created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_na_dtv created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_na_tvmedia created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_tr created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_uk_tvguide created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_zz_sdjson created
2022-09-05 14:53:36.576 [   INFO] epggrab: module /usr/bin/tv_grab_zz_sdjson_sqlite created
2022-09-05 14:53:36.577 [   INFO] tbl-eit: module eit - scraper disabled by config
2022-09-05 14:53:36.577 [   INFO] epgdb: gzip format detected, inflating (ratio 138.6% deflated size 79)
2022-09-05 14:53:36.577 [   INFO] epgdb: parsing 57 bytes
2022-09-05 14:53:36.577 [   INFO] epgdb: loaded v3
2022-09-05 14:53:36.577 [   INFO] epgdb:   config     1
2022-09-05 14:53:36.577 [   INFO] epgdb:   broadcasts 0
2022-09-05 14:53:36.577 [   INFO] dvr: Purging obsolete autorec entries for current schedule
2022-09-05 14:53:36.577 [ NOTICE] START: HTS Tvheadend version 4.3-2030~gca756e3f7 started, running as PID:169 UID:1000 GID:0, CWD:/run/s6/legacy-services/tvheadend CNF:/config
2022-09-05 14:53:36.723 [   INFO] scanfile: DVB-S - loaded 1 regions with 116 networks
2022-09-05 14:53:36.723 [   INFO] scanfile: DVB-T - loaded 45 regions with 1130 networks
2022-09-05 14:53:36.723 [   INFO] scanfile: DVB-C - loaded 19 regions with 67 networks
2022-09-05 14:53:36.723 [   INFO] scanfile: ATSC-T - loaded 2 regions with 12 networks
2022-09-05 14:53:36.723 [   INFO] scanfile: ATSC-C - loaded 1 regions with 5 networks
2022-09-05 14:53:36.723 [   INFO] scanfile: ISDB-T - loaded 2 regions with 1297 networks
2022-09-05 14:53:47.722 [   INFO] htsp: Got connection from 192.168.0.12
2022-09-05 14:53:47.722 [   INFO] htsp: 192.168.0.12: Disconnected
"

Please help me here, since i don't know what else to try.

BR
snoopy78




« Letzte Änderung: September 05, 2022, 04:55:06 Nachmittag von snoopy78 »

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re: qnap docker, tvheadend + sundtek
« Antwort #1 am: September 20, 2022, 01:27:51 Vormittag »
Seems like you did most of it correct.

./sundtek_netinst.sh -docker -use-custom-path /config

this installed the driver in /config/opt/bin
So to start the driver following command would be correct:
/config/opt/bin/mediasrv -v

however after installation, restarting the docker should automatically start the driver.
Something went wrong during the docker installation if if did not work.

Did you manage to get it work?
Failure is a good thing! I'll fix it

snoopy78

  • Newbie
  • *
  • Beiträge: 14
    • Profil anzeigen
Re: qnap docker, tvheadend + sundtek
« Antwort #2 am: März 29, 2024, 12:32:53 Nachmittag »
sorry for the way late delay....was busy with other things...but it's working fine now
thx