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.05k stars 100 forks source link

[QA] Unable to perform this operation in VideoStation #7

Closed lykane1337 closed 3 years ago

lykane1337 commented 3 years ago

Hello guys,

I commented the gist https://gist.github.com/BenjaminPoncet/bbef9edc1d0800528813e75c1669e57e#gistcomment-3808866 because I have an issue with VideoStation after running the script. Do not get me wrong. I am very happy that there is hope to get DTS running. Sorry for spamming the gist.

I got this message when I am trying to access the VideoStation-Webinterface:

Screenshot_01749

My Configuration:

DS118 (rtd1296 (armv8)) DSM 7.0-41890 VS 3.0.1-2067 FFMPEG 4.3.2-37 Advanced Media Extensions 1.1.0-0201

I reinstalled VideoStation + Advanced Media Extensions an run your script. I checked the ressources monitor. There is no load on the ressources. CPU 0-5% and the RAM is constantly up to 43%.

Do you have any ideas to solve the problem?

That would be great!

Thank you very much Kind regards David

AlexPresso commented 3 years ago

Hello,

Do you have any error in /var/log/packages/VideoStation.log ?

lykane1337 commented 3 years ago

Hello @AlexPresso ,

I have reinstalled just the VideoStation and run your script again. In the log I have some Starts that failed. The last times I have reinstalled everything there are only the same errors.

2021/07/13 11:41:01 stop VideoStation 3.0.1-2067 Begin start-stop-status stop [pkg-VideoStation-synovideoindexd] stopped. [pkg-VideoStation-synovideometadatad] stopped. [pkg-VideoStation-synovpcd] stopped. [pkg-VideoStation-offlineconversiond] stopped. [pkg-VideoStation-synovideopreprocessd] stopped. 2021/07/13 11:41:03 stop VideoStation 3.0.1-2067 End start-stop-status stop ret=[0] 2021/07/13 11:41:21 start VideoStation 3.0.1-2067 Begin start-stop-status start Update video_file table where video id = 0 to test db existence UPDATE 0 Get constraint info to test summary_ukey existence test watch_status table in video_metadata db test uid type of table collection in video_metadata db test library table in video_metadata DB test video_file table in video_metadata DB test collection_sharing table in video_metadata DB test watch_status_view view in video_metadata DB test movie table has colum in video_metadata DB test if function lo_unlink_non_raise is defined Fail to start [pkg-VideoStation-synovideoindexd]. Fail to start [pkg-VideoStation-synovideometadatad]. Fail to start [pkg-VideoStation-synovpcd]. Fail to start [pkg-VideoStation-offlineconversiond]. [pkg-VideoStation-synovideopreprocessd] started. 2021/07/13 11:41:23 start VideoStation 3.0.1-2067 End start-stop-status start ret=[0] 2021/07/13 11:41:50 stop VideoStation 3.0.1-2067 Begin start-stop-status stop [pkg-VideoStation-synovideoindexd] stopped. [pkg-VideoStation-synovideometadatad] stopped. [pkg-VideoStation-synovpcd] stopped. [pkg-VideoStation-offlineconversiond] stopped. [pkg-VideoStation-synovideopreprocessd] stopped. 2021/07/13 11:41:50 stop VideoStation 3.0.1-2067 End start-stop-status stop ret=[0] 2021/07/13 11:42:22 start VideoStation 3.0.1-2067 Begin start-stop-status start Update video_file table where video id = 0 to test db existence UPDATE 0 Get constraint info to test summary_ukey existence test watch_status table in video_metadata db test uid type of table collection in video_metadata db test library table in video_metadata DB test video_file table in video_metadata DB test collection_sharing table in video_metadata DB test watch_status_view view in video_metadata DB test movie table has colum in video_metadata DB test if function lo_unlink_non_raise is defined Fail to start [pkg-VideoStation-synovideoindexd]. Fail to start [pkg-VideoStation-synovideometadatad]. Fail to start [pkg-VideoStation-synovpcd]. Fail to start [pkg-VideoStation-offlineconversiond]. [pkg-VideoStation-synovideopreprocessd] started. 2021/07/13 11:42:26 start VideoStation 3.0.1-2067 End start-stop-status start ret=[0]

Could this help?

Thanks for your effort ;)

lykane1337 commented 3 years ago

I got it running. Here is what I did.

Connecting to the NAS via SSH with "admin" user (some help here) Use the command sudo -i to switch to root user (same password as for "admin") Copy / paste the following commands:

Save VideoStation's ffmpeg

mv -n /var/packages/VideoStation/target/bin/ffmpeg /var/packages/VideoStation/target/bin/ffmpeg.orig

Injecting the script (last revision aka 12)

wget -O - https://gist.githubusercontent.com/BenjaminPoncet/bbef9edc1d0800528813e75c1669e57e/raw/ffmpeg-wrapper > /var/packages/VideoStation/target/bin/ffmpeg

Change ownership and mode of the script

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 VideoStation's libsynovte.so

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

Patch libsynovte.so to authorize DTS, EAC3 and TrueHD

sed -i -e 's/eac3/3cae/' -e 's/dts/std/' -e 's/truehd/dheurt/' /var/packages/VideoStation/target/lib/libsynovte.so

Coping files

mv /var/packages/CodecPack/target/bin/ffmpeg27  /var/packages/CodecPack/target/bin/ffmpeg27.orig
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/ffmpeg27
cp /var/packages/VideoStation/target/bin/ffmpeg /var/packages/CodecPack/target/bin/ffmpeg41

Restart VideoStation.

Thank you... Have a nice time!!!

AlexPresso commented 3 years ago

Hi, Sorry for the delay I had a lot of work these days. I'm glad you solved your issue. :) Thank you for sharing this, I'll update the script based on this.