NFS Server for PVR

TAPs für die SRP- und CRP-Serie
Benutzeravatar
Ricki
ToppiHolic
ToppiHolic
Beiträge: 5836
Registriert: Fr 9. Dez 2005, 23:06
Receivertyp: 2xSky Q
MagentaTV MR601
2xUltimo4K DVB-S2x FBC
Receiverfirmware: Alle aktuell
Wohnort: Wetter/Hessen
Kontaktdaten:

AW: NFS Server for PVR

#21

Beitrag von Ricki » Mo 17. Mär 2014, 22:21

DeltaMikeCharlie hat geschrieben:I am thinking about writing a TAP to control this. Any suggestion would be welcome. How many PVRs? Bi-directional?


I have 4 toppis, so that is my minimum :D

DeltaMikeCharlie hat geschrieben:Auto mount/dismount when a server PVR is powered on/off?
Yes

DeltaMikeCharlie hat geschrieben:op-up warnings?
Yes but limited

DeltaMikeCharlie hat geschrieben:Integrated with TMA1?


I do not really see the value?
cu
Ricki


SmartEPGvu+ & SmartFilervu+ Wiki

SAT Anlage - Kathrein: CAS 75 mit UAS 584 LNB & EXR 1512 (Multischalter 5 auf 12), Astra 19.2°E

VU+ ULTIMO 4K DVB-S2x FBC+Samsung SSD870 QVO , 2 TB
VU+ ULTIMO 4K DVB-S2x FBC+Kingston SSDSUV400S, 480 GB
Skin: Vu_HD_1080P mit angepassten Skinparts - VTi 15.0.02
Plugins: smartEPGvu+ , Multi QuickButton, OpenWebif, AutocutVfd, GithubPluginUpdater, InfoBarTunerState, VTi Panel

Panasonic TX-55GZW1509; Sony UBP-X700, Apple TV 4K, Fire TV 4K, Harmony Elite, Denon AVR-X2300W, Synology 716+ (6TB)

dRdoS7
Benutzer
Benutzer
Beiträge: 52
Registriert: So 14. Apr 2013, 00:31

AW: NFS Server for PVR

#22

Beitrag von dRdoS7 » Di 18. Mär 2014, 03:06

Hi,

Good news.

[quote="DeltaMikeCharlie"]
I am thinking about writing a TAP to control this. Any suggestion would be welcome. How many PVRs?[/quote]


We only have 2.

[quote="DeltaMikeCharlie"]Bi-directional?[/quote]

Yes.

[quote="DeltaMikeCharlie"]Auto mount/dismount when a server PVR is powered on/off? Pop-up warnings? [/quote]

Yes, possibly keep server awake if a recording is being watched. And a warning to the server's user!

[quote="DeltaMikeCharlie"]Integrated with TMA1?[/quote]

By TMA1 do you mean TMSArchve?

Forget that: I found TMA1. What would be the reason for intergration? Less TAPs running?

]Thanks,

dRdoS7
Zuletzt geändert von dRdoS7 am Di 18. Mär 2014, 06:16, insgesamt 1-mal geändert.

DeltaMikeCharlie
WebController
WebController
Beiträge: 470
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: NFS Server for PVR

#23

Beitrag von DeltaMikeCharlie » Di 18. Mär 2014, 08:33

The first question to answer is if the "Server" PVR should be treated like a NAS (on 24x7) or as a device that could be powered-off by anybody at any time?

If the answer is "NAS" then we use NAS Mount as the client and move forward. If not, we need to do more testing regarding the impact on the client if the server suddenly goes away. As long as the client PVR does not crash/reboot then minimal precautions may be enough.

The highest number of PVRs owned by 1 household would appear to be 4. Allowing for a 50% growth, perhaps 6 would be a suitable maximum number of clients. If each of those 6 clients are playing a recording, then we need to be able to support 18 simultaneous file handles (MPG/NAV/INF). I think read somewhere in the source code that the default was 16 handles. I may have been mistaken, or that could be 16 in total or 16 per client. More testing/research is required.

