6

I have Ubuntu 18.04.3 LTS installed on by Dell with firefox 68.0.2 (64-bit). ubuntu-restricted-extras is installed and several option in the about:config are enabled for mp4. A few days ago MP4 did work on firefox. After some updated from Ubuntu, it stopped working. I reinstalled ubuntu-restricted-extras abd firefox (options about:config enabled after reinstall).

Also note the VLC is installed and can play MP4 files.

https://html5test.com/ report for video codecs:

  • MP4 with H.264 support: No
  • MP4 with H.265 support: No
  • TS with H.264 support: No
  • TS with H.265 support: No
  • WebM with VP8 support: Yes
  • WebM with VP9 support: Yes

Does anyone know how to fix this, or know how to let firefox log why it can't play mp4 (and where to find those logs).

David
  • 71
  • 1
    Check how to install H.264 for possible solution. – Michal Przybylowicz Sep 03 '19 at 09:58
  • Followed all those steps but firefox is still unable to play mp4. Also VLC can play an mp4 (H264 MPEG-4) video. So I think is something with firefox (but correct if I'm wrong). – David Sep 03 '19 at 16:23
  • It would be interesting to see how Chromium on your system performed with the same test? If Chromium is ok I suspect that you need to install the stock FFmpeg from the Ubuntu repositories... – andrew.46 Sep 04 '19 at 01:37
  • Chromium can play MP4 with H.264. However, when I run apt install ffmpeg (as sudo), it report that it has the newest version installed. Am I installing the correct package, or has the stock ffmpeg another name? – David Sep 04 '19 at 09:16

4 Answers4

2

For ubuntu 20.04, run:

apt install libavcodec58

IvanM
  • 191
  • 4
    Hi there, can you please include an explanation of why this works in your answer? Just giving people commands to run has two problems, firstly the original poster won't (and shouldn't) have confidence just running a command because someone told them to and secondly other people with similar problems won't understand the issue and be able to learn from your answer. – Jeremy Oct 15 '21 at 09:22
  • 1
    This did not work. – Cor Blufon Jan 24 '22 at 16:33
1

After a while resting it, I decided to try again. First post says again to install ffmpeg package. Instead of trying installing it by apt, I tried ffmpeg -version. This showed me an error that libva.so.1 was not found. libva.so.2 was available. Making a symbolic link named libva.so.1 (to libva.so) and doing this for couple other libraries worked for me.

David
  • 71
0

This was the issue that came up when I was looking for solutions to why firefox was not playing mp4s.

@michals comment on the question above led me to the solution I needed: https://askubuntu.com/a/1072894/363742

dannypaz
  • 101
0

Firefox and other browsers use ffmpeg to play videos. The stock ffmpeg cannot play h264 content. I had to recompile ffmpeg with h264 capability. I got the sources for the same versions already installed and enabled shared libraries. Once all the libraries were upgraded, all videos played fine.

Alton
  • 1