Jump to content
snorre

DVBViewer Recording Service running on Linux

Recommended Posts

snorre
Posted (edited)

DVBWiewer Recording Service Linux / Wine
 

 

Hardware:

  • Ubuntu 18.04 server
  • 1GB RAM
  • 1 Core
  • FSTAB: mount NFS recordings  from NAS to /mnt/recordings
  • Name: dvbsrv

 

 

Software:

We need wine (32bit version), Xvfb (short for X virtual framebuffer) for
running the recording service without screen, cabextract for extracting
the needed DirectX file (ksproxy.ax) and nfs-common for mounting the
recording share.

 

dpkg --add-architecture i386 && apt update
apt install wine32 xvfb cabextract nfs-common

 

 

Software Wine:

 

We create a user which is running the Recording Service.
In the users home we store the needed Windows software parts in the subdirectory "sw".
SSH to the Ubuntu server as root or become root with "sudo su -".

 

# create user w/o passwd
adduser dvb
su - dvb
mkdir sw && cd sw
wget http://download.microsoft.com/download/E/E/1/EE17FF74-6C45-4575-9CF4-7FC2597ACD18/directx_feb2010_redist.exe
cabextract directx_feb2010_redist.exe -F dxnt.cab
cabextract dxnt.cab -F ksproxy.ax

 

Files to be stored in /home/dvb/sw:

 

  • Total Commander 32bit: tcmd922ax32.exe
  • DVBViewer: DVBViewer_setup_6.1.4.exe
  • Recording SVC: Recording_Service_setup_1.33.02.01.exe
  • FFMPEG 32bit: ffmpeg-20190707-98b122c-win32-static.zip
  • DVB Lic: xxxx.dvbvkey

 

 

Config from Windows DVBWiewer:
 

This step is optional. You can configure the Recording Service without these.
I copied the file from the Windows installation to keep my settings.

 

  • Channel Logos: "c:\Program Files\DVBViewer\Images\Logos"
  • Plugins: "c:\Program Files\DVBViewer\Plugins"
  • Channels: "c:\Documents and Settings\All Users\Application Data\CMUV\DVBViewer\channels.dat"
  • Allowed Networks: "c:\Documents and Settings\All Users\Application Data\CMUV\DVBViewer\Config\svcuserdata.xml"
  • Rec-Server Config: "c:\Documents and Settings\All Users\Application Data\CMUV\DVBViewer\Config\service.xml"
  • Tuner Config: "c:\Documents and Settings\All Users\Application Data\CMUV\DVBViewer\Config\svchardware.xml"
  • SAT>IP Config: "c:\Documents and Settings\All Users\Application Data\CMUV\DVBViewer\Config\svcnetwork.xml"

 

 

Setup:

 

  • Start Xming on Windows client. On Linux Desktop you usually already have a X server running.
  • If using Putty, configure it to have X forwarding enabled.
  • Putty (or ssh -X) to dvbsrv as root.

 

cp .Xauthority /home/dvb/
chown dvb:dvb /home/dvb/.Xauthority
su - dvb
cd sw

 

  • Initial Wine start
wine cmd
exit

 

 

  • Install Total Commander
wine tcmd922ax32.exe

- no shortcuts

 

 

  • Install DVBViewer
wine DVBViewer_setup_6.1.4.exe

 - no shortcuts, no FW
 - OK on "Unable to execute file: powercfg.exe" - 10 times
 - Add Key File, Username and Passsword - Key file in Z:\home\dvb\sw
 - Cancel additional components install
 - do not wiew changelog_en.html and do not Launch DVBViewer

 

 

  • Install Recording Service
wine Recording_Service_setup_1.33.02.01.exe

 - no shortcuts, no FW, no Download FFmpeg
 - OK on "Unable to execute file: powercfg.exe" - 10 times
 - do not wiew changelog_en_rs.html and do not Launch Configuration
 - Right click Recording Service System Tray Icon -> Disable Auto-Start Tray Control Program -> Exit

 

 

  • Start Total Commander - These steps can also be done manually on Linux or Wine comandline "wine cmd"
wine c:\\totalcmd\\totalcmd.exe &

 - Configure
 - Copy z:\home\dvb\sw\ksproxy.ax -> c:\windows\system32
 - Open z:\home\dvb\sw\ffmpeg-20190707-98b122c-win32-static.zip
   + Copy z:\home\dvb\sw\ffmpeg-20190707-98b122c-win32-static.zip\ffmpeg-20190707-98b122c-win32-static\bin\ffmpeg.exe -> "c:\Program Files\DVBViewer"
 - Copy Plugins -> "c:\Program Files\DVBViewer\Plugins"
 - Copy Logos -> "c:\Program Files\DVBViewer\Images\Logos"
 - Copy z:\home\dvb\sw\channels.dat -> c:\ProgramData\CMUV\DVBViewer
 - Copy XML config files -> c:\ProgramData\CMUV\DVBViewer\Config

 

 

  • Configure Recording Service
