[SOLVED] Firefox and MP4 videos (HTML5 <video> element)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
according to Mozilla guidelines, latest versions of Firefox should support MP4 video streams inside <video> elements when an external plugin (namely, gstreamer 1.0) is available.
However, after installing gstreamer1 packages from SBo, the support is still not available, probably because the package was not build with support to the gstreamer libs (not available in Slackware tree). This can also be seen in the about:buildconfig page, as --enable-gstreamer1 is not listed in build-time options.
Trying to rebuild the mozilla-firefox package with this support using the original source and SlackBuild fails during the linking phase.
Anyone has ever tried this?
I think it should work fine with both gstreamer versions, 0.10.x, the default (support for which is already built in Slackware's firefox, despite the option --enable-gstreamer=0.10 not being specified at build time), and 1.x (support for which you enable specifying between the build options --enable-gstreamer=1.0): you probably need gst-plugins-bad and gst-plugins-ugly from SBo, that contain support for the codec h264 and aac (needed also to see youtube video with the html5 interface).
I tested it here with this sample code served by my apache
Trying to rebuild the mozilla-firefox package with this support using the original source and SlackBuild fails during the linking phase.
this is most probably a RAM issue: most recent versions need a lot of RAM and swap during that step (here, building with PGO, I use 10 Gb of RAM and 10 Gb of swap).
I think it should work fine with both gstreamer versions, 0.10.x, the default (support for which is already built in Slackware's firefox, despite the option --enable-gstreamer=0.10 not being specified at build time), and 1.x (support for which you enable specifying between the build options --enable-gstreamer=1.0): you probably need gst-plugins-bad and gst-plugins-ugly from SBo, that contain support for the codec h264 and aac (needed also to see youtube video with the html5 interface).
Well, truth is I installed all those packages and something more:
but still there's no mp4 <video> support in Firefox.
I guess that gstreamer gets loaded with a dlopen-type call and not on application loading, as there would be a gstreamer entry in the output of the ldd command.
I tried a run with strace, and saw that it finds and opens every gstreamer lib in /usr/lib64/gstreamer-0.10/, but then I got no clue at what's going wrong...
Quote:
Originally Posted by ponce
this is most probably a RAM issue: most recent versions need a lot of RAM and swap during that step (here, building with PGO, I use 10 Gb of RAM and 10 Gb of swap).
I didn't monitor RAM usage, but I guess I'll do if I try again another build. Thanks for the suggestion
I tried a run with strace, and saw that it finds and opens every gstreamer lib in /usr/lib64/gstreamer-0.10/, but then I got no clue at what's going wrong...
That most likely means that it has been built against gstreamer 0.10.x. There has to be an option "--enable-gstreamer=1.0" in the SlackBuild to point it to the 1.x libraries.
I took a little different approach with Firefox here - I built gstreamer 1.x and put it into /opt. Afterwards, I put this line into my SlackBuild to link Firefox against it:
No need to rebuild Firefox, the binary packages provided by Mozilla will play HTML5 H264 so long as you have the correct GStreamer libs installed. You can use this to repackage the Mozilla provided binary into Slackware packaging format:
And that was it! Installing gst-ffmpeg solved the issue. Seems like Firefox relies on the H264 implementation found in ffmpeg.
well, I just tried uninstalling gst-plugins-bad, gst-plugins-ugly and ffmpeg and it still works: seems it needs just gst-ffmpeg alone (that should have an integrated ffmpeg version), beside what's already in standard Slackware.
well, I just tried uninstalling gst-plugins-bad, gst-plugins-ugly and ffmpeg and it still works: seems it needs just gst-ffmpeg alone (that should have an integrated ffmpeg version), beside what's already in standard Slackware.
I confirm: during the build of gst-ffmpeg, I saw it was configuring and compiling an ffmpeg version that (I guess) it statically links to its own library.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.