The official Firefox for Linux fails to parse MP4 videos in HTML5 using system installed ffmpeg
Categories
(Core :: Audio/Video: Playback, defect, P1)
Tracking
()
People
(Reporter: aros, Unassigned)
References
Details
Attachments
(1 file)
331.36 KB,
image/png
|
Details |
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Comment 3•6 years ago
|
||
Reporter | ||
Comment 4•6 years ago
|
||
Updated•6 years ago
|
Reporter | ||
Comment 5•6 years ago
|
||
Needless to say Firefox 68 [beta 4] is affected as well.
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 6•6 years ago
|
||
Tried setting media.mediasource.experimental.enabled to true with no success.
Reporter | ||
Comment 7•6 years ago
|
||
And here's ffmpeg being found and loaded:
[pid 21285] openat(AT_FDCWD, "/opt/firefox/libmozavutil.so", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/opt/firefox/libmozavcodec.so", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/usr/local/lib64/libavcodec.so.58", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/usr/local/lib64/libswresample.so.3", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/usr/local/lib64/libavutil.so.56", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libfdk-aac.so.1", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libmp3lame.so.0", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libopenjp2.so.7", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libopus.so.0", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libspeex.so.1", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/usr/local/lib64/libx264.so.152", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/usr/local/lib64/libx265.so.169", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libxvidcore.so.4", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libva.so.2", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libva-drm.so.2", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libva-x11.so.2", O_RDONLY|O_CLOEXEC) = 61
[pid 21285] openat(AT_FDCWD, "/lib64/libvdpau.so.1", O_RDONLY|O_CLOEXEC) = 61
Reporter | ||
Comment 8•6 years ago
|
||
And also YouTube says AV1 is not supported here:
https://www.youtube.com/testtube
"AV1 decoding is not available on this browser yet."
In console I see this message: The video on this page can’t be played. Your system may not have the required video codecs for: video/mp4; codecs="av01.0.05M.08"
Reporter | ||
Comment 9•6 years ago
|
||
Firefox 69 beta 4: no changes.
Does anyone in Mozilla org even care? Is there anyone who's responsible for FFmpeg integration?
This bug report has zero activity, nothing has been offered as a workaround, no information has been requested.
Reporter | ||
Comment 10•6 years ago
|
||
I'm now running Fedora 30 + FFMpeg 4.1.4 ( https://ffmpeg.org/releases/ffmpeg-4.1.4.tar.xz installed to /usr/local/lib64 ) + Firefox ( https://ftp.mozilla.org/pub/firefox/releases/69.0b3/linux-x86_64/en-US/firefox-69.0b3.tar.bz2 )
$ ldd which mpv
| grep libav
libavcodec.so.58 => /usr/local/lib64/libavcodec.so.58 (0x00007ff4bdf20000)
libavdevice.so.58 => /usr/local/lib64/libavdevice.so.58 (0x00007ff4bdb5a000)
libavutil.so.56 => /usr/local/lib64/libavutil.so.56 (0x00007ff4bdae6000)
libavformat.so.58 => /usr/local/lib64/libavformat.so.58 (0x00007ff4bd89b000)
libavfilter.so.7 => /usr/local/lib64/libavfilter.so.7 (0x00007ff4bd517000)
Comment 11•6 years ago
|
||
The shipped libmozavcodec only supports VP9, VP8 and Flac
We will not support replacing shipped libmozav* with a custom one no.
Reporter | ||
Comment 12•6 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #11)
The shipped libmozavcodec only supports VP9, VP8 and Flac
We will not support replacing shipped libmozav* with a custom one no.
I has long stopped replacing these libraries but I was told that Firefox can use system installed ffmpeg libraries which it does in my case however only when trying to open files directly via File -> Open.
Firefox is unable to play anything from the web using the MP4 container format.
This bug report can be reproduced in under a few minutes.
I wonder why you're so uncooperative.
Steps to reproduce
- Install Fedora 30
- Compile ffmpeg with
./configure --disable-static --enable-nonfree --enable-avfilter \
--enable-shared --enable-gpl --enable-postproc --enable-pthread \
--enable-version3 --libdir=/usr/local/lib64 --enable-lto --enable-pic
-
Create
/etc/ld.so.conf.d/local-x64.conf
with
/usr/local/lib64 -
Run
sudo ldconfig
-
Download Firefox and run it.
That's it.
Reporter | ||
Comment 13•6 years ago
|
||
And why on Earth have you closed it?
Reporter | ||
Comment 14•6 years ago
|
||
2.1 I've forgotten about make install
of course.
Reporter | ||
Comment 15•6 years ago
|
||
If you are so lazy to do that on your own I can publish a VM image for you to play with. It'll be a huge download though, something like a 1.5GB or so.
Comment 16•6 years ago
|
||
If you start with the environment variable MOZ_LOG=PlatformDecoderModule:5
It will show why it's not loading.
Reporter | ||
Comment 17•6 years ago
|
||
$ MOZ_LOG=PlatformDecoderModule:5 firefox
[Child 2126: Main Thread]: D/PlatformDecoderModule H264/AAC codecs unsupported without [
[Child 2126: Main Thread]: D/PlatformDecoderModule libavcodec.so.58
[Child 2126: Main Thread]: D/PlatformDecoderModule , libavcodec-ffmpeg.so.58
[Child 2126: Main Thread]: D/PlatformDecoderModule , libavcodec-ffmpeg.so.57
[Child 2126: Main Thread]: D/PlatformDecoderModule , libavcodec-ffmpeg.so.56
[Child 2126: Main Thread]: D/PlatformDecoderModule , libavcodec.so.57
[Child 2126: Main Thread]: D/PlatformDecoderModule , libavcodec.so.56
[Child 2126: Main Thread]: D/PlatformDecoderModule , libavcodec.so.55
[Child 2126: Main Thread]: D/PlatformDecoderModule , libavcodec.so.54
[Child 2126: Main Thread]: D/PlatformDecoderModule , libavcodec.so.53
[Child 2126: Main Thread]: D/PlatformDecoderModule ]
[Child 2126: Main Thread]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 2126: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
Reporter | ||
Comment 18•6 years ago
|
||
This what happens if I open an MP4/AVC file via Firefox File -> Open menu:
Parent 5744, Gecko_IOThread] WARNING: pipe error (124): Connection reset by peer: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 358
[Child 7079: Main Thread]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 7079: Main Thread]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 7079: Main Thread]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 7079: Main Thread]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 7079: Main Thread]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 7079: MediaPlayback #1]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 7079: MediaPlayback #1]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 7079: MediaPlayback #1]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 7079: MediaPlayback #1]: D/PlatformDecoderModule Sandbox decoder rejects requested type
[Child 7079: MediaPDecoder #1]: D/PlatformDecoderModule Initialising FFmpeg decoder.
[Child 7079: MediaPDecoder #2]: D/PlatformDecoderModule Initialising FFmpeg decoder.
[Child 7079: MediaPDecoder #1]: D/PlatformDecoderModule FFmpeg init successful.
[Child 7079: MediaPDecoder #1]: D/PlatformDecoderModule AudioTrimmer[0x7f50cc6c4920] ::operator(): sample[-42666,-21333] no trimming information
[Child 7079: MediaPDecoder #1]: D/PlatformDecoderModule AudioTrimmer[0x7f50cc6c4920] ::HandleDecodedResult: sample[-42666,-21333] (decoded[-42666,-21333] no trimming needed
[h264 @ 0x7f50cc551000] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f50cc551000] nal_unit_type: 8(PPS), nal_ref_idc: 3
[Child 7079: MediaPDecoder #2]: D/PlatformDecoderModule FFmpeg init successful.
[h264 @ 0x7f50cc551000] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x7f50cc551000] nal_unit_type: 5(IDR), nal_ref_idc: 3
[Child 7079: MediaPDecoder #1]: D/PlatformDecoderModule Choosing FFmpeg pixel format for video decoding.
[Child 7079: MediaPDecoder #1]: D/PlatformDecoderModule Requesting pixel format YUV420P.
[h264 @ 0x7f50cc551000] Format yuv420p chosen by get_format().
[h264 @ 0x7f50cc551000] Reinit context to 432x240, pix_fmt: yuv420p
[h264 @ 0x7f50cc551000] no picture
[h264 @ 0x7f50cc552000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[h264 @ 0x7f50cc551000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[Child 7079: MediaPDecoder #2]: D/PlatformDecoderModule Got one frame output with pts=0 dts=33366 duration=33367 opaque=-9223372036854775808
[Child 7079: MediaPDecoder #1]: D/PlatformDecoderModule AudioTrimmer[0x7f50cc6c4920] ::operator(): sample[-21333,0] no trimming information
[Child 7079: MediaPDecoder #2]: D/PlatformDecoderModule AudioTrimmer[0x7f50cc6c4920] ::HandleDecodedResult: sample[-21333,0] (decoded[-21333,0] no trimming needed
So, I'm gonna ask for the 4th time: why does Firefox open and plays locally saved files but cannot open anything on the web?
Reporter | ||
Comment 19•6 years ago
|
||
Looks like you haven't spent a single minute trying to read and understand this bug report.
Again,
Firefox cannot play media files (MP4/AVC/AAC) from the web.
Firefox can play the same files after you download them and open them via File -> Open menu.
Reporter | ||
Comment 20•6 years ago
|
||
And even though it plays locally saved files, there are still nine errors being logged before the playback starts.
I haven't read the code, and I'm not a C++ programmer but it looks like the FFmpeg initialization routine is simply broken - it sometimes magically works.
Reporter | ||
Comment 21•6 years ago
|
||
Comment 22•6 years ago
|
||
Berating people isn't helping.
Start firefox with the following env variable set: MOZ_DISABLE_CONTENT_SANDBOX=1
Reporter | ||
Comment 23•6 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #22)
Berating people isn't helping.
Start firefox with the following env variable set: MOZ_DISABLE_CONTENT_SANDBOX=1
This option has fixed the issue. Is there a less dangerous workaround?
Reporter | ||
Comment 24•6 years ago
|
||
I've found another workaround: security.sandbox.content.read_path_whitelist=/usr/local/lib64/
(For some reasons security.sandbox.content.level=3
didn't work for me).
Comment 25•6 years ago
|
||
use official ffmpeg package, place the lib in the default lib folders, modify security.sandbox.content.read_path_whitelist pref
Reporter | ||
Comment 26•6 years ago
|
||
I've tried copying the libav* libraries to /usr/lib64 and also to Firefox's installation folder with no success but it might be because in my case ffmpeg depends on even more libraries installed to /usr/local/lib64, so, if I get you right, everything must be installed in /usr/lib64.
The official Fedora's ffmpeg package is all but useless (doesn't support AVC/AAC) and I'm not willing the one provided by RPMFusion. Also they both depend on a lot of extra libraries which I'm not willing to install, that's why I'm using my own optimized build.
I still believe Firefox could be allowed to open shared libraries from /usr/local/lib and /usr/local/lib64 but I guess that would require an extra bug report.
Description
•