wine "c:\Program Files\DVBViewer\svcoptions.exe"

 - Recorder: Directories: Z:\mnt\recordings
   + Recordings: Disable Create NTFS filestorage data
 - Web/UPnP:
   Port 8080
   Disable: Prevent PC sleep

 

 

 

Run As systemd service:

/etc/systemd/system/DVBViewer.service

[Unit]
Description=Run DVBViewer Recording Service in Wine

[Service]
User=dvb
ExecStart=/usr/bin/xvfb-run /usr/bin/wine "c:\Program Files\DVBViewer\DVBVservice.exe"

[Install]
WantedBy=multi-user.target


/etc/systemd/system/DVBViewer-port.service

[Unit]
Description=Redirect port 80 to 8080 for DVBViewer Recording Service

[Service]
Type=oneshot
ExecStart=/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

[Install]
WantedBy=multi-user.target


 

systemctl enable DVBViewer-port.service
systemctl enable DVBViewer.service
systemctl start DVBViewer-port.service
systemctl start DVBViewer.service

 

 

Start Wine programs as root:
 

  • Totalcmd:
cp /root/.Xauthority /home/dvb/ && su - dvb -c 'wine "c:\totalcmd\totalcmd.exe"' &
  • DVBViewer Opts:
systemctl stop DVBViewer && \
cp /root/.Xauthority /home/dvb/ && \
su - dvb -c 'wine "c:\Program Files\DVBViewer\svcoptions.exe"' && \
systemctl start DVBViewer
Edited by snorre
Add X forwarding to ssh command
  • Like 1

Share this post


Link to post
snorre

I found a better way to start the DVBViewer Recording Service with systemd:

 

  • as user dvb
wine cmd
sc create DVBVRecorder binpath= "c:\Program Files\DVBViewer\DVBVservice.exe" start= auto DisplayName= "DVBViewer Recording Service"
exit
  • as root create the service file - /etc/systemd/system/DVBViewer.service
[Unit]
Description=Run DVBViewer Recording Service in Wine

[Service]
User=dvb
#ExecStart=/usr/bin/xvfb-run /usr/bin/wine "c:\Program Files\DVBViewer\DVBVservice.exe" 
ExecStart=/usr/bin/wine explorer
KillMode=process

[Install]
WantedBy=multi-user.target

 

With this change, the service is registered in Wine (sc create). Every time Wine is started, the service gets started too.

The KillMode=process kills only the "explorer" process and lets Wine stop the Recording Service.

Share this post


Link to post
Griga

I have no experience with Linux, but it looks like a nice piece of work :)

 

How can DVB devices be used? Is it possible to install BDA drivers in Wine?

 

Share this post


Link to post
Goggo16
vor 41 Minuten schrieb Griga:

I have no experience with Linux, but it looks like a nice piece of work :)

 

 

Yep

 

vor 42 Minuten schrieb Griga:

How can DVB devices be used? Is it possible to install BDA drivers in Wine?

 

 

Would also be of interest to me. Want to abandon my Windows Server (with DMS and Sat-Card) and replace it with a Linux system.

 

Regards, Goggo

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • c.paul
      By c.paul
      Hallo,
      wollte meinen DVBViewer samt Recording-Service mal wieder updaten.
      Leider finde ich auf der Mitgliederseite dir Rubrik für den Recording-Service nicht.
      Danke für Eure Hilfe
      Grüße
      Christian
    • bounguine
      By bounguine
      There's a question I cannot answer myself.
      I have two physical servers in one subnet with recording services installed (ports are changed to be different) .
       
      DVBViewer on server 1 sees channels from local cards without recording service and channels from recording service on server 1 and 2.
      DVBViewer on server 2 sees channels from local cards without recording service and channels from recording service on server 2. But not from recording service on server 1.
      Logs show no tries of connection.
       
      Why?
    • Nucleorion
      By Nucleorion
      Hi,
      I change to windows 10, and now DVBViewer Recording Service icon not appear where clock area. They work fine but I don't know if is record or not. Is possible fix it?
    • svolaf
      By svolaf
      Besteht mit dem heute vorgestellten Wine 3.0 die Möglichkeit, dass der DVBViewer unter Linux läuft?
      Ein anderer User konnte vor längerer Zeit den DVBViewer unter Wine/Linux zwar installieren, hat ihn aber nicht zum Laufen bekommen.
      Als Begründung wurde die fehlende Direct3D-Unterstützung von Wine angeführt. Das hat sich ja heute geändert.
      Der Windows-API-Nachbau Wine 3.0 soll standardmäßig Direct3D in der Version 11 auf AMD- und Intel-GPU unterstützen.
       
×
×
  • Create New...