如何在Firefox中播放MP4视频 [英] How to play MP4 video in firefox

查看:996
本文介绍了如何在Firefox中播放MP4视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个来自数据库的动态视频路径。视频可以以任何格式上传。当我在Firefox中加载视频时,我看到以下错误:
$ b

不支持video / mp4的指定type属性。媒体资源path_to_video.mp4的加载失败。



我在我的HTML中加载视频

 < p为H. 
< video class =responsive-videoid =trailer>
< source src =<?php echo $ biovideo?>类型= 视频/ MP4 >
< / video>
< / p>

有没有办法在Firefox中播放mp4视频,因为我不确定视频的扩展名是什么如评论中指出的那样,Ubuntu / firefox本身不支持mp4 - 这是由于授权问题引起的。 Mozilla的文档有点混乱(恕我直言),所以底部的表格可能是最好的选择。



然而,您可以通过安装Ubuntu附加功能:
$ b


sudo apt-get install ubuntu-restricted-extras


然后启用gstreamer:


  • 转到Firefox about:config

  • 搜索media.gstreamer.enabled标志

  • 将其设置为启用



  • 应该允许你播放视频。


    I have a dynamic video path coming from database. Video can be uploaded in any format. When I load the video in Firefox, I see the following errors

    Specified "type" attribute of "video/mp4" is not supported. Load of media resource path_to_video.mp4 failed.

    I am loading the video in my html like

    <p>
     <video class="responsive-video" id="trailer">
       <source src="<?php echo $biovideo?>" type="video/mp4">
     </video>
    </p>
    

    Is there any way to play the mp4 videos in Firefox as I am not sure what extension the video will have

    解决方案

    As noted in the comments Ubuntu/firefox does not support mp4 natively - this is due to licensing issues. The Mozilla documentation is a little confusing (IMHO) so the table at the bottom is probably the best place to look.

    However you can add support fairly easily by installing Ubuntu extras:

    sudo apt-get install ubuntu-restricted-extras

    and then enabling gstreamer:

    • go to Firefox about:config
    • search for the 'media.gstreamer.enabled' flag
    • set it to enabled

    This should allow you play the video.

    这篇关于如何在Firefox中播放MP4视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