LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-01-2022, 09:26 AM   #1
Swaggajackin
Member
 
Registered: Jan 2022
Posts: 55

Rep: Reputation: 22
[SOLVED] Firefox not playing H264 video


Hello, I have both Firefox [91.5.1esr (64-bit)] from Slackware-current CD and the nightly build [98.0a1 (2022-02-01) (64-bit)] installed on Slackware current 5.15.18. However I am having issues getting hardware acceleration working on sites like Twitch for either of them. Hardware acceleration works perfectly fine with Youtube, but anything that uses x264 video will fail and Firefox says it doesn't have the required codec. I did not install the Slackware-current FFMpeg package and instead I installed the latest build of FFMpeg with x264 and x265 building it myself, and verified it works correctly using MPV and MPlayer.

My FFMpeg build outputs:

Code:
ffmpeg version N-105441-g61cbfdc0a2 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (GCC)
  configuration: --enable-nonfree --enable-nvenc --enable-libx264 --enable-gpl --enable-cuda --enable-cuvid --enable-cuda-nvcc --enable-libx265 --disable-static --enable-shared --enable-libfdk-aac
  libavutil      57. 19.100 / 57. 19.100
  libavcodec     59. 20.100 / 59. 20.100
  libavformat    59. 17.101 / 59. 17.101
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 26.101 /  8. 26.101
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
ldconfig outputs:

Code:
ldconfig -p | grep libavcodec
        libavcodec.so.59 (libc6,x86-64) => /usr/local/lib/libavcodec.so.59
        libavcodec.so (libc6,x86-64) => /usr/local/lib/libavcodec.so
When loading a Twitch channel and looking at the Firefox console, it outputs this error:

Code:
The video on this page can’t be played. Your system may not have the required video codecs for: video/mp4;codecs="vp09.00.10.08", video/mp4;codecs="avc1.64002A mp4a.40.2", video/mp4;codecs="avc1.4D401F mp4a.40.2", video/mp4;codecs="avc1.4D401F mp4a.40.2", video/mp4;codecs="avc1.4D401F mp4a.40.2", video/mp4;codecs="avc1.4D401F mp4a.40.2" www.twitch.tv
I've verifed X264 is the issue by installed the x264ify Firefox extension then trying to watch Youtube using it, the Youtube videos no longer play. Without the extension the Youtube videos play correctly.

I'm at my wits end here as I cannot understand why Firefox will not load libavcodec.so from FFMpeg. Libx264 and Libx265 are both installed on the system. All hardware acceleration options are enabled in Firefox.

Does anyone have any ideas on how to trouble shoot this issue? I'd really like to fix this and move on as it has given me a headache for the past four hours trying to solve it. Thank you.

Last edited by Swaggajackin; 02-01-2022 at 10:08 AM.
 
Old 02-01-2022, 09:49 AM   #2
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,468

Rep: Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227
Do you have : Cisco Codec openH264
in your plugins ?
 
Old 02-01-2022, 09:57 AM   #3
Swaggajackin
Member
 
Registered: Jan 2022
Posts: 55

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by marav View Post
Do you have : Cisco Codec openH264
in your plugins ?
Yes, and it's enabled.

Code:
OpenH264 Video Codec provided by Cisco Systems, Inc.
This plugin is automatically installed by Mozilla to comply with the WebRTC specification and to enable WebRTC calls with devices that require the H.264 video codec. Visit https://www.openh264.org/ to view the codec source code and learn more about the implementation.
 
Old 02-01-2022, 09:57 AM   #4
J_W
Member
 
Registered: Apr 2004
Location: Yamagata, JAPAN
Distribution: Slackware64-current
Posts: 192

Rep: Reputation: 130Reputation: 130
Hi,

I think it's not a slackware's issue but firefox's issue.

[Linux] Missing support for FFMpeg 5.0
bugzilla #1752707
Implement support for ffmpeg 5.0
bugzilla #1750760
 
1 members found this post helpful.
Old 02-01-2022, 09:59 AM   #5
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,468

Rep: Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227Reputation: 4227
Code:
blackstar :: ~ » ldconfig -p | grep libavcodec
        libavcodec.so.58 (libc6,x86-64) => /usr/lib64/libavcodec.so.58
        libavcodec.so (libc6,x86-64) => /usr/lib64/libavcodec.so
Do you know why you have .59 ?

@J_W
FYI, No issue here, with the same FF

Last edited by marav; 02-01-2022 at 10:01 AM.
 
1 members found this post helpful.
Old 02-01-2022, 10:00 AM   #6
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 428

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
The libavcodec from the Slackware current is the .so.58
The .so.59 one you have is probably incompatible with the one of the current and can't replace it except for the ffmpeg you have.
 
Old 02-01-2022, 10:05 AM   #7
Swaggajackin
Member
 
Registered: Jan 2022
Posts: 55

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by J_W View Post
Hi,

I think it's not a slackware's issue but firefox's issue.

[Linux] Missing support for FFMpeg 5.0
bugzilla #1752707
Implement support for ffmpeg 5.0
bugzilla #1750760
Thank you. This appears to be the issue, I was going nuts trying to figure this out. I will revert to an older version until this is resolved.

Thank you everyone for your quick responses.
 
1 members found this post helpful.
Old 02-01-2022, 10:08 AM   #8
J_W
Member
 
Registered: Apr 2004
Location: Yamagata, JAPAN
Distribution: Slackware64-current
Posts: 192

Rep: Reputation: 130Reputation: 130
@marav
Thanks for the information.
 
Old 02-01-2022, 10:09 AM   #9
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 428

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Your ffmpeg is in /usr/local
So I think you can just add the official package for ffmpeg and the two versions should live together.
Firefox will take the good one.
I have already played with 2 versions of ffmpeg in the same system.
 
1 members found this post helpful.
Old 02-01-2022, 10:13 AM   #10
Swaggajackin
Member
 
Registered: Jan 2022
Posts: 55

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by BrunoLafleur View Post
Your ffmpeg is in /usr/local
So I think you can just add the official package for ffmpeg and the two versions should live together.
Firefox will take the good one.
I have already played with 2 versions of ffmpeg in the same system.
Thank you for the advice. I will just revert the FFMpeg version to an older version until it's resolved. The only reason I have a newer version of FFMpeg is I needed to build it with x264/x265/nvenc support so I just cloned the latest git, as it does not have those options in the default distribution, it's no problem for me to revert.
 
Old 02-02-2022, 12:53 AM   #11
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,823

Rep: Reputation: 988Reputation: 988Reputation: 988Reputation: 988Reputation: 988Reputation: 988Reputation: 988Reputation: 988
Quote:
Originally Posted by Swaggajackin View Post
Thank you for the advice. I will just revert the FFMpeg version to an older version until it's resolved. The only reason I have a newer version of FFMpeg is I needed to build it with x264/x265/nvenc support so I just cloned the latest git, as it does not have those options in the default distribution, it's no problem for me to revert.
I'm confused.

The FFMPEG Slackbuild in Current says that "nvdec/nvenc" is "autodetected." It is setup so people can enable libx264 and libx265 among other things and build their own custom FFMPEG with the official FFMPEG Slackbuild script. I would wager that the latest and greatest FFMPEG would work with the script with little modification. I know h264 works with the default Slackware Current FFMPEG install. The distro comes ready to go for Youtube.

Last edited by RadicalDreamer; 02-02-2022 at 01:02 AM.
 
Old 02-02-2022, 01:54 AM   #12
Swaggajackin
Member
 
Registered: Jan 2022
Posts: 55

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by RadicalDreamer View Post
I'm confused.

The FFMPEG Slackbuild in Current says that "nvdec/nvenc" is "autodetected." It is setup so people can enable libx264 and libx265 among other things and build their own custom FFMPEG with the official FFMPEG Slackbuild script. I would wager that the latest and greatest FFMPEG would work with the script with little modification. I know h264 works with the default Slackware Current FFMPEG install. The distro comes ready to go for Youtube.
Yea, I don't know. I attempted to encode/decode h264 and h265 via NVENC and NVENC_HEVC with the slackware-current release of FFMPEG but was unable to. It requires building FFMpeg with the Nvidia Cuda Toolchain which isn't present in Slackware Current. I believe libx264 and libx265 are also missing libraries in Slackware Current. I tried building 4.4 with the slackbuilds cuda install (10.2) and it didn't like that version of nvcc. FFMpeg 5.0 had no issue with it strangely. I didn't want to mess with anymore and building with 5.0 was hassle free.

EDIT:

If anyone wants to use FFMpeg 5.0 and have h264 decoding in Firefox (currently), the only libraries Firefox needs from 4.4 are:

Quote:
libavcodec.so.58 libavcodec.so.58.134.100 libavutil.so.56 libavutil.so.56.70.100 libswresample.so.3 libswresample.so.3.9.100
I copied these over to a lib directory so Firefox could find them and kept the FFMpeg 5.0 install. Everything works fine, so it's one work around you can use until Firefox supports 5.0.

Last edited by Swaggajackin; 02-02-2022 at 04:46 AM.
 
1 members found this post helpful.
Old 02-02-2022, 06:27 AM   #13
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 428

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
I compile again the ffmpeg package from slackware with some variables set.
Install x264 and x265 libraries (for example from ponce and/or conraid) and some others libraries for non X264 and X265 variables.
export X264=yes
export X265=yes
export OPENAL=yes
export AAC=yes
export AOM=yes
export DAV1D=yes
cd .../slackware64/source/l/ffmpeg
./ffmpeg.Slackbuild
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] H264 codec not working in Firefox 57 simopal6 Slackware 28 03-21-2019 09:27 PM
Screen capture while playing video yields to blue window where video is playing kayasaman Linux - Desktop 10 01-19-2012 09:54 AM
[SOLVED] xine, dragonplayer segfault playing h264 video kurtwall Slackware 2 12-10-2010 07:44 PM
LXer: Make MPlayer play h264 video files faster on multicore machines LXer Syndicated Linux News 1 07-27-2009 06:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration