Firefox无法播放mp4格式的视频(Fedora)

最近又开始用起来Fedora了,昨天发现Firefox没法看视频:

console提示如下:

HTTP “Content-Type” of “video/mp4” is not supported. Load of media resource https://example.com/incorrect_feedback.mp4 failed.
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media.

尝试了下fedora-cisco-openh264.repo提供的mozilla-openh264,还是无法播放。

看了下网上的说明,mozilla-openh264这个plugin,是为了在WebRTC会话中解码H.264的。

而网上所说的,安装gstreamer系列的,那是因为Firefox旧版本是使用gstreamer来解码的;新版的Firefox使用了ffmpeg来解码视频。

所以只需要安装compat-ffmpeg28就行了:

sudo dnf install compat-ffmpeg28

相关链接:

环境:Fedora 29,Firefox 66.0.2

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.