Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox will not play video on Linux

  • 15 replies
  • 1 has this problem
  • Last reply by rhimb0h

more options

Firefox 129.0.2 (64-bit) Mozilla Firefox Snap for Ubuntu canonical-002 - 1.0

Running on kubuntu Linux 24.04, kernel version 6.8.0-41-generic (64-bit) KDE Plasma Version 5.27.11 Qt Version 5.15.13

I've posted a description of my problem on the kubuntu forums: https://www.kubuntuforums.net/forum/newbie-support/help-the-new-guy/681835-firefox-eating-up-a-lot-of-cpu

Here is a synopsis of my posts on that thread to distill the most noteworthy symptoms:

I have snap Firefox installed.

$ snap list Name Version Rev Tracking Publisher Notes bare 1.0 5 latest/stable canonical✓ base core22 20240731 1564 latest/stable canonical✓ base firefox 129.0.2-1 4793 latest/stable mozilla✓ - firmware-updater 0+git.5007558 127 latest/stable/… canonical✓ - gnome-42-2204 0+git.510a601 176 latest/stable/… canonical✓ - gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical✓ - snapd 2.63 21759 latest/stable canonical✓ snapd thunderbird 128.1.0esr-1 507 latest/stable/… canonical✓ - $

If I start firefox from the shell command line, it runs fine. It runs the shell script in /usr/bin/firefox, which ultimately executes /snap/bin/firefox. Clearly that shell script is doing some configuration that I don't understand.

If I​ hit Alt-space I see the menu in the referenced screen grab (see attached).

If I select the first entry, to run firefox from the command line, it has the same effect as starting /usr/bin/firefox from a bash shell; it works fine. However, if I select the third entry, firefox does not play any video; I've mostly tested with YouTube videos that have actual video and audio.

I'm not sure what gets executed when I select the third option from the Alt-space menu. It appears from doing a "ps -ef" that it's the same /snap/firefox/... executable. But I'm wondering why is this entry in the Alt-space menu and how does it get initialized or 'configured' to run.

Additionally, if I do start firefox from the entry with the firefox browser icon, and it fails to play video, I must then uninstall firefox using snap and then reinstall in order to get video playback to work. That is, after a failed start, simply exiting firefox and restarting it from the shell command line will not work; firefox will not play video correctly at all.

I also noticed that on my PC desktop, "snap list" lists firefox as "firefox 129.0.2-1 4793 latest/stable mozilla✓ -"

But on my old Lenova laptop running the same kubuntu version, "snap list" lists firefox as "firefox 129.0.2-1 4757 latest/stable mozilla✓ -"

​I'm up to date on both systems via "sudo apt update"' and "sudo apt upgrade"

Even more frustrating, today, for the first time, despite starting firefox from the command line, video still didn't play. I had to uninstall firefox and reinstall it.

