如何在Raspberry Pi 4b+使用Netflix, Disney Plus, HULU, spotify等流媒体,简单有效

操作

在树莓派的终端输入如下命令即可

curl -fsSL https://pi.vpetkov.net -o ventz-media-pi
sh ventz-media-pi
sudo reboot

如图
如何在Raspberry Pi 4b+使用Netflix, Disney Plus, HULU, spotify等流媒体,简单有效_第1张图片

在树莓派的界面,多了一个browser media edition,点击browser media edition,然后就可以正常打开这些流媒体播放器了。

原理

作者在他的这篇博客提到,这些流媒体用到了WideVine这个数字产品专利插件(又称为DRM)保护他们的网站,而树莓派安装的Chromium浏览器并不能支持DRM。作者的思路是从ChromeOS获取支持WideVine的插件,然后插入到Chromium浏览器下。

下面是ventz-media-pi文件的主要内容


echo " Downloading latest extracted version of Widevine..."
# 作者提供了从ChromeOS源文件拿出来的libwidevinecdm插件
wget -q --no-check-certificate https://pi.vpetkov.net/libwidevinecdm.so 
wget -q --no-check-certificate https://pi.vpetkov.net/manifest.json
chmod 755 libwidevinecdm.so && chmod 644 manifest.json
mkdir -p ${HOME}/.config/chromium-browser/WidevineCdm
echo '{"Path":"/opt/WidevineCdm"}' > ${HOME}/.config/chromium-browser/WidevineCdm/latest-component-updated-widevine-cdm
# 把libwidevinecdm.so和manifest.json移到了/opt/WidevineCdm文件及其子文件下
sudo mkdir -p /opt/WidevineCdm/_platform_specific/linux_arm && sudo mv -f manifest.json /opt/WidevineCdm && sudo mv -f libwidevinecdm.so /opt/WidevineCdm/_platform_specific/linux_arm
echo "✅ Widevin Setup Successfully"
echo " Downloading Chromium \"Media\" Launcher (always using your system's latest default Chromium browser)"
# 加了个chromium-media-browser的桌面
wget -q --no-check-certificate https://pi.vpetkov.net/chromium-media-browser.desktop
sudo mv -f chromium-media-browser.desktop /usr/share/applications
echo "✅ Chromium \"Media\" Launcher Setup Successfully"

echo "✂️  Fix for Screen Tearing"
if [ -e /etc/xdg/autostart/xcompmgr.desktop ]; then
    # backup - in case you want to put back the crappy refresh rate!
    sudo mv /etc/xdg/autostart/xcompmgr.desktop /root/backup.xcompmgr.desktop;
    sudo rm -f /etc/xdg/autostart/xcompmgr.desktop
fi

参考
https://blog.vpetkov.net/2019/07/12/netflix-and-spotify-on-a-raspberry-pi-4-with-latest-default-chromium/
https://www.youtube.com/watch?v=wwCVq0xncuU

你可能感兴趣的:(树莓派,linux)