Bug 1512041 - Unable to play MP3s with Firefox
Summary: Unable to play MP3s with Firefox
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-10 18:05 UTC by jaudet
Modified: 2020-11-24 20:06 UTC (History)
26 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-24 20:06:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Firefox developer console with error messages (230.39 KB, image/png)
2017-11-10 18:05 UTC, jaudet
no flags Details

Description jaudet 2017-11-10 18:05:40 UTC
Created attachment 1350614 [details]
Firefox developer console with error messages

Description of problem:
It's impossible to play MP3 files with Firefox on at least Fedora 26. This may also be true for other Fedora releases. If one attempts to do so, then the following message is logged to the developer console:

    HTTP "Content-Type" of "audio/mpeg" is not supported. Load of media resource [...] failed.
    Cannot play media. No decoders for requested formats: audio/mpeg

Version-Release number of selected component (if applicable):
54.0

How reproducible:
always

Steps to Reproduce:
1. Get Fedora 26 workstation edition, write the image to a USB drive, and boot from the USB drive.
2. Optionally, install and update Fedora, and reboot.
3. Open Firefox, and try to play back an MP3 file with it.

Actual results:
The file isn't played back.

Expected results:
The file is played back.

Additional info:
One could argue that this is a non-issue, as one can already play MP3 files with Totem/Rhythmbox/etc. I disagree: music streaming services may serve audio in MP3 format, and I've definitely gone to web pages that directly served MP3 files.

