利用第三方FFMPEG解码器让群晖的Video Station完美支持DTS、EAC3、TrueHD

       群晖公司由于版权的原因,群晖自带的Video Station无法播放带有DTS、EAC3、TrueHD等编码格式的视频文件,严重影响使用效果。本文将利用第三方的ffmpeg替换VideoStation中自带的ffmpeg解码器,完美播放带有DTS、EAC3、TrueHD等编码格式的视频,实现对全视频格式的支持。

一、安装ffmpeg解码器

1、在群晖套件中心,设置,套件来源,新增,名称(任意写),位置:http://packages.synocommunity.com

 

 

        如果按照上述方法不能正常安装ffmpeg套件的,可以到这个地址:https://github.com/th0ma7/synology/tree/master/packages
        请根据自己的CPU架构下载对应的ffmpeg安装包,上传到群晖的套件中心安装,目前常见的构架有:

(1)DS918+的CPU架构是apollolake

(2)DS3617xs的CPU架构是broadwell

(3)DS3615xs的CPU架构是bromolow

        其他的CPU架构与之对应的版本可以在这查询:https://github.com/SynoCommunity/spksrc/wiki/Architecture-per-Synology-modelffmpeg

 

二、安装VideoStation
       在套件中心安装Video Station,本文安装的Video Station版本为2.4.7-1603。

 

 

三、我们先来测试一下没修改之前,用Video Station播放带有DTS和EAC3编码的视频文件,会是怎样的

这个是带EAC3编码的视频文件

 

 

用Video Station播放EAC3编码的界面提示

 

 

这个是带DTS编码的视频文件

 

 

用Video Station播放DTS编码的界面提示

 