What areas of the "Server" PVR are shared? DataFiles, MediaFiles, ProgramFiles, MP3Files, External Media? Add an external HDD and the server PVR could become a NAS!

To reduce the number of TAPs, do we also include management of the telnet daemon into this TAP?

Benutzeravatar
Gerti
Nicht mehr bei Topfield-Europe
<b>Nicht mehr bei Topfield-Europe</b>
Beiträge: 15740
Registriert: Fr 9. Dez 2005, 00:16
Receivertyp: Vu+ Uno 4k
Wohnort: Hürth
Kontaktdaten:

AW: NFS Server for PVR

#24

Beitrag von Gerti » Di 18. Mär 2014, 08:47

NAS Mount already detects if the Server is online or offline and mounts / unmounts it automatically. We maybe can communicate between Server and Client TAP to unmount the Server a little faster if someone shut it down.

Gruß,
Gerti

dRdoS7
Benutzer
Benutzer
Beiträge: 52
Registriert: So 14. Apr 2013, 00:31

AW: NFS Server for PVR

#25

Beitrag von dRdoS7 » Di 18. Mär 2014, 11:08

Hi,

[quote="DeltaMikeCharlie"]
I have 2 Topfield PVRs and I would like to be able to play recordings from one unit on the other unit directly. Currently, I used FTP to copy recordings and that works well, but I need to do this in advance of watching the programme. Being able to access programmes directly from the HDD of the other PVR would be more useful.[/quote]


We have similar. Instead of FTP I have set up BackGroundCopy & NASMount, with FreeNFS running on a NAS/PC 24/7. Less hassle and no PC actions required. Recordings are available to both Toppies.

I move files to MoveToNAS, they are copied on the next start. Occasionally I run BGC manually after a recording is finished, but that's no great problem. Would be better if it monitored the MoveToNAS directory. I have asked, but that's another topic!

There is one plus to this method: there's a backup copy. Toppies do have the occasional "HDD Checking" which leads to "No recordings". Very bad for marital bliss (if that really exists).

The way I see it, if you want to watch a recording from another Toppy, that one needs to stay awake, until finished or stopped. In our house it not likely to be left on 24/7. Finance Minister would have a pink fit!

If the other Toppy is off, it will of course require manual intervention. And a walk into another room. That's the price we'll have to pay.

I use TMSArchive and only use "Datafiles", with some sub-directories. TMSA lets me watch all ripped & d/l movies and TV shows. It's the best FM I've found. I don't bother sharing mp3 or pictures, but others may.

I would run this NFSServer tap on both Toppies. Allow them to switch off only if no-one is watching a recording. Maybe intercept the PowerOff key and integrate something like AutoStandby

Will it be possible to watch the same recording on both machines at the same time? Will it allow a current recording to be watched? Bookmarking? Or use TMSA file play indication.

dRdoS7

DeltaMikeCharlie
WebController
WebController
Beiträge: 470
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: NFS Server for PVR

#26

Beitrag von DeltaMikeCharlie » Di 18. Mär 2014, 21:08

I did a quick test this morning. I powered-off the server PVR whilst the client PVR was playing a file.

The client did not crash, playback simply stopped and the PVR returned to live TV.

When the server PVR was powered-on again, it did a "Checking HDD". The file that was being played did not appear to be damaged.

Because of the minimal impact of this test, I think that "phase 1" would be a simple non-interactive TAP to start unfsd at startup. If we encounter problems later, the TAP can be refined with extra testing, etc. NAS Mount would be used on the client PVR.

dRdoS7
Benutzer
Benutzer
Beiträge: 52
Registriert: So 14. Apr 2013, 00:31

AW: NFS Server for PVR

#27

Beitrag von dRdoS7 » Mi 19. Mär 2014, 03:44

Hi,

[quote="DeltaMikeCharlie"]Because of the minimal impact of this test, I think that "phase 1" would be a simple non-interactive TAP to start unfsd at startup. If we encounter problems later, the TAP can be refined with extra testing, etc. NAS Mount would be used on the client PVR.[/quote]

Look forward to testing it.

