This commit is contained in:
AlexPresso 2021-04-13 17:36:40 +02:00 committed by GitHub
parent a857e30d3d
commit 0d15ed1e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 16 deletions

View File

@ -15,9 +15,10 @@ This patcher is designed to simplify the installation steps from this [Gist](htt
- SynoCommunity ffmpeg 4.2.1-23 (and above) ([help](https://synocommunity.com/#easy-install))
## Instructions
- Check that you meet the required dependencies
- Check that you meet the required [dependencies](https://github.com/AlexPresso/VideoStation-FFMPEG-Patcher#dependencies)
- Connect to your NAS using SSH (admin user required) ([help](https://www.synology.com/en-global/knowledgebase/DSM/tutorial/General_Setup/How_to_login_to_DSM_with_root_permission_via_SSH_Telnet))
- Use the command `sudo -i` to switch to root user
- Use the folowing command to execute the patch: `curl https://raw.githubusercontent.com/AlexPresso/VideoStation-FFMPEG-Patcher/main/patcher.sh | bash`
- Restart VideoStation (stop & start from Package Center)
- VideoStation will have to be repatched everytime you update it (and when you update DSM)

View File

@ -1,10 +1,5 @@
#!/bin/bash
function save_current() {
echo "[INFO] Saving current ffmpeg as ffmpeg.orig"
mv -n /var/packages/VideoStation/target/lib/ffmpeg /var/packages/VideoStation/target/lib/ffmpeg.orig
}
function save_and_patch() {
cp -n /var/packages/VideoStation/target/lib/libsynovte.so /var/packages/VideoStation/target/lib/libsynovte.so.orig
chown VideoStation:VideoStation /var/packages/VideoStation/target/lib/libsynovte.so.orig
@ -13,7 +8,8 @@ function save_and_patch() {
}
function armv8_procedure() {
save_current
echo "[INFO] Saving current ffmpeg as ffmpeg.orig"
mv -n /var/packages/VideoStation/target/lib/ffmpeg /var/packages/VideoStation/target/lib/ffmpeg.orig
echo "[INFO] Downloading patched ffmpeg files to /var/packages/VideoStation/target/lib"
echo ""
@ -47,22 +43,30 @@ function armv8_procedure() {
}
function others_procedure() {
save_current
echo "[INFO] Saving current ffmpeg as ffmpeg.orig"
mv -n /var/packages/VideoStation/target/bin/ffmpeg /var/packages/VideoStation/target/bin/ffmpeg.orig
wget -O - https://gist.githubusercontent.com/BenjaminPoncet/bbef9edc1d0800528813e75c1669e57e/raw/ffmpeg-wrapper > /var/packages/VideoStation/target/bin/ffmpeg
echo "[INFO] Creating ffmpeg-wrapper (using SynoComunity ffmpeg, make sure you installed it)"
wget -q -O - https://gist.githubusercontent.com/BenjaminPoncet/bbef9edc1d0800528813e75c1669e57e/raw/ffmpeg-wrapper > /var/packages/VideoStation/target/bin/ffmpeg
chown root:VideoStation /var/packages/VideoStation/target/bin/ffmpeg
chmod 750 /var/packages/VideoStation/target/bin/ffmpeg
chmod u+s /var/packages/VideoStation/target/bin/ffmpeg
save_and_patch
mv /var/packages/CodecPack/target/bin/ffmpeg33 /var/packages/CodecPack/target/bin/ffmpeg33.orig
cp /var/packages/VideoStation/target/bin/ffmpeg /var/packages/CodecPack/target/bin/ffmpeg33
mv /var/packages/CodecPack/target/bin/ffmpeg41 /var/packages/CodecPack/target/bin/ffmpeg41.orig
cp /var/packages/VideoStation/target/bin/ffmpeg /var/packages/CodecPack/target/bin/ffmpeg41
if [[ -d /var/packages/CodecPack/target/bin/ffmpeg33 ]]; then
echo "[INFO] Patching CodecPack ffmpeg33"
mv /var/packages/CodecPack/target/bin/ffmpeg33 /var/packages/CodecPack/target/bin/ffmpeg33.orig
cp /var/packages/VideoStation/target/bin/ffmpeg /var/packages/CodecPack/target/bin/ffmpeg33
fi
if [[ -d /var/packages/CodecPack/target/bin/ffmpeg41 ]]; then
echo "[INFO] Patching CodecPack ffmpeg41"
mv /var/packages/CodecPack/target/bin/ffmpeg41 /var/packages/CodecPack/target/bin/ffmpeg41.orig
cp /var/packages/VideoStation/target/bin/ffmpeg /var/packages/CodecPack/target/bin/ffmpeg41
fi
echo ""
echo "[SUCCESS] Done patching, please restart VideoStation (stop and start from package center)"
}