简体   繁体   English

jwplayer没有在某些手机上播放视频,错误代码4

[英]jwplayer not playing video on some phones, error code 4

I am getting on one of android phones error from jwplayer: 我从jwplayer得到一个android手机错误:

Error playing media: 播放媒体时出错:

MediaError { code 4 } MediaError {code 4}

Tried to search what does it mean, but cannot find. 试图搜索它的意思,但找不到。

Video works on other android devices, and on desktop computers. 视频适用于其他Android设备和台式计算机。 Tried chrome and default browser in android. 在Android中尝试了chrome和默认浏览器。

Update 更新

http://jsfiddle.net/HCH8Q/3/ http://jsfiddle.net/HCH8Q/3/

 jwplayer('myElement').setup({ 
        file: 'http://video.oitlabs.com/dogs6_2mb/mr6d_1047.mp4', 

        // works
        // file: 'http://videos-jp.jwpsrv.com/zWLy8Jer/videos/i8oQD9zd-1753142.mp4?77c801d752d5207784c49e7ed80fb953798fae0fcca03ecf79558597ab74bd0b969af6ee1babdc6fac893174bba3c1bbb98ef7c2e4c6b3c59a812b4ed2c9abb29c61117869dbacbbb7caced845a8994ff297cc03a4',
        height: 360, 
        image: '/uploads/example.jpg',
        width: 640 
      });

So video from their site works, but my video does not. 所以来自他们网站的视频有效,但我的视频没有。 But when I run that video not in jw player but directly in the address bar its url, it plays. 但是,当我在jw播放器中运行该视频但直接在地址栏中运行其网址时,它会播放。 So it means browser is able to play that video. 所以这意味着浏览器能够播放该视频。

This happens btw on LG L7 P710 phone 这在LG L7 P710手机上发生了什么

Update: 更新:

Tried now to upload to my server the video from jw site, and it works on that phone. 现在尝试将来自jw网站的视频上传到我的服务器,它可以在该手机上运行。 http://jsfiddle.net/HCH8Q/5/ So this is encoding issue. http://jsfiddle.net/HCH8Q/5/所以这是编码问题。 Then the question comes - how should I solve it? 然后问题来了 - 我该如何解决? I used Handbrake program to convert videos, it has many of settings but I am not sure what should I set to convert so it would work on every phone which supports mp4 files? 我使用Handbrake程序转换视频,它有很多设置,但我不知道我应该设置什么转换所以它可以在每个支持mp4文件的手机上工作?

Update: Finally made it work by this site instructions: http://www.broken-links.com/2010/07/30/encoding-video-for-android/ 更新:最后通过本网站说明工作: http//www.broken-links.com/2010/07/30/encoding-video-for-android/

The first is cross-platform, using Handbrake. 第一个是跨平台,使用Handbrake。 What I did with this was to use the iPhone & iPod Touch preset, check the Web Optimized option, and change the Average bitrate option (in the Quality section) to ~1000kbps (you should then save this as a new preset called Android). 我对此做的是使用iPhone和iPod Touch预设,检查Web优化选项,并将平均比特率选项(在质量部分中)更改为~1000kbps(您应该将其保存为一个名为Android的新预设)。 You'll also need to change the size of the output video in the Picture Settings options — I changed mine to 480 wide (keeping the aspect ratio) and they came out really crisp and sharp. 您还需要在“图片设置”选项中更改输出视频的大小 - 我将其更改为480宽(保持纵横比),它们显得非常清晰锐利。 You can see the result of that below (if your browser supports it). 你可以看到下面的结果(如果你的浏览器支持它)。

It looks like everything I done same earlier, except that I used much smaller kbps setting and picture size left default. 它看起来像我之前做的一切, 除了我使用了更小的kbps设置和图片大小默认。 Will later try to experiment which caused to make it work, because still it does not make sense for me how different bitrate or picture size can make it not work. 稍后会尝试进行实验,以使其工作,因为对我而言,不同的比特率或图片大小如何使其无法工作也没有意义。 It should be just affecting quality. 它应该只是影响质量。

Update Had another problem - when using handbrake and trying to convert many files at once, first file picture width gets converted to what I set, but other files - to the default, maybe some bug or something. 更新还有另一个问题 - 当使用手刹并尝试一次转换多个文件时,第一个文件图片宽度转换为我设置的,但其他文件 - 默认情况下,可能是一些bug或其他东西。 But then I tried another program - Freemake Video converter - it has various params and I tried convert 2 files at once, and were no problems, worked on that phone also. 但后来我尝试了另一个程序--Freemake视频转换器 - 它有各种参数,我尝试一次转换2个文件,并没有问题,也在那个手机上工作。 http://www.freemake.com/free_video_converter/ http://www.freemake.com/free_video_converter/

MediaError { code 4 } is not a JW Player error. MediaError {code 4}不是JW Player错误。

I would recommend taking the video from our site, uploading it to your hosting, and then seeing if it still works. 我建议从我们的网站上获取视频,将其上传到您的主机,然后查看它是否仍然有效。 That way you can determine if the issue is encoding based, or a server side issue. 这样您就可以确定问题是基于编码还是服务器端问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM