Tvheadend packages for Synology NAS
Added by Martin Walter over 7 years ago
Tvheadend 4.2.8¶
For those interested in native (non-docker) Tvheadend packages for their Synology NAS systems, you will find recent release packages published here:
Please report any Synology package-specific issues with the Synocommunity, i.e. here:
https://github.com/SynoCommunity/spksrc/issues
Test packages¶
Unpublished test packages are sometimes available in this thread, but currently not available.
Some important remarks for test packages (when available):- All packages provided here are beta packages. Use at your own risk.
- Always back up your Tvheadend configuration before you upgrade!
- You cannot upgrade from a Tvheadend-Testing to a Tvheadend release package or vice versa. These packages have separate configurations. NEVER run a testing and a release package in parallel.
- The upgrade process may take several minutes as recordings might have to be moved. Please be patient if the upgraded package does not start right away.
- The release packages are very recent and up-to-date. I highly recommend staying away from testing packages at the moment, unless you cannot run the release packages for whatever reason and you know what you are doing.
- If you are already running a package, which you have downloaded from here, upgrading should be safe (backup anyway!)
- Otherwise, I recommend clean installations, especially if you have already installed packages from different sources and you have had trouble with user permissions in the past. There is some likelihood they are messed up. Also:
- If you are currently running a Tvheadend-Testing package and you want to install a release package, you will have to start configuring it from scratch anyways.
- If you are running an old release package on DSM5.2 and you want to upgrade your DSM and Tvheadend, upgrade your DSM first, only then upgrade TVH with a new release package. However, depending on how old your old release package is, you might still run into hicups. If that happens, you are most likely better off starting a clean configuration from scratch, too.
Updates / Edits:¶
- 26.02.2019: TVH 4.2.8 republished on SynoCommunity (fixes CA module regressions and upgrades of legacy packages)
- 09.02.2019: TVH 4.2.8 published on SynoCommunity (HW transcoding support via spawn profile TBC)
- 15.10.2018: TVH 4.2.7 test packages for DSM6.1+ available. Link added.
- 08.05.2018: TVH 4.2.6 packages have been published on the Synocommunity repository. Link added.
- 14.04.2018: Update to TVH 4.2.6 (latest maintenance release) and fixes for installations on non-standard volumes
- 24.03.2018: Update fixing recordings being stored in the wrong place
- 26.01.2018: Added upgrading instructions
- 16.01.2018: Update to TVH 4.2.5 (latest maintenance release)
- 21.10.2017: Update to TVH 4.2.4 (latest maintenance release)
Replies (327)
RE: Tvheadend packages for Synology NAS - Added by Russel Crowe over 6 years ago
After setting the user and group manually as recommended it is still not working.
RE: Tvheadend packages for Synology NAS - Added by Mark Clarkstone over 6 years ago
Chris Beasley wrote:
Mark Clarkstone wrote:
pass the URL to your desc.xml on your satip box to tvh.
--satip_xml "http://192.xxx.xxx.xxx:1234/desc.xml"
The unit uses http://Ip:port/rootDescr without the xml extension. Can I still pass it the same? Also, what is the correct command in the cli to start tvh with this passed?
You'll have to edit the start-up script to pass that option, I have no idea where that is on Syno.
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
@Chris
You will find it in /var/packages/tvheadend/scripts. Edit the service_setup script and add the option to the SERVICE_COMMAND.
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
@Russel: Strange. I assume that the commands did not throw any errors when you entered them. Please let me know if this is not the case. Otherwise, please provide...
a) The errors you now see in the tvheadend.log file.
b) The output of all of the following commands:
ls -la /var/packages/tvheadend/target
synoacltool -get "/var/packages/tvheadend/target"
ls -la /volume2/@appstore/tvheadend/var
synoacltool -get "/volume2/@appstore/tvheadend/var"
RE: Tvheadend packages for Synology NAS - Added by Chris Beasley over 6 years ago
Martin Walter wrote:
@Chris
You will find it in /var/packages/tvheadend/scripts. Edit the service_setup script and add the option to the SERVICE_COMMAND.
Thanks, found it and I've also confirmed that the satip command works with the non-standard xml form of the triax unit. Will attempt to do this on the NAS now.
edit: It works! Survives package stop/start and DSM reboot.
Does your script get updated/replaced when a new version is applied? Would I have to re-add this to the service_command area?
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
@Chris Glad it works now! Unfortunately, the script will be overwritten on every upgrade. You will have to redo the change everytime. But then again, once TVH is configured and runs well, you probably don't need to upgrade that often...
RE: Tvheadend packages for Synology NAS - Added by Chris Beasley over 6 years ago
Thanks Martin, I do appreciate it! I suspect I won't need to update that often; I'm waiting for 4.3 as that gives us access to Series linking over the APIs I believe for Kodi 18
RE: Tvheadend packages for Synology NAS - Added by Russel Crowe over 6 years ago
tvheadend.log after chown commamnd
ls -la /var/packages/tvheadend/target
lrwxrwxrwx 1 root root 28 Mar 30 11:23 /var/packages/tvheadend/target -> /volume2/@appstore/tvheadend
synoacltool -get "/var/packages/tvheadend/target"
(synoacltool.c, 359)It's Linux mode
ls --la /volume2/@appstore/tvheadend/var"
total 3888
drwxr-xr-x 1 sc-tvheadend tvheadend 354 Mar 30 11:26 .
drwxr-xr-x 1 sc-tvheadend tvheadend 70 Mar 30 11:22 ..
drwxr-xr-x 1 sc-tvheadend tvheadend 64 Dec 28 17:20 accesscontrol
drwx------ 1 sc-tvheadend tvheadend 26 Jan 27 13:20 backup
drwx------ 1 sc-tvheadend tvheadend 35584 Mar 29 20:01 bouquet
drwx------ 1 sc-tvheadend tvheadend 64 Nov 19 19:03 caclient
drwxrwxrwx 1 sc-tvheadend tvheadend 18 Nov 19 18:42 channelrw------ 1 sc-tvheadend tvheadend 1242 Feb 25 11:31 config
drwx------ 1 sc-tvheadend tvheadend 32 Nov 19 19:04 dvrrw------ 1 sc-tvheadend tvheadend 3389743 Mar 30 11:21 epgdb.v2
drwx------ 1 sc-tvheadend tvheadend 34 Feb 27 12:04 epggrab
drwx------ 1 sc-tvheadend tvheadend 8 Nov 19 18:43 imagecache
drwx------ 1 sc-tvheadend tvheadend 40 Dec 17 17:08 inputrw-r--r- 1 sc-tvheadend tvheadend 22 Mar 30 11:26 .lock
drwxr-xr-x 1 sc-tvheadend tvheadend 64 Nov 19 12:50 passwd
drwx------ 1 sc-tvheadend tvheadend 448 Nov 26 12:59 profile
drwxrwxrwx 1 sc-tvheadend tvheadend 12 Feb 26 07:45 service_mapperrw-r--r- 1 sc-tvheadend tvheadend 89491 Mar 30 11:23 tvheadend_install.logrw-r--r- 1 sc-tvheadend tvheadend 467800 Mar 30 11:30 tvheadend.logrw-r--r- 1 sc-tvheadend tvheadend 5 Mar 30 11:26 tvheadend.pidrw-r--r- 1 sc-tvheadend tvheadend 9679 Mar 30 11:30 tvheadend_temp.log
synoacltool -get "/volume2/@appstore/tvheadend/var"
(synoacltool.c, 359)It's Linux mode
tvheadend.log (452 KB) tvheadend.log |
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
The permissions look fine. But I'm confused, as from the log file it seems that TVH is actually running. The errors in the log files indicate that there are issues with recording permissions on your share folders though. Can you please describe exactly what your issue is right now? What are the symptoms? What is working? What is not working?
RE: Tvheadend packages for Synology NAS - Added by P L over 6 years ago
Hello,
I tried installing tvheadend_bromolow-6.1_4.2.5-12.spk (downloaded from here: https://github.com/m4tt075/spksrc/releases/tag/TVH-4.2.5-recrecov) on a DS3615xs running DSM 6.1.4-15217 Update 5. Installation seems to go as planned but at the end I receive a "Failed to run the package service." message which means tvheadend cannot be launched and is in a stopped state.
I am attaching the logs. Am I missing something?
I also tried installing tvheadend-testing_bromolow-6.1_4.4.20180311-1.spk (downloaded from here: http://syno.dierkse.nl) and the installation goes as expected and package is running. However this testing version of tvheadend does not accept whatever credentials I use.
I also tried installing the package from the SynoCommunity available in the package center. This version seems to work and run properly. The only issue is that it is version 3.4.27-6, so that seems a bit old.
Thank.
tvheadend.log (6.34 KB) tvheadend.log | |||
tvheadend_install.log (441 Bytes) tvheadend_install.log |
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
nemal nemal L
It seems you have tried a clean install. The install log looks fine. According to the tvheadend.log TVH starts correctly. There is no error message at all, but it does stop suddenly. Can you confirm that your tuners work correctly? Have they been working before or are they recognized in the 3.4.27-6 version you have tested or in the standard Synology Video Station application (assuming you have USB tuners)?
W.r.t. the different packages you have tested:
- The tvheadend-testing packages are different packages really. You cannot run a tvheadend-testing and non-testing package at the same time. If you did, that might have caused the problem as well. Best deinsstall all of those packages again, and only install one package at a time (no upgrades either).
- The currently published package on SynoCommunity is 4.4, so I don't know why you still see the old 3.4 package. And it should be available for bromolow (your platform) according to this:
https://synocommunity.com/package/tvheadend
- In any case, not useful to look back. The 4.2.5 version should be working really.
RE: Tvheadend packages for Synology NAS - Added by Russel Crowe over 6 years ago
Hi Martin,
you are right the package is running in background but the packet center tells me it is stopped
Do you know to fix the issue with the
[ ERROR]:dvr: failed to add inotify watch to
RE: Tvheadend packages for Synology NAS - Added by P L over 6 years ago
Thank you for the answer. I do not have a tuner (yet). I wanted to try the software before making the purchase. This said I think the package should at least run even without the tuner being plugged.
For the other packages, yes I did uninstall them prior installing other versions. I carefully read the note you left in the bullet points in the OP.
As for the version in the SynoCommunity it's the 3.4 I am seing (see attachements). I did enable the Beta option in the package center settings and that's where I am now able to see version 4.2.4-11 which is the one you linked and seems to be from you (see attachement).
I tried reinstalling v4.2.5 and see the same issue. Package not starting.
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
@Russel
OK. That is good news. It might be (TBC) that package center just doesn't recognize the package as running because it is looking in the wrong location (volume1 instead of your non-standard volume2). Let's see. First things first:
1) Have you tried to log into TVH via the web-interface already? If not, please do this. Can you get in (using the login information you have selected during the install process)?
2) Do you still have your old configuration? If no, can you see the tuners, create networks and configure them?
If 1) and 2) succeeds, we can tackle the inotify issues:
3) Pick one or two of the "inotify" folders to test with. Follow the instructions in "Option 2: Per folder access" here https://github.com/SynoCommunity/spksrc/wiki/Permission-Management, but for the "sc-media" group, i.e. NOT "sc-download" as described in those instructions. When done, restart TVH and see whether the inotify issue for that folder is resolved. If it is, repeat for the others. Hint: It seems you have many of those. If possible, you might want to go one folder-hirarchy up and add "sc-media" group permissions to those, which would fix permissions for all sub-folders and save you a lot of effort. But depends on your folder structure. Cannot judge.
Please just go sequentially. If you encounter problems at any point above, please report back.
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
No clue about your problem. Let's try to summon some higher powers...
Mark Clarkstone, @perexg : Could you please take a look at the tvheadend.log file nemal nemal L has attached in his first post above? Tvheadend suddenly stops, but without throwing an error. Comparing with a log file of a perfectly running system, I believe TVH stops at a time when it is usually trying to access tuners. nemal nemal L does not have any tuners right now as he just wants to look at the package first. I don't know whether this could lead TVH to just exit (it probably shouldn't). Otherwise, do you have any other idea what can cause this? Additional problem: In-depth debugging on Synology systems is extremely tricky and not achievable without at least somewhat solid linux skills. So again, any educated guesses, more than welcome.
RE: Tvheadend packages for Synology NAS - Added by Russel Crowe over 6 years ago
Here are some answes to the questions above.
To 1) the webif is accessible and I can login only the packet center tells that tvheadend is not running
To 2) I started with version 4.2.4 from here and and the configuration works well. The update to 4.2.5 from January was also no problem. Only after updating to the March version I discover the problem thats the packet won't start.
I tried now to move the application to volume1 but this was not successfully. By this I crashed my whole configuration but fortently I have a backup from the end of March and I was able to recover.
To 3) my tvheadend user and the sc-media group have read and white access to the recording folder coming from my shared folder via DSM Manager. But the error persist.
RE: Tvheadend packages for Synology NAS - Added by Kristian Kalweit over 6 years ago
@ P L
I had the same problem: failed to run package service and no errors in the log. Stopping the standard "video station" package worked out for me!
RE: Tvheadend packages for Synology NAS - Added by P L over 6 years ago
Martin Walter Walter
Thanks Martin for helping out. Read below some interesting findings.
@Kristian Kalweit
Kristian thanks for the tip. I do not even have the Video Station package installed, yet your comment made me wonder if another package could be causing this issue. And I found. I stopped Plex Media Server and TVheadend was then able to start. But this was short lived. TVHeadend then stopped again. Looking at the logs I can see Tvheadend crashes (see attachement). I tried reproducing this but I have not been able to see Tvheadend running again. However what is reproducible is the crash. Meaning if Plex is stopped then the logs will show Tvheadend crashed and obviously Tvheadend will be in a stopped state. If Plex is running no crash is observed in the logs and Tvheadend still remains stopped.
And now the weird part. I rebooted. Stopped Plex, try launching Tvheadend and no luck. Then Launched Plex and tried launching Tvheadend and now it is running. What the ...? I am counting the time when Tvheadend will crash
tvheadend.log (6.95 KB) tvheadend.log |
RE: Tvheadend packages for Synology NAS - Added by Russel Crowe over 6 years ago
Hi,
I can confirm that tvheadend March edition is running in the packet center after stopping the video station. After the start of tvheadend I can also start video station again. Both are stated as running
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
@Russel Crowe
Amazing, but very well. So if I remember correctly, the only problem left are the "inotify" errors in the log, right? If so, please do the following:
1) ssh into your NAS and obtain root rights
2) Please share the outputs of
cd /volume3/video/Cinema/Bruce Willis
ls -la .
and
synoacltool -get "/volume3/video/Cinema/Bruce Willis"
3) Please also let me know whether your recordings work well or not (please just do test recordings if you haven't recorded recently).
Any crashes so far or has your package been stable the last couple of days?
RE: Tvheadend packages for Synology NAS - Added by P L over 6 years ago
Martin Walter Walter
It is stable as long as I don’t stop the package. If I do, I cannot start it again. Only thing that enables me to start it again is if I reboot DSM and try starting the package repeatedly.
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
nemal nemal L
OK, if you have got a chance, could you please upload a tvheadend.log covering these things happening (I don't think your old ones do show that behavior)?
RE: Tvheadend packages for Synology NAS - Added by Russel Crowe over 6 years ago
Attached the two outputs to your quieries.
You will wondering about the user and group but I used the chown -R command to set it for tvheadend.
The issue still exist:
"2018-04-05 19:35:46.522 [ ERROR]:dvr: failed to add inotify watch to /volume3/video/Cinema/Bruce Willis (err=Permission denied)"
The recordings working normally but unfortuantely tvheadend could not find them after renaming with the post recording script: "/usr/local/bin/filebot -rename "%f" --lang de --db TheMovieDB -non-strict"
I removed the most movies from the ls command log but there have all the same permisson.
Hopefully this helps
synoacltool Bruce Willis.log (733 Bytes) synoacltool Bruce Willis.log | |||
ls al Bruce Willis.log (428 Bytes) ls al Bruce Willis.log |
RE: Tvheadend packages for Synology NAS - Added by Martin Walter over 6 years ago
Yes, Tvheadend loses track of recordings if you rename them as the old filenames (with pathes) are stored in TVH configuration files. That is normal. I have a recording folder and then archive folders for movies, series, etc. From time to time I clean up the recording folder, move recordings I want to keep into the archives (with proper naming, nfo-files and artwork) and delete those I don't want to keep anymore. Finally, I log into the TVH webinterface and delete all the failed recordings and the moved recordings in the corresponding tabs.
I'm not 100% sure what causes the permission issues now. Whether this is because of files that have been renamed / removed, or whether unix and ACL permissions are srewed up (your ACL permissions do indeed not look standard). However, as the recordings are actually working, I'm also not sure whether it is worthwhile digging any deeper here. If you want to, I would clean up first (like described above) and see whether the inotify errors go away.
RE: Tvheadend packages for Synology NAS - Added by Chad d over 6 years ago
I had to do some cleaning up on my 412+ and in the process uninstalled 16.01.2018 TVH 4.2.5 and now the March TVH 4.2.5 build won't run and I get the same "failed to run the package service" error. Has a fix for this been determined or anything I can try? Wish I had save older build to reinstall