Safari 9.0无法在存储服务器上播放mp4视频 [英] Safari 9.0 can not play mp4 video on the storage server

查看:683
本文介绍了Safari 9.0无法在存储服务器上播放mp4视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的视频链接不能用safari 9.0(最新版本)播放。但safari,chrome和firefox的旧版本可以播放。



http://assets00.grou.ps/0F2E3C/wysiwyg_files/Videos/saksuka/20150928104628-lhmkkfbhnkiisbhht.mp4



当我将视频从服务器下载到我的电脑时,我可以使用safari 9.0。



这就是为什么我不认为这个问题会影响视频编码。



我已经完成了这些设置;

  mime.types 
video / mp4 mp4 m4v
video / ogg ogv
video / webm webm

httpd.conf
AddType视频/ mp4 mp4 m4v
AddType视频/ ogg ogv
AddType video / webm webm

.htaccess
AddType video / mp4 mp4 m4v
AddType video / ogg ogv
AddType video / webm webm


解决方案

这似乎是一些重复出现的问题, Safari。



我在localhost node.js静态服务器上测试了你的视频,它在Safari中播放得很好,这意味着视频本身应该没问题。



如果您查看Safari中的Web检查器,您将看到Web请求不包含一些标头。这会导致一些服务器出现问题,并且它们没有像Safari期望的那样响应,或者根本没有响应。



你可以看到正在讨论的类似问题(第二个是不是你的情况我想但是说明发送到服务器的请求中包含的信息可能导致服务器决定不按你的意愿回复):





更新



使用wireshark捕获来自Chrome的请求,可以看到服务器响应来自Safari的请求(在同一台机器上) )导致服务器没有响应。



请求通常相似,都包含引用标头。 Safari浏览器只询问最初从服务器返回的前2个字节 - 它通过使用'range'标头来实现,该标头用于指定文件返回的字节范围:




  • 范围:bytes = 0-1 \\ n



另一方面,Chrome会在其范围请求中请求整个视频:




  • 范围:bytes = 0-\r\\\



然而,在Chrome上使用HTTP工具(例如Postman)并将范围更改为0-1似乎并没有阻止服务器响应在Chrome的情况下。实际上,使用该工具尽可能设置与Safari设置相同的标题似乎仍然可以返回视频。

The following video link cannot be played with safari 9.0 (latest version). But older versions of safari, chrome and firefox can play.

http://assets00.grou.ps/0F2E3C/wysiwyg_files/Videos/saksuka/20150928104628-lhmkkfbhnkiisbhht.mp4

I can play with safari 9.0 when i download the video from the server to my computer.

That's why I don't think this problem stems video encoding.

I have done these settings;

mime.types
video/mp4   mp4 m4v
video/ogg   ogv
video/webm  webm

httpd.conf
AddType video/mp4 mp4 m4v
AddType video/ogg ogv
AddType video/webm webm

.htaccess
AddType video/mp4 mp4 m4v
AddType video/ogg ogv
AddType video/webm webm

解决方案

This seems to be recurring problem with some mp4 files on Safari.

I tested your video on a localhost node.js static server and it played fine in Safari, which means the video itself should be fine.

If you look at the web inspector in Safari you will see that the web request is not including some headers. This causes some servers problems and they do not respond the way Safari is expecting, or do not respond at all.

You can see similar problems being discussed (the second one is not your case I think but illustrates that the info included in the request sent to the server can cause the server to 'decide' not to respond as you want):

Update:

Using wireshark to capture the request from Chrome, it can be seen to result in a response from the server with the video to be played while the request from Safari (on the same machine) results in no response from the server.

The requests are generally similar and both do include the referrer header. The Safari browser is only asking for the first 2 bytes to be returned from the server initially - it does this by using the 'range' header, which is used to specify the bytes range that a file returns:

  • Range: bytes=0-1\r\n

Chrome on the other hand requests the entire video in its range request:

  • Range: bytes=0-\r\n

However, using a HTTP tool (e.g. Postman) on Chrome and changing the range to 0-1 does not seem to stop the server responding in the Chrome case. In fact using the tool to set, as far as possible, all the same headers as Safari sets seems still seems to return the video ok.

这篇关于Safari 9.0无法在存储服务器上播放mp4视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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