AlexPresso / VideoStation-FFMPEG-Patcher

Patcher to enable DTS, EAC3 and TrueHD transcoding support to Synology VideoStation (from DSM 6.2 to DSM 7.0 and above ; ffmpeg4, 5, 6, 7 ready)
1.06k stars 102 forks source link

[QA] Automatic repatch #51

Closed Mavyre closed 1 year ago

Mavyre commented 2 years ago

Question / Enhancement

Could it be possible to automatically repatch VideoStation? It might be at reboot time, or checking every hour if the repatch is needed, for instance. We, maybe, could use the task planner within DSM, but I doubt it has root access.

Has anyone tried that, yet?

AlexPresso commented 2 years ago

Hey there, It's a wonderful idea. I can check if I can access the Syno crontab, if so, I could add a cronjob while installing the patch, but it may not appear in the DSM UI

JajajTec commented 2 years ago

You alredy can! Just add the command as a execution-job on system start in the task-manager. If you dont know how, say it!

ner00 commented 2 years ago

Although the execution job is already a half-decent solution, the shortcoming is that it only works on system boot, which is a problem if you happen to reboot your NAS rarely. Ideally it would be possible to create a recurrent schedule with root permissions, which I don't remember if it's possible from the user interface. Crontab though would allow root privileges, recursive checks at fixed intervals, like every hour for example.

AlexPresso commented 2 years ago

Yeah, I know there are some Syno hardware on which you can do it. But like on my DS218Play, you don't have this feature, the goal is to have it work on every architectures so I need to make sure I can do it using the native Linux crontab, even if it's kind of "hidden".

No worries, I'll check it out ;)

AlexPresso commented 1 year ago

Hey there,

Testers needed for the new patcher (with update action), if you want to test the new patcher :

Testing the update scheduled task: see this page but until the changes are merged on the main branch, use the following script:

#!/bin/bash
curl https://raw.githubusercontent.com/AlexPresso/VideoStation-FFMPEG-Patcher/update_action/patcher.sh | bash -s -- -a update -b update_action
Fabian1601 commented 1 year ago

Hello Alex, The script runs through with me without problems :) Maybe as a suggestion for improvement, if the script is up to date, theoretically no restart of the packages would be necessary or?

DS1520+ with DX517 DSM 7.2-64216 Beta VS 3.1.0-3107 Beta AMC 3.1.0-3004 Beta ffmpeg 4.4.3-48

AlexPresso commented 1 year ago

Hi Fabian, Thank you for testing :) About the restart, I thought about it for a while and I prefer to restart the packages just in case I also change the patching procedure in a new version or the wrapper

AlexPresso commented 1 year ago

Hey there, After a few tries and thinking about the problem, I think it's better to not add this feature, as any issue either on github, version check or in my code, can lead to unexpected results and brick VideoStation's installation.

The easiest and safest way if you want to achieve (very close to) automatic update is to create a scheduled task with root permission and something like the following script:

curl https://raw.githubusercontent.com/AlexPresso/VideoStation-FFMPEG-Patcher/main/patcher.sh | bash -s -- -a unpatch
curl https://raw.githubusercontent.com/AlexPresso/VideoStation-FFMPEG-Patcher/main/patcher.sh | bash -s -- -a patch