dRdoS7
Zuletzt geändert von dRdoS7 am Mi 19. Mär 2014, 03:46, insgesamt 1-mal geändert.

DeltaMikeCharlie
WebController
WebController
Beiträge: 470
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: NFS Server for PVR

#28

Beitrag von DeltaMikeCharlie » Mi 19. Mär 2014, 21:39

I have been doing some research prior to writing a TAP to start the NFS server.

Discovery 1 - The PVR already has a copy of portmap in /bin.

This means that if portmap is started first, we can get rid of all of the stuff about "-n 2049 -m 645" and "port=2049,mountport=645". It also means that other OS clients (OS X, Linux, ?Windows?) will have a much easier time mounting the PVR's HDD directly.

Discovery 2 - There are already 3 TAPs that do something similar:
  • TMSTelnetd
  • KMTelnet
  • StartFTPd
Although they do not start an NFS server, they start/stop standard linux daemons that allow remote access of different kinds to the PVR.

Discovery 3 - Script.tap

There is already a TAP called Script that will run 1 script when it starts and 1 script when the TAP is stopped.

In the short term, anybody that wants to automate starting the NFS server and sharing their HDD should just install Script.tap and modify "start.sh" to start unfsd. "end.sh" should also contain "killall -9 unfsd" to avoid the "Checking HDD" message.

In the long term, I plan to write a single TAP that can replace all of the TAPs above and be expandable to other applications in the future.

Script.tap is a wonderful idea, but it needs people to be able to firstly edit a shell script, and secondly consolidate all of their commands into a single script. For people with IT skills, this is OK, but for the average user, this may be difficult.

I propose "borrowing" the wonderful idea in Script.tap and expanding it. Instead of just 1 script, there would be many. Each of these scripts would contain specific instructions for 1 feature and be executed in alphabetical order at startup (sound familiar?). For example:

00-portmap.start, 01-telnet.start, 04-nfs.start, zz-verylast.start.

There would also be corresponding "stop" scripts.

00-veryfirst.stop, 01-telnet.stop, 99-nfs.stop, zz-portmap.stop

So with a single TAP and collection of script files, any linux daemon can be started and stopped automatically. One day we may add samba support, who knows?

There could also be standard prerequisite testing like ensuring that busybox, etc, are present, executable and perhaps even the correct version.

I realise that this is a bit off topic, but it addresses a bigger picture and consolidates a number of semi-related functions into a single TAP.

Thoughts?

DeltaMikeCharlie
WebController
WebController
Beiträge: 470
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: NFS Server for PVR

#29

Beitrag von DeltaMikeCharlie » Do 20. Mär 2014, 03:56

I did some load testing.

On my server PVR, I started 2 HD recordings and 2 SD recordings and started local playback of a HD recording as well.

I played another HD file remotely from my client PVR and saw very little degradation. I say "very little" because skipping back seemed a little bit slower, but that could have just been my imagination.

During this test, the "pvr" process was using about 6.4% CPU ant the "unfsd" process was using around 11%.

I also used the "lsof" command to see what files were open during playback. I expected to see MPG/INF/NAV, but I only saw the MPG. I was able to see the NAV open, but only when I was shuttle-playing backwards. This is good news because it means the unfsd needs less concurrent file handles than I originally feared.

With portmap now running, I was able to get "NekoDrive" running on my PC and map a drive directly to my PVR. I tried to play my MPGs with both VLC (2.0.1) and Windows Media player, but neither worked. I normally have to pre-process my MPG files with FFMPEG before I can play them on my Win7 Pro PC so this result was not unexpected.

I tested playing the same recording simultaneously on both PVRs and I did not encounter any problems when playing. I tried to create bookmarks on both PVRs, but only the bookmarks made by the last PVR to stop playback were saved. This was also expected considering the lsof findings above.

Playing a recording-in-progress on the server with the client PVR also worked OK, however, the skipping was inaccurate. This can occur with chase-playing recordings under normal conditions too, so I was not too concerned.

I exported and mounted a USB device attached to the server PVR and it seems to work OK when mounted on the client. I tried loading unfsd with the external USB drive listed in the exports file but not connected and unfsd seemed to load OK, but no shares were active. When run interactively, unfsd reported "syntax error in '<exports>', exporting nothing". That would explain it.

Benutzeravatar
Twilight
Zauberküchencheflehrling mit extra Butter
Zauberküchencheflehrling mit extra Butter
Beiträge: 64903
Registriert: Fr 9. Dez 2005, 09:17
Receivertyp: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Wohnort: Wien Umgebung

AW: NFS Server for PVR

#30

Beitrag von Twilight » Do 20. Mär 2014, 06:40

good ideas :up:

twilight

dRdoS7
Benutzer
Benutzer
Beiträge: 52
Registriert: So 14. Apr 2013, 00:31

AW: NFS Server for PVR

#31

Beitrag von dRdoS7 » Do 20. Mär 2014, 07:05

Hi,

[quote="DeltaMikeCharlie"]With portmap now running, I was able to get "NekoDrive" running on my PC and map a drive directly to my PVR. I tried to play my MPGs with both VLC (2.0.1) and Windows Media player, but neither worked. I normally have to pre-process my MPG files with FFMPEG before I can play them on my Win7 Pro PC so this result was not unexpected.[/quote]

Have you tried GOMPlayer? It plays my 2470 & 7260 mpgs (with no pre-processing).

dRdoS7

Benutzeravatar
macfan
Ex-iTiNa-Promoter
Ex-iTiNa-Promoter
Beiträge: 24968
Registriert: Fr 9. Dez 2005, 10:16
Receivertyp: 2 x TF 2401 CI+, 2100, 5200 C, VU+ Ultimo 4K
Receiverfirmware: SRP-Serie: die neueste, 5k: Jan 07 PTU, VU+ VTi 15.0
Wohnort: Dortmund

AW: NFS Server for PVR

#32

Beitrag von macfan » Do 20. Mär 2014, 08:34

Twilight hat geschrieben:good ideas :up:

You took the words out of my mouth.

Gruß, Horst

DeltaMikeCharlie
WebController
WebController
Beiträge: 470
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: NFS Server for PVR

#33

Beitrag von DeltaMikeCharlie » Do 20. Mär 2014, 08:49

[quote="dRdoS7"]Have you tried GOMPlayer?[/quote]Thanks, that worked well! I was able to play a recording from my PVR directly on my PC via NFS to a mapped drive.

DeltaMikeCharlie
WebController
WebController
Beiträge: 470
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: NFS Server for PVR

#34

Beitrag von DeltaMikeCharlie » So 30. Mär 2014, 06:11

I have created TMSServer.tap to start unfsd. It also starts the telnet daemon and optionally an alternate ftp daemon.

There are a number of "*.start" and "*.stop" scripts that are executed in alphabetical order. You can add or delete scripts as required.

You can download the TAP from here.

If you are currently using KMTelnet.tap or TMSTelnetd.tap then you will have to either disable these TAPs or disable the telnet scripts. If you are using StartFTPd.tap and you want to transfer that functionality to TMSServer, you will have to enable those scripts.

The easiest way to enable and disable scripts is simply to rename them.

I have also included a new copy of unfsd that has been "stripped" and is much smaller that the original version, but the functionality is unchanged.

I found that the PVR already had a portmap daemon installed so I now start it before unfsd and a lot of the command line parameters can be removed. It also makes mounting the PVR's HDD from a PC NFS client much easier.

This may not be the final version of TMSServer. I am thinking about adding "*.status" scripts and a PVR GUI so that daemons can be started and stopped individually and the current status can be displayed.

I have done some more testing with the NFS daemon. I looked at various ways of killing the daemon cleanly when files were is use, but they always resulting in a "Checking HDD" message.

I also tested playing up to 4 files at once and the performance also seemed to be OK. I only have one other PVR, so I had to test with PC clients.

I do plan to release TMSServer on TAPtoDate once users on this forum have tested it.