四、用第三方的FFMEG代替

       进群晖的控制面板,终端机和SNMP,勾选启动SSH功能,并调整对应的端口号。然后到电脑上打开XSheell软件,用root用户以SSH的方式登录到群晖(还没开启root的,请自己去开启:https://wp.gxnas.com/?s=root),执行以下命令:

1、调整文件权限

sudo chmod +s /var/packages/ffmpeg/target/bin/ffmpeg
sudo chmod +s /var/packages/ffmpeg/target/bin/ffprobe
sudo chmod +s /var/packages/ffmpeg/target/bin/vainfo

 

2、备份原文件

sudo sed -i'-BACKUP' -e 's/eac3/ZAAP/' -e 's/dts/ZAP/' -e 's/truehd/ZAPZAP/' /var/packages/VideoStation/target/lib/libsynovte.so
sudo mv /var/packages/VideoStation/target/bin/ffmpeg /var/packages/VideoStation/target/bin/ffmpeg-BACKUP
sudo mv /var/packages/VideoStation/target/bin/ffprobe /var/packages/VideoStation/target/bin/ffprobe-BACKUP
sudo mv /var/packages/VideoStation/target/bin/vainfo /var/packages/VideoStation/target/bin/vainfo-BACKUP

 

3、更改/var/packages/VideoStation/target/ffmpeg为自定义脚本,调用第三方的ffmpeg解码器(命令已经更新,下图为之前的截图,命令有区别请忽略)

echo "H4sICJ6oBF8AA2ZmbXBlZy13cmFwcGVyAO1abXPbNhL+LP4KhKVf5Jimybn7ogwz8dlKqklcayzHnU7ioyASlFhTJEtQVFzH/70LAqT4KjltrzO9qWeSSMCziwfAg8Vine9eaDMv0GaYLiQpJqkp64YsSZYfzg/7j1KP2IsQycqhgxOCDl7u/aTuLdU9B+19P9i7HOxNDvpIRcojTWKCl57zxL7pMnr9GmnJMtJcdxmR+Ql4k564VyvCMS67BvRX5Ia+g9Q10o1T+EaJg2Sq/ffkSNG+aejix0T7WieLhMTLjEG8LPerJV8nNHFIHEs9RhnJR0dH6P3ow4fz70cfLhB8k6Xevef7SL0ZXl/CJOyF5zuR58jIeK05JNWCle+zwZIYRygbEU1G7xhaknBsL8zpKsBLglQs5ntAtZMj+hCEMOCDpWkH0G6vEqRCl3WAVBfpUynA9HcYGlMJqJmKIrG1X6bUVN5IfKqmrDy+GSBVf5KlfPKm/PbtpcImI4E0dFNLcaxF2L7Hc0LFWmkJjuckybTDWxjWqGFvPYeEkwQnXhg0LdT/nJ2//ziG5ZhT87AvSakdOsQ25fdXoMA1rChBnz4h5TukzhN0iu7uJCeUbEwJV40XSD3V60u9Hl14bgL/LsPUIybrhC/M7UvzUFY9OcMD8NUrsFissW0Tv2wnmhqWor1qTzOWZXMqeNeseXPV2C3bue12btVkiaOyUQGD9gLY8xz4ak6zI6XoGwUMxP4DwkWfAJ4KUiZiy4zuXqFkQWAhez2x+tPd2x3F4QwEmCI4IWGMVEp8YicW1w9FSkYGmhfh2iJBEnuEIiG3bAyLCzh0kUNcvPITM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QNuZ7QYKbtuA4qH/xVquvnjB3PplRVaQe3u/Ng5sPmwruH3g7dCuGkO+EJUyQ/liaXakzcJE5dkoXOYlC56ZiJcdS09YllLLTPLBZitXsNZPjX/d59l6OVHgyEpikW/RbuO09KatZC7dbkuJSNsrOEvAPZaDy1R7/CzDK/ezPFAe4aH7dPxZXuDYWeOYsOMTZJUi6E3iFTl+LtjFQPNYk3kJs1JqIwGe+cRhb2kIK+QLsVn8g/c0q6S+3KNTScpXf1MOoqtZ7EXFDvSkvPj59u3lePiOv4tZkU/OO86vLobn4sEsHOVd47Prs8vbCXSJpqzsCwOKCiS0Sr3MW+VtjfZf76jIon1JIr5g727YL38G/O8l7/6l5EFc+Ui3OQsgwTN6dFh9PPYLVmclLP5mwnmJ42Io6uM/Xp+N5Y5V0quefxxzz5k33eRThsPMZt0yHljz5dHz5RHYZ64QnCgpr6ebygtRnclK76xUBBSLaru0xl6y+Z7Jeh6TCOBhkJKYwmlALrufnBfyrqG/fhW2w6zWFkYkgJiJYBcS8PQN9h+DmNjhPICY44AbXvd4rvEoSLHvOSirYrnhKnDQGhSNQA82oZQx8oJolezyKOJo+TcY/LcXwx/y32B0RgdhM7m5uPp4gxqymiawoll18N87SEzblDcejYdoclsTn94UH+8wmmc3U6WOWlQJ90W3KsvWRtnaENZGp7XR0LQYidVaKqHAyNufpfVeWei9bUrv1aXOjsk/cv+byP120iV3o0vu+nPkntI/IvdO60LuhazFSLnci2NgpN9y+f0j9/97uV9dj9515RVNWf112qEJbHnLaoCmEkIBfnhYhqiV5ev3keonSD/NXyd/4hIycp272PxdWtEl7f7fC78BTGYfI90hAAA=" | base64 -d | gunzip > /var/packages/VideoStation/target/bin/ffmpeg

 

4、更新ffprobe vainfo

sudo ln -s /var/packages/ffmpeg/target/bin/ffprobe /var/packages/VideoStation/target/bin/ffprobe
sudo ln -s /var/packages/ffmpeg/target/bin/vainfo /var/packages/VideoStation/target/bin/vainfo

 

5、解除对EAC3、DTS、TrueHD的屏蔽

sudo sed -i'-BACKUP' -e 's/eac3/ZAAP/' -e 's/dts/ZAP/' -e 's/truehd/ZAPZAP/' /var/packages/VideoStation/target/lib/libsynovte.so

 

6、调整文件权限

sudo chmod +x /var/packages/VideoStation/target/bin/ffmpeg
sudo chmod +s /var/packages/VideoStation/target/bin/ffmpeg
sudo chown root:VideoStation /var/packages/VideoStation/target/bin/ffmpeg

 

 

五、接下来我们再用Video Station来播放刚才未能播放的文件做一下测试

1、DTS播放正常

 

2、EAC3播放正常

六、非常完美!

 


如果DSM7.X版本要解决同样的问题,请参考《利用第三方解码器FFMPEG让群晖DSM7.X版本的Video Station支持DTS视频编码和EAC3音频编码》。

点赞
  1. 猫吃豆腐说道:
    Google Chrome Windows 10
    操作提示 cp: cannot stat '/var/packages/CodecPack/target/bin/ffmpeg41': No such file or directory 求大佬解惑!!!
    1. 猫吃豆腐说道:
      Google Chrome Windows 10
      Ds3617sx版本7.142661
    2. 猫吃豆腐说道:
      Google Chrome Windows 10
      root@Th:~# mv -n /var/packages/VideoStation/target/bin/ffmpeg /var/packages/VideoStation/target/bin/ffmpeg.orig root@Th:~# root@Th:~# cp -n /var/packages/VideoStation/target/lib/libsynovte.so /var/packages/VideoStation/target/lib/libsynovte.so.orig root@Th:~# cp /var/packages/CodecPack/target/bin/ffmpeg41 /var/packages/CodecPack/target/bin/ffmpeg41.orig ecPack/target/bin/ffmpeg27.origcp: cannot stat '/var/packages/CodecPack/target/bin/ffmpeg41': No such file or directory root@Th:~# cp /var/packages/CodecPack/target/bin/ffmpeg33 /var/packages/CodecPack/target/bin/ffmpeg33.orig cp: cannot stat '/var/packages/CodecPack/target/bin/ffmpeg33': No such file or directory root@Th:~# cp /var/packages/CodecPack/target/bin/ffmpeg27 /var/packages/CodecPack/target/bin/ffmpeg27.orig cp: cannot stat '/var/packages/CodecPack/target/bin/ffmpeg27': No such file or directory
    3. 博主说道:
      Google Chrome Windows 10
      DSM7的教程不是这个,要看这个:https://wp.gxnas.com/11491.html
  2. 大头下雨不愁说道:
    Google Chrome Windows 10
    感谢楼主大大。 在这里走捷径了。。 小白已经成功上路。
    1. 博主说道:
      Google Chrome Windows 10
      不用客气
  3. EQun说道:
    Google Chrome Windows 10
    感谢博主,成功解决问题。
  4. xiongjiyuan说道:
    Google Chrome Windows 10
    非常感谢博主的教材,特意注册来评论一下,在执行第三步“3、更改/var/packages/VideoStation/target/ffmpeg为自定义脚本,调用第三方的ffmpeg解码器(命令已经更新,下图为之前的截图,命令有区别请忽略)”如果提示没有权限(permission denied),可以考虑改成: sudo bash -c "echo "H4sICJ6oBF8AA2ZmbXBlZy13cmFwcGVyAO1abXPbNhL+LP4KhKVf5Jimybn7ogwz8dlKqklcayzHnU7ioyASlFhTJEtQVFzH/70LAqT4KjltrzO9qWeSSMCziwfAg8Vine9eaDMv0GaYLiQpJqkp64YsSZYfzg/7j1KP2IsQycqhgxOCDl7u/aTuLdU9B+19P9i7HOxNDvpIRcojTWKCl57zxL7pMnr9GmnJMtJcdxmR+Ql4k564VyvCMS67BvRX5Ia+g9Q10o1T+EaJg2Sq/ffkSNG+aejix0T7WieLhMTLjEG8LPerJV8nNHFIHEs9RhnJR0dH6P3ow4fz70cfLhB8k6Xevef7SL0ZXl/CJOyF5zuR58jIeK05JNWCle+zwZIYRygbEU1G7xhaknBsL8zpKsBLglQs5ntAtZMj+hCEMOCDpWkH0G6vEqRCl3WAVBfpUynA9HcYGlMJqJmKIrG1X6bUVN5IfKqmrDy+GSBVf5KlfPKm/PbtpcImI4E0dFNLcaxF2L7Hc0LFWmkJjuckybTDWxjWqGFvPYeEkwQnXhg0LdT/nJ2//ziG5ZhT87AvSakdOsQ25fdXoMA1rChBnz4h5TukzhN0iu7uJCeUbEwJV40XSD3V60u9Hl14bgL/LsPUIybrhC/M7UvzUFY9OcMD8NUrsFissW0Tv2wnmhqWor1qTzOWZXMqeNeseXPV2C3bue12btVkiaOyUQGD9gLY8xz4ak6zI6XoGwUMxP4DwkWfAJ4KUiZiy4zuXqFkQWAhez2x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5l7YTz+JeGnmMFZA5ZX0qspDOlbQA7ouAOWB5EO2EZqxm8Fu6tIAwsePC4MTwtOnm1QNuZ7QYKbtuA4qH/xVquvnjB3PplRVaQe3u/Ng5sPmwruH3g7dCuGkO+EJUyQ/liaXakzcJE5dkoXOYlC56ZiJcdS09YllLLTPLBZitXsNZPjX/d59l6OVHgyEpikW/RbuO09KatZC7dbkuJSNsrOEvAPZaDy1R7/CzDK/ezPFAe4aH7dPxZXuDYWeOYsOMTZJUi6E3iFTl+LtjFQPNYk3kJs1JqIwGe+cRhb2kIK+QLsVn8g/c0q6S+3KNTScpXf1MOoqtZ7EXFDvSkvPj59u3lePiOv4tZkU/OO86vLobn4sEsHOVd47Prs8vbCXSJpqzsCwOKCiS0Sr3MW+VtjfZf76jIon1JIr5g727YL38G/O8l7/6l5EFc+Ui3OQsgwTN6dFh9PPYLVmclLP5mwnmJ42Io6uM/Xp+N5Y5V0quefxxzz5k33eRThsPMZt0yHljz5dHz5RHYZ64QnCgpr6ebygtRnclK76xUBBSLaru0xl6y+Z7Jeh6TCOBhkJKYwmlALrufnBfyrqG/fhW2w6zWFkYkgJiJYBcS8PQN9h+DmNjhPICY44AbXvd4rvEoSLHvOSirYrnhKnDQGhSNQA82oZQx8oJolezyKOJo+TcY/LcXwx/y32B0RgdhM7m5uPp4gxqymiawoll18N87SEzblDcejYdoclsTn94UH+8wmmc3U6WOWlQJ90W3KsvWRtnaENZGp7XR0LQYidVaKqHAyNufpfVeWei9bUrv1aXOjsk/cv+byP120iV3o0vu+nPkntI/IvdO60LuhazFSLnci2NgpN9y+f0j9/97uV9dj9515RVNWf112qEJbHnLaoCmEkIBfnhYhqiV5ev3keonSD/NXyd/4hIycp272PxdWtEl7f7fC78BTGYfI90hAAA=" | base64 -d | gunzip > /var/packages/VideoStation/target/bin/ffmpeg" 试试
    1. 博主说道:
      Google Chrome Windows 7
      好的,改天抽空测试看看
  5. 说道:
    Google Chrome Windows 10
    博主,你好。请问1621+,DSM7.0的系统套用这个文章能行吗?ffmpeg在第三方源里安装的。我尝试了一次好像没有效果,请博主有空能指教一下。谢谢。
    1. 博主说道:
      Google Chrome Windows 7
      由于使用环境限制,暂时没有在7.0的环境下测试哦。仅在6.2X下测试通过。
      1. 说道:
        Google Chrome Windows 7
        博主有时间能更新一下,让系统支持DSM7.0吗?请问第三方的ffmpeg如果能装应该就是支持我的机型的吧1621+?
  6. DerekLu说道:
    Google Chrome Mac OS X 10.15.7
    楼主抱歉,完全的技术小白,920+参照此教程,目前DS Video无论什么格式的video都播放不了了,不停地转圈,去除了硬解选项也没用。。。请问如何恢复备份的设置
    1. DerekLu说道:
      Google Chrome Mac OS X 10.15.7
      oh,重新安装DS Video就恢复了,可惜还是不能解决EAC和DTS的播放,,,
    2. 博主说道:
      Google Chrome Windows 7
      你操作步骤有错吧。DS920+的6.23版本,我亲自动手打过补丁,没问题的。
  7. cjytg说道:
    Sogou Explorer Windows 10
    求问大佬,DSM和video station一直在弹更新提醒,更新之后ffmpeg这些设置还有效么?
    1. cjytg说道:
      Sogou Explorer Windows 10
      以及修改刮削器的设置,谢谢!!
    2. 博主说道:
      Google Chrome Windows 10
      Video套件更新的话,这些文件会被恢复成系统默认的文件,补丁就失效了,需要重新打补丁。或者就不要升级video套件。

发表评论