TIPS:一般执行完1 就可以了
- 首先安装必要的媒体编解码器和插件:
sudo apt update
sudo apt install -y ubuntu-restricted-extras
sudo apt install -y ffmpeg
sudo apt install -y libavcodec-extra
sudo apt install -y gstreamer1.0-libav gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad
- 安装 Firefox 的媒体插件:
sudo apt install -y firefox-plugin-vlc
sudo apt install -y vlc browser-plugin-vlc
- 检查 DRM 内容支持:
- 打开 Firefox
- 在地址栏输入:
about:preferences
- 找到 “常规” 或 “General” 部分
- 滚动到 “Digital Rights Management (DRM) Content”
- 确保 “Play DRM-controlled content” 选项已启用
- 清除 Firefox 缓存:
- 在地址栏输入:
about:preferences#privacy
- 点击 “Clear Data”
- 选择 “Cached Web Content”
- 点击 “Clear”
- 更新 Firefox:
sudo apt update
sudo apt upgrade firefox
- 如果问题仍然存在,可以重置 Firefox:
mv ~/.mozilla ~/.mozilla.backup
firefox
- 检查 HTML5 支持:
- 在 Firefox 地址栏输入:
about:support
- 查找 “Graphics” 部分,检查硬件加速是否启用
- 如果视频播放时出现黑屏:
firefox about:config
- 安装额外的多媒体支持:
sudo apt install -y \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-alsa \
gstreamer1.0-pulseaudio
- 如果是特定网站的视频问题:
- 检查该网站是否需要特定插件
- 尝试在隐私窗口中打开
- 检查网站是否支持您的地区访问
- 检查系统声音设置:
sudo apt install pavucontrol
pavucontrol
- 如果以上都不能解决问题:
sudo apt purge firefox
sudo apt autoremove
sudo apt install firefox