Firefox 129.0.2 (64-bit) Mozilla Firefox Snap for Ubuntu canonical-002 - 1.0 Running on kubuntu Linux 24.04, kernel version 6.8.0-41-generic (64-bit) KDE Plasma Version 5.27.11 Qt Version 5.15.13 I've posted a description of my problem on the kubuntu forums: https://www.kubuntuforums.net/forum/newbie-support/help-the-new-guy/681835-firefox-eating-up-a-lot-of-cpu Here is a synopsis of my posts on that thread to distill the most noteworthy symptoms: I have snap Firefox installed. $ snap list Name Version Rev Tracking Publisher Notes bare 1.0 5 latest/stable canonical✓ base core22 20240731 1564 latest/stable canonical✓ base firefox 129.0.2-1 4793 latest/stable mozilla✓ - firmware-updater 0+git.5007558 127 latest/stable/… canonical✓ - gnome-42-2204 0+git.510a601 176 latest/stable/… canonical✓ - gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical✓ - snapd 2.63 21759 latest/stable canonical✓ snapd thunderbird 128.1.0esr-1 507 latest/stable/… canonical✓ - $ If I start firefox from the shell command line, it runs fine. It runs the shell script in /usr/bin/firefox, which ultimately executes /snap/bin/firefox. Clearly that shell script is doing some configuration that I don't understand. If I​ hit Alt-space I see the menu in the referenced screen grab (see attached). If I select the first entry, to run firefox from the command line, it has the same effect as starting /usr/bin/firefox from a bash shell; it works fine. However, if I select the third entry, firefox does not play any video; I've mostly tested with YouTube videos that have actual video and audio. I'm not sure what gets executed when I select the third option from the Alt-space menu. It appears from doing a "ps -ef" that it's the same /snap/firefox/... executable. But I'm wondering why is this entry in the Alt-space menu and how does it get initialized or 'configured' to run. Additionally, if I do start firefox from the entry with the firefox browser icon, and it fails to play video, I must then uninstall firefox using snap and then reinstall in order to get video playback to work. That is, after a failed start, simply exiting firefox and restarting it from the shell command line will not work; firefox will not play video correctly at all. I also noticed that on my PC desktop, "snap list" lists firefox as "firefox 129.0.2-1 4793 latest/stable mozilla✓ -" But on my old Lenova laptop running the same kubuntu version, "snap list" lists firefox as "firefox 129.0.2-1 4757 latest/stable mozilla✓ -" ​I'm up to date on both systems via "sudo apt update"' and "sudo apt upgrade" Even more frustrating, today, for the first time, despite starting firefox from the command line, video still didn't play. I had to uninstall firefox and reinstall it.
Attached screenshots

Chosen solution

You can try Firefox from the official Mozilla server if you currently use a version from the repositories of your Linux distribution to see if it behaves differently.

Read this answer in context 👍 2

All Replies (15)

more options

A couple packages that is not normally installed on a new Linux distro install is FFmpeg and libavcodec packages.

It is possible to play some Youtuibe videos without FFmpeg installed however you likely will not be able to play the live streams or recently uploaded videos on Youtube.

Helpful?

more options

No videos play (not live streams). I have not even tried live streams.

The outstanding issues as I see them are (summarizing my initial description of the problem):

  1. Different versions of firefox (firefox 129.0.2-1 4793 versus firefox 129.0.2-1 4757), I presume the 4793 and 4757 are build numbers, different actual binaries both marked as part of release 129.0.2-1)
  2. Same linux platform (and environment as far as I know -- no special packages installed on either) on my laptop and my desktop, but different behavior (or just related to the different binaries)
  3. Different behavior based on how I start firefox, as described in my initial comment.

Helpful?

more options

By the way, I do have FFmpeg installed (and libavcodec is a library that is part of it):

$ ffmpeg -version ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 13 (Ubuntu 13.2.0-23ubuntu3) configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared libavutil 58. 29.100 / 58. 29.100 libavcodec 60. 31.102 / 60. 31.102 libavformat 60. 16.100 / 60. 16.100 libavdevice 60. 3.100 / 60. 3.100 libavfilter 9. 12.100 / 9. 12.100 libswscale 7. 5.100 / 7. 5.100 libswresample 4. 12.100 / 4. 12.100 libpostproc 57. 3.100 / 57. 3.100 $ $ $ dpkg -l | grep libavcodec ii libavcodec60:amd64 7:6.1.1-3ubuntu5 amd64

         FFmpeg library with de/encoders for audio/video codecs - runtime files

$

Modified by rhimb0h

Helpful?

more options

Provide examples and links of videos not playing. Post a better screenshot showing the issue. How about trying another OS via live usb stick. Here's a screenshot of a few sites that work for me. see screenshot


Operating System: openSUSE Tumbleweed 20240823 KDE Plasma Version: 6.1.4 KDE Frameworks Version: 6.5.0 Qt Version: 6.7.2 Kernel Version: 6.10.5-1-default (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 5825U with Radeon Graphics Memory: 62.1 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: HP Product Name: HP ProBook 455 15.6 inch G9 Notebook PC

Modified by jonzn4SUSE

Helpful?

more options

No video plays if I start firefox 'the wrong way.'

And I do mean no video at all... not a single video on YouTube plays if firefox is started in 'the wrong way' meaning not from the command line directly.

In the attached screen grab of KRunner, if I start firefox by selecting the last entry in the KRunner window, namely "Application Web Browser" firefox will not play a single video.

Thereafter, I must uninstall firefox and re-install to get it to play any video.

On my laptop, running the same OS environment, packages, etc., firefox runs fine. The only difference that I can see is what I said previously, on the laptop there is version (build?) 4753 versus 4793 on the desktop PC.

I just ran "snap connections firefox" on both systems and the results were exactly the same.

I run firefox from the bash shell directly, and it executes (starts) /usr/bin/firefox (which is a shell script). I run bash from KRunner, and do this: $ command -v firefox /usr/bin/firefox $

But something must be different when executing the "Firefox Web Browser" from the KRunner dialog.

If I run firefox from the shell, it runs fine as previously said. But if I pin the firefox icon to the Task Manager while it's running, close firefox, and thereafter start it from the Task Manager, it fails to play video. The result (failure) is the same as starting "Firefox Web Browser" from the KRunner dialog.

Modified by rhimb0h

Helpful?

more options

That screenshot is of no use. It doesn't show what happens when you try to play a video. Try this video and post a screenshot. https://odysee.com/@drsambailey:c/pierre-chaillot-i'm-coming-out-no-virus:5

Helpful?

more options

Your video plays fine; I just tried it... because I am currently running firefox started from the bash command line.

I could start firefox 'the wrong way' and take a screen shot to show it not playing. What do you want to see in a screen shot that would help diagnose the problem?

Helpful?

more options

Chosen Solution

You can try Firefox from the official Mozilla server if you currently use a version from the repositories of your Linux distribution to see if it behaves differently.

Helpful?

more options

Thanks, @cor-el. For simplicity, I think I'll just try to install from the .tar.bz2 file from the page you referenced.

I also see here https://support.mozilla.org/en-US/kb/install-firefox-linux?_gl=1*94mipr*_ga*MTQyODY0NzQ3Mi4xNzI0NjU3MDA5*_ga_MQ7767QQQW*MTcyNDY5MTQzMi4xLjEuMTcyNDY5MjgzMC4wLjAuMA..#w_install-firefox-deb-package-for-debian-based-distributions

instructions to get the Mozilla firefox using apt. I think I'll skip this for now as I'm not sure I understand how Debian packages work on Ubuntu systems.

Helpful?

more options

OK... just installed and tested firefox Mozilla direct version and everything seems to be working. Thanks, @cor-el for the links and suggestion.

I will report a bug to Mozilla on the snap issue. Seems to me that there is a bug either with the binary or with the /usr/bin/firefox shell script that sets the configuration for the snap-installed firefox binary...

Helpful?

more options

Well... I spoke too soon. As of this morning, video does not play, and audio is stuttering.

Interestingly enough, video 'thumbnails' (not sure this is the right term) seem to play fine. For instance, on YouTube home page, the 'YouTube Shorts' videos in the thumbnails play fine when I hover the mouse over them.

Similarly, on various news websites (Yahoo home page, etc) the video thumbnails play fine. But if I click on any of these, the 'main' video is frozen, and the audio stutters, freezes, stutters, and so son....

I did notice that there is a difference in the binaries I have on the desktop PC (on which firefox does not work) and on the laptop (on which firefox works).

On the desktop pc: $ which firefox /usr/local/bin/firefox $ $ firefox --full-version Mozilla Firefox 129.0.2 20240819150008 20240819150008 $

On the laptop: $ which firefox /usr/bin/firefox $ $ firefox --full-version Mozilla Firefox 129.0.1 20240813010450 20240813010450 $

Modified by rhimb0h

Helpful?

more options

Perhaps I should grab version 129.0.1 to install on the desktop -- if I can find where to download that version. Could anyone tell me where to find it? I can't find it from the Mozilla site from where I downloaded the tar.gz file.

Helpful?

more options

All Firefox releases on the Mozilla server:

Helpful?

more options

Excellent!! Thanks again, @cor-el. I'm downloading 1.29.0.1 now....

Helpful?

more options

Well... same (bad) result with 1.29.0.1

So the problem must be with some configuration of my OS/packages/libraries.

At this point I think I'll just do a clean install of kubuntu.... getting really, really, tired of this....

Helpful?

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.