Benutzeravatar
Twilight
Zauberküchencheflehrling mit extra Butter
Zauberküchencheflehrling mit extra Butter
Beiträge: 64903
Registriert: Fr 9. Dez 2005, 09:17
Receivertyp: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Wohnort: Wien Umgebung

AW: NFS Server for PVR

#35

Beitrag von Twilight » So 30. Mär 2014, 07:17

thanks :up:

twilight

DeltaMikeCharlie
WebController
WebController
Beiträge: 470
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: NFS Server for PVR

#36

Beitrag von DeltaMikeCharlie » So 30. Mär 2014, 09:27

I just tested my PVR running unfsd shared to xbmc running on a Raspberry Pi.

I was able to play an MP3 and MP4, but not an MPG. I suspect that I have a missing codec. More research to come.

This could be a cheap method of playing Topfield recordings in another room on a TV without a PVR or other media player.

Benutzeravatar
Mucki
Quelle des Wissens
Quelle des Wissens
Beiträge: 1352
Registriert: Mo 12. Dez 2005, 19:14
Receivertyp: SRP2100, PVR5000, Vu+ Ultimo4K mit DVB-S2 + DVB-T2
Receiverfirmware: Die Aktuelle
Wohnort: Grafschaft

AW: NFS Server for PVR

#37

Beitrag von Mucki » So 30. Mär 2014, 09:57

Great, thank you ! :hello:
Gruß Mucki :)

Taps: SE, TMSArchiv, V!deotext, Callmonitor, lost+found, TMSRemote, TimeShiftSaver, NiceDisplay, FastSkip, TMSCommander, Backupsettings, FreeSatEit_TMS, TMSMount, Inf+, TMA1

Neu Ultimo4K mit SmartEPGVu+, Autotimer, AutomaticBackup, EMC, Camofs, CoolTV, AdvancedLibrary, VWeather3.
Skin: IFlatHD mit Eisman Pro Features

DeltaMikeCharlie
WebController
WebController
Beiträge: 470
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: NFS Server for PVR

#38

Beitrag von DeltaMikeCharlie » Di 1. Apr 2014, 10:14

I have been experimenting with NASMount as a client for unfsd and found that the following ini settings work for me:

Code: Alles auswählen

NAS IP-Address=<Server PVR IP>
NAS MAC-Address=
NAS Boottime=0
Local Folder Name=<Mount Point>
Remotefolder MediaFiles=
Remotefolder MP3Files=
Remotefolder PhotoFiles=
Remotefolder DataFiles=/mnt/hd/DataFiles
Mountoptions=-orw,nolock,vers=3
NAS Recording=0
MountDelay=30
Timerdelay=0
Automount=1
Ping Wait=3
Ping Gap=30
AutoUnmount=1
Logfile=0

Benutzeravatar
Twilight
Zauberküchencheflehrling mit extra Butter
Zauberküchencheflehrling mit extra Butter
Beiträge: 64903
Registriert: Fr 9. Dez 2005, 09:17
Receivertyp: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Wohnort: Wien Umgebung

AW: NFS Server for PVR

#39

Beitrag von Twilight » Di 1. Apr 2014, 10:31

thanks :up:

twilight

DeltaMikeCharlie
WebController
WebController
Beiträge: 470
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: NFS Server for PVR

#40

Beitrag von DeltaMikeCharlie » Sa 12. Apr 2014, 02:36

Here is version 1.1 of TMSServer. It is still experimental, so be careful.

All of the scripts have changed so this is a total replacement, all previous scrips should be deleted.

This new version now allows for individual servers to be started, stopped or bypassed using an onscreen menu. The only way to access this menu is via TMSCommander.

When run from the Telnet console, the "control" script can take 3 parameters: "start", "stop" and "status" to perform the required function. The shutdown scrips are separate and do the same thing as "stop", but in the correct sequence.

The scripts now return some data that the TAP reads. If you are writing a script for your own service, please study the existing scripts and emulate the correct return values.

The next step will be to start broadcasting these services so that a new TAP called "TMSClient" can learn about other PVRs and mount their HDDs automatically.

Antworten

Zurück zu „SRP/CRP TAP-Bereich“