I can give two examples of web sites that break because of this issue. The first is bandcamp. Try going to a web page [this](https://gogopenguin.bandcamp.com/album/v20) this and playing back music. It will fail, and an error dialog will pop up containing the mssage "Unable to play audio. Your browser must support native playback of MP3 or you must have the Adobe Flash Player installed. For another example, try the [Subsonic demo website](http://demo.subsonic.org/index.view).

I've attached a screenshot showing the developer console on a broken website.

Comment 1 jaudet 2017-11-10 18:09:14 UTC
On Arch Linux, Firefox uses ffmpeg as a backend. Perhaps the issue here is that only the gstreamer backend is available out of the box, and Firefox doesn't know how to use it.

Comment 2 Dimitrios Apostolou 2017-12-01 02:05:30 UTC
I have reproduced this on Fedora 27. Firefox refuses to play music in bandcamp.com, and the site shows a message that my browser does not support MP3 playback.

I am successfully playing audio in bandcamp.com using Firefox on Ubuntu 16.04.

Comment 3 Martin Stransky 2017-12-01 07:36:07 UTC
Firefox needs ffmpeg-libs installed to play MP3, gstreamer backend is not supported. So you need to install this for Fedora to get mp3 playback working.

Comment 4 Dimitrios Apostolou 2017-12-02 00:47:40 UTC
Thanks Martin, can you point to some instructions?

There is no "ffmpeg-libs" package in Fedora 27. Additionally "dnf repoquery --suggests/--recommends firefox" shows nothing.

Comment 5 Martin Stransky 2017-12-04 07:51:38 UTC
AFAIK it's usually installed from https://rpmfusion.org/

Comment 6 Martin Stransky 2017-12-04 07:54:45 UTC
You can also check some of the article "What to install on Fedora..." like this one https://www.tecmint.com/things-to-do-after-fedora-26-installation/

Comment 7 Dimitrios Apostolou 2017-12-05 01:51:23 UTC
Thanks, I'm aware of RPM fusion as I'm a long time Fedora user.  I hadn't performed an installation from scratch for a long time, but I was under the impression that the MP3 patent problems have long been resolved. Thus I chose to avoid RPM fusion until I really needed it. And indeed my MP3 files play fine with the default XFCE media player (parole).

I'm very surprised that Firefox is silently broken without external repos. Besides MP3s I'm also experiencing some "gifv" files not playing, I'm guessing this is also because of the missing ffmpeg-libs.

I'm keen on helping resolving this situation. Where do I go from here? Maybe creating a new ticket is a good place to start?

Comment 8 Martin Stransky 2017-12-05 07:55:03 UTC
(In reply to Dimitrios Apostolou from comment #7)
> Thanks, I'm aware of RPM fusion as I'm a long time Fedora user.  I hadn't
> performed an installation from scratch for a long time, but I was under the
> impression that the MP3 patent problems have long been resolved. Thus I
> chose to avoid RPM fusion until I really needed it. And indeed my MP3 files
> play fine with the default XFCE media player (parole).
> 
> I'm very surprised that Firefox is silently broken without external repos.
> Besides MP3s I'm also experiencing some "gifv" files not playing, I'm
> guessing this is also because of the missing ffmpeg-libs.
> 
> I'm keen on helping resolving this situation. Where do I go from here? Maybe
> creating a new ticket is a good place to start?

Filling tickets do not help to anything. If you want to help you need to create a library with ffmpeg (libav) library interface which provides mp3 playback and can be bundled with Fedora.

Comment 9 jaudet 2017-12-05 16:37:37 UTC
> AFAIK it's usually installed from https://rpmfusion.org/

That can be done. I'd argue that any solution that involves RPM fusion is a usability nightmare, and to say that this issue is not a bug because RPM fusion is available does a disservice to users.

Comment 10 Adam Williamson 2017-12-05 17:07:05 UTC
Dimitrios: we now consider MP3 safe to ship in Fedora, yes. The problem with ffmpeg is that it contains a ton of *other* stuff which we *don't* consider safe to ship with Fedora.

We've always held back from shipping a 'neutered' ffmpeg in Fedora because we'd have to remove so much stuff from it it'd barely be ffmpeg any more, and it'd run the risk of people not understanding the situation and thinking just "Fedora has broken ffmpeg!" or something like that. gstreamer's modular design is much better here because we can ship whatever codecs we safely can in the official repos without conflicting with other efforts.

Martin, when you say "Firefox needs ffmpeg-libs installed to play MP3, gstreamer backend is not supported", can you unpack that a bit? Is this really not a situation we can do anything about, given the issues with ffmpeg not being modular?

Comment 11 Matthew Miller 2017-12-05 18:31:23 UTC
To add a little bit to Adam's last comment: if we had a drop-in compatible library which would _just_ provide mp3 (or possibly mp3 + other formats we can support), could that coexist with a broader third-party library, or would it be an inherent conflict?

Comment 12 Nick Coghlan 2017-12-06 01:24:35 UTC
Perhaps this bug report could be rephrased as "Fedora's Firefox doesn't integrate properly with gstreamer"?

According to http://forums.mozillazine.org/viewtopic.php?f=7&t=3003683, Firefox *used* to have a GStreamer backend, but it was removed as being redundant with the direct support for ffmpeg in the browser.

However, Fedora still has a use case where the gstreamer backend was *not* redundant, since Fedora doesn't ship ffmpeg by default.

If upstream won't accept the change to restore the gstreamer backend, then it would make sense for Fedora to carry it as a downstream Firefox patch (compensating for the decision to avoid shipping the full ffmpeg libraries)

Comment 13 Tomas Popela 2017-12-06 06:34:42 UTC
If Firefox is bundling their own ffmpeg (at least I got that impression), then just enable MP3 support there with some downstream patch as we've done in Chromium (it's bundling their own ffmpeg as well) - look at the config file changes in https://src.fedoraproject.org/cgit/rpms/chromium.git/tree/chromium-62.0.3202.62-enable-mp3.patch

Comment 14 Martin Stransky 2017-12-06 08:45:51 UTC
(In reply to Tomas Popela from comment #13)
> If Firefox is bundling their own ffmpeg (at least I got that impression),
> then just enable MP3 support there with some downstream patch as we've done
> in Chromium (it's bundling their own ffmpeg as well) - look at the config
> file changes in
> https://src.fedoraproject.org/cgit/rpms/chromium.git/tree/chromium-62.0.3202.
> 62-enable-mp3.patch

Thanks Tomas. Unfortunately Firefox does not bundle it own ffmpeg. It only loads the ffmpeg library if it's available on system. 

I think we can't ship original ffmpeg on Fedora, but can provide a system library with ffmpeg API/ABI *interface* which will provide the MP3 playback.

I also wonder how it's possible that chromium bundles ffmpeg on Fedora?

Comment 15 Tomas Popela 2017-12-06 08:54:06 UTC
(In reply to Martin Stransky from comment #14)
> Thanks Tomas. Unfortunately Firefox does not bundle it own ffmpeg. It only
> loads the ffmpeg library if it's available on system. 

ah, ok.

> I also wonder how it's possible that chromium bundles ffmpeg on Fedora?

Because we are stripping all the patent encumbered sources from it - see 

https://src.fedoraproject.org/rpms/chromium/blob/master/f/get_free_ffmpeg_source_files.py

and

https://src.fedoraproject.org/rpms/chromium/blob/master/f/clean_ffmpeg.sh

But these scripts only work in Chromium's ffmpeg as they use Chromium's build files.

Comment 16 Martin Stransky 2017-12-06 09:07:55 UTC
(In reply to Tomas Popela from comment #15)
> (In reply to Martin Stransky from comment #14)
> > Thanks Tomas. Unfortunately Firefox does not bundle it own ffmpeg. It only
> > loads the ffmpeg library if it's available on system. 
> 
> ah, ok.
> 
> > I also wonder how it's possible that chromium bundles ffmpeg on Fedora?
> 
> Because we are stripping all the patent encumbered sources from it - see 
> 
> https://src.fedoraproject.org/rpms/chromium/blob/master/f/
> get_free_ffmpeg_source_files.py
> 
> and
> 
> https://src.fedoraproject.org/rpms/chromium/blob/master/f/clean_ffmpeg.sh
> 
> But these scripts only work in Chromium's ffmpeg as they use Chromium's
> build files.

Hm, would be great to have that applied to a general ffmpeg library so it can be shipped as a system ffmpeg library at Fedora then. That may be a good project for intern for instance.

Comment 17 Dimitrios Apostolou 2017-12-10 08:18:05 UTC
IMHO it is OK to depend on a package from RPMFusion repo. My main complaint is that this is hidden, but Firefox malfunctions without it.

Alternative approaches for resolving this might be:

* printing an error message in the console whenever a codec can't be found
* showing a pop-up dialog whenever a codec can't be found, like gstreamer apps do
* adding a weak dependency (hint) to the package; is it allowed for "whatsuggests" dependencies to belong to different repos?
* or as a last resort, documenting that default firefox package lacks this functionality.

Comment 18 Matthew Miller 2017-12-10 14:32:28 UTC
> IMHO it is OK to depend on a package from RPMFusion repo.

Unfortunately, this is not a matter of opinion. We can't do this.

Comment 19 Vít Ondruch 2018-02-26 11:31:12 UTC
Just FTR, I have installed ffmpeg-libs and I can't play mp3 in FF. So not really sure if that is possible on Fedora at all.

$ rpm -q ffmpeg-libs 
ffmpeg-libs-3.5-0.3.20180211git.fc28.x86_64

$ rpm -q firefox
firefox-58.0.2-1.fc28.x86_64

Comment 20 Martin Stransky 2018-02-27 13:12:55 UTC
Hm, works for me with ffmpeg-libs-3.3.6-1.fc27.x86_64. Maybe a rawhide issue?

Comment 21 Heiko Adams 2018-03-06 18:33:19 UTC
This issue also exists on Fedora 28:
$  rpm -q firefox ffmpeg ffmpeg-libs
firefox-58.0.2-1.fc28.x86_64
ffmpeg-3.5-0.5.20180211git.fc28.x86_64
ffmpeg-libs-3.5-0.5.20180211git.fc28.x86_64

Comment 22 Josh Cogliati 2018-03-08 13:01:20 UTC
Now that the last US MPEGLA patents for MPEG-2 have expired:
http://www.mpegla.com/main/programs/M2/Pages/PatentList.aspx
it might be worth considering making a ffmpeg version again. ffmpeg still would need to have things removed, but the remaining bits might be fairly useful.

Comment 23 Vít Ondruch 2018-03-20 12:33:27 UTC
This appears to be fixed for me by:

~~~
$ rpm -q firefox 
firefox-59.0.1-1.fc29.x86_64

$ rpm -q compat-ffmpeg28
compat-ffmpeg28-2.8.14-1.fc28.x86_64
~~~

Not sure what was the real issue :/

Comment 24 Josh Cogliati 2018-03-21 01:47:21 UTC
The problem is that firefox is in Fedora, but compat-ffmpeg28 is not.
And compat-ffmpeg28 is probably not going to be added as is because it supports RealMedia.
https://fedoraproject.org/wiki/Forbidden_items?rd=ForbiddenItems#Real_Media_Player
https://github.com/leigh123linux/compat-ffmpeg28/blob/master/compat-ffmpeg28.spec

Comment 25 Fedora End Of Life 2018-05-03 08:13:14 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 26 Marius Ghita 2018-05-23 20:06:52 UTC
(In reply to Josh Cogliati from comment #24)
> The problem is that firefox is in Fedora, but compat-ffmpeg28 is not.
> And compat-ffmpeg28 is probably not going to be added as is because it
> supports RealMedia.
> https://fedoraproject.org/wiki/
> Forbidden_items?rd=ForbiddenItems#Real_Media_Player
> https://github.com/leigh123linux/compat-ffmpeg28/blob/master/compat-ffmpeg28.
> spec

Is it worth a try to create a separate package compat-ffmpeg28-"free"/"patentless" :) that does what compat-ffmpeg28 provides but without the RealMedia support?

Also the current compat-ffmpeg28 seems to be GPLv3+ licensed, doesn't that mean that there shouldn't be any patent issues? (not really familiar with patent clauses in GPLv3+ license)

License      : GPLv3+
Description  : FFmpeg is a complete and free Internet live audio and video
             : broadcasting solution for Linux/Unix. It also includes a digital
             : VCR. It can encode in real time in many formats including MPEG1
             : audio and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and
             : flash.

Or might this just be a licensing issue with compat-ffmpeg28?

Comment 27 Randy Barlow 2018-05-24 14:34:11 UTC
ffmpeg does not own the patents in question, so the GPLv3 patent clauses do not apply to those patents. IANAL, etc.

Comment 28 Fedora End Of Life 2018-05-29 11:39:49 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 29 Josh Cogliati 2018-06-04 02:09:59 UTC
This needs to be reopened, because it is still in firefox-60.0.1-5.fc28.x86_64

Comment 30 Jan Kurik 2018-08-14 11:08:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 31 Gwendal 2018-11-26 09:18:36 UTC
On a fresh Fedora 29 install, the problem is indeed still present.

Comment 32 robin zlatic 2019-05-08 16:39:11 UTC
can confirm: fedora30, firefox 66.0.4, the issue is still here.

Comment 33 Ben Cotton 2019-10-31 18:43:03 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 34 Dan Scott 2019-11-03 18:17:41 UTC
Can confirm: Fedora 31, Firefox 70.0, the issue is still there. Installing compat-ffmpeg28 from RPMFusion was necessary to access the audio/video content from Brightspace, an online course provider.

Comment 35 Jan Horak 2019-11-05 09:53:08 UTC
Looks like this could help in the future: https://teams.fedoraproject.org/project/silverblue/task/123

Comment 36 Adam Chasen 2019-11-06 16:38:46 UTC
Firefox was able to play mp3 audio after installing 'mplayer' from fusion, I believe the dependency 'ffmpeg-libs-4.2.1-2.fc31.x86_64' resolved this issue for me.

Comment 37 Youri Wijnands 2019-12-04 09:11:05 UTC
Today Firefox 71 was released with "Native MP3 decoding on Windows, Linux, and macOS".

I can't test it right now, but I believe it will resolve this bug.

Comment 38 Yury C. 2019-12-05 06:24:40 UTC
Tested on Centos7 and its works now, but on windows10 bug is still alive :(

Comment 39 Ben Cotton 2020-11-03 14:59:30 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 40 Ben Cotton 2020-11-24 20:06:52 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.