LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-28-2017, 03:32 AM   #1
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Rep: Reputation: 30
H264 codec not working in Firefox 57


On a new Slackware 14.2 installation, I can't get Firefox to play H264/MP4 videos.

This website with test videos gives me an error ("No video with supported format and MIME type found") for the H.264/MP4 video, while the others (WebM and Ogg/Theora) work.

Youtube's HTML5 support page confirms that H.264 and MSE & H.264 are not supported (though Youtube videos work, probably with WebM).

In a Gentoo forum, people say it may be related to a problem with Firefox loading a bad libavcodec library. In my system I have a libavcodec.so.57 library, compiled from source with H.264 support, according to the relevant line from "ffmpeg -codecs":
Code:
DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_vdpau h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_v4l2m2m h264_vaapi nvenc nvenc_h264 )
So, well, I'm not sure what to try next. Any ideas? Thanks everyone!
 
Old 11-28-2017, 03:42 AM   #2
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,015

Rep: Reputation: 7186Reputation: 7186Reputation: 7186Reputation: 7186Reputation: 7186Reputation: 7186Reputation: 7186Reputation: 7186Reputation: 7186Reputation: 7186Reputation: 7186
Perhaps, this thread should be moved to the Slackware forum?

Do you have ffmpeg installed?
IIRC, it is not included in 14.2, but was added in -current.

A copy for 14.2 can be found here,

http://bear.alienbase.nl/mirrors/peo...eg/pkg64/14.2/

If you need the 32-bit version click on "parent directory" and back up to the proper folder.
 
Old 11-28-2017, 03:56 AM   #3
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Original Poster
Rep: Reputation: 30
(I wondered if this was more a Software or a Slackware thread, I thought the problem is more of a generic linking issue, but feel free to move it to Slackware if it's more appropriate there.)

I compiled ffmpeg 3.4 (and the corresponding libavcodec.so) from source. The library is in /usr/local/lib, and LD_LIBRARY_PATH includes that directory; however, I tried to check if maybe Firefox couldn't find the library, so I ran strace, but apparently it never tries to load libavcodec.so (but I'm not very familiar with strace, so I might be doing something wrong).
 
Old 11-28-2017, 03:08 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Did you build firefox from source or use the pre-compiled binary from Mozilla? If it was the latter, it may only work with the ffmpeg version it was compiled against. If that is the case, it might be solved if you compile firefox itself, which would hopefully link to the system ffmpeg.
 
Old 11-29-2017, 02:40 AM   #5
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Original Poster
Rep: Reputation: 30
I got the pre-compiled binary, but I never had this problem before with pre-compiled Firefox and compiled ffmpeg. Anyway, thanks for the suggestion, I'll think about that, though from a quick glance compiling Firefox doesn't look straightforward...
 
Old 11-29-2017, 11:25 AM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
If you're trying to compile it by hand, yeah, it is kinda difficult. But you can just use the SlackBuild for -current. Download the following directory and then just run the SlackBuild script as root. You will require rust before you can compile firefox, but that is available on SBo. Once the SlackBuild is ran, you should be able to install it and hopefully it will work.

I don't know for sure if it will work, but if the pre-compiled firefox was built against an older version of ffmpeg (or it is expecting the binaries/libraries in different locations), it may not work. It's just speculation, but we can hope for the best.
 
Old 11-29-2017, 11:42 AM   #7
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Original Poster
Rep: Reputation: 30
Thanks. Yeah, I ended up trying the SlackBuild script, but it requires llvm/clang 3.9, and apparently 14.2 ships the 3.8, so I'm building it and it's taking an eternity.
 
Old 11-29-2017, 11:47 AM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Dang, I didn't realize it required an upgraded llvm (yet they still require an ancient autoconf... go figure).
 
Old 11-29-2017, 09:25 PM   #9
d_K
Member
 
Registered: Aug 2016
Posts: 32

Rep: Reputation: Disabled
This may be related to a wider webm Firefox issue affecting some live youtube streams. See here for more info: https://support.mozilla.org/en-US/questions/1190024
 
Old 11-29-2017, 09:29 PM   #10
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
There is always youtube-dl which can work around this issue.
 
Old 11-29-2017, 09:30 PM   #11
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,454

Rep: Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347
Quote:
Originally Posted by simopal6 View Post
Thanks. Yeah, I ended up trying the SlackBuild script, but it requires llvm/clang 3.9, and apparently 14.2 ships the 3.8, so I'm building it and it's taking an eternity.
You can try adding the option --disable-stylo-build-bindgen, which (I think) is the only thing in Firefox that needs to have LLVM.
 
2 members found this post helpful.
Old 11-30-2017, 02:57 AM   #12
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by d_K View Post
This may be related to a wider webm Firefox issue affecting some live youtube streams. See here for more info: https://support.mozilla.org/en-US/questions/1190024
Actually, webm seems to be the only thing that's working on my browser
Quote:
Originally Posted by orbea View Post
There is always youtube-dl which can work around this issue.
Youtube works fine, as it uses webm, it's all other sites using H264 that don't work.
Quote:
Originally Posted by volkerdi View Post
You can try adding the option --disable-stylo-build-bindgen, which (I think) is the only thing in Firefox that needs to have LLVM.
I figured I could disable it, but I had no idea what this Stylo was, so I just left llvm to compile all night long

I'm now building the package, let's see what happens.
 
Old 11-30-2017, 04:26 AM   #13
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Original Poster
Rep: Reputation: 30
No luck It's not working even with the compiled package.

One thing I'm wondering about is why, according to strace, firefox never seems to look for the libavcodec library. Shouldn't it at least try to load it, and then either fail to find it or find a wrong one (though there's only one libavcodec.so in my system)?

If it may be useful, I'm attaching the output of `strace firefox | grep lib` (510 lines). There's no mention of ffmpeg or libav whatsoever. What can this mean?

By the way, thanks everyone for your help so far!
Attached Files
File Type: txt strace_firefox_lib.txt (42.2 KB, 50 views)
 
Old 11-30-2017, 07:06 AM   #14
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Quote:
Originally Posted by simopal6 View Post
Youtube works fine, as it uses webm, it's all other sites using H264 that don't work.
Youtube-dl supports a lot more than youtube though.

If you are curious check out this list.
https://rg3.github.io/youtube-dl/supportedsites.html
 
Old 11-30-2017, 02:26 PM   #15
ChuangTzu
Senior Member
 
Registered: May 2015
Location: Where ever needed
Distribution: Slackware/Salix while testing others
Posts: 1,718

Rep: Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857
you could also copy the video link and play it in smplayer or VLC, or use the addon "UnPlug" and open in another tab or your favorite media player. Sadly, UnPlug does not work on FF57.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
VLC says missing codec h264 on CentOS/Rhel 7 standards Linux - Software 5 05-12-2015 05:49 AM
[SOLVED] H264 decoding not working on Slackware 14.1 full install core solo 1.86GHz McCrow Slackware 6 05-03-2015 12:09 PM
[SOLVED] VLC (and Dragon Player) can no longer use H264 codec jdkaye Debian 1 07-12-2013 01:18 AM
[SOLVED] totem complains its missing an H264 codec mike11 Linux - Newbie 3 03-29-2011 08:36 PM
firefox and codec questions Unregistered Slackware 17 09-23-2007 03:56 PM

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

All times are GMT -5. The time now is 11:07 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