向iPad提供mp4视频 [英] Serving mp4 video to iPad

查看:164
本文介绍了向iPad提供mp4视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在HTML文档中提供mp4视频,但它不能在实时服务器上播放。在本地它可以工作。

I want to serve a mp4 video in a HTML document but it doesn't play on the live server. Locally it works.

即使只使用没有任何HTML的文件,它也会在我使用本地Apache时播放。在网络服务器上,iPad显示无法播放电影

Even using only the file without any HTML it does play when I use my local Apache. On the webserver the iPad says "Movie could not be played"

两个服务器上的文件标题为video / mp4。

The header for the file is "video/mp4" on both Servers.

这里可能出现什么问题?

What could be the problem here?

问候

更新:

标题本地Apache:

Header local Apache:


Accept-Ranges bytes
Cache-Control max-age = 86400
连接Keep-Alive
内容长度8993646
内容类型视频/ mp4
日期星期四,2012年2月23日14:40:58 GMT
Etag733258-893b6e-36d96c80
Keep-Alive timeout = 15,max = 100
Last-Modified Thu,2012年2月23日10:36:18 GMT

Accept-Ranges    bytes Cache-Control    max-age=86400 Connection    Keep-Alive Content-Length    8993646 Content-Type    video/mp4 Date    Thu, 23 Feb 2012 14:40:58 GMT Etag    "733258-893b6e-36d96c80" Keep-Alive    timeout=15, max=100 Last-Modified    Thu, 23 Feb 2012 10:36:18 GMT

标题实时服务器:


Cache-Control max-age = 86400
连接Keep-Alive
内容长度8993670
内容类型视频/ mp4
日期星期四,2012年2月23日14:40:40 GMT
Keep-Alive timeout = 15 ,max = 100
Se rver Apache
X-Mod-H264-Streaming version = 2.0

Cache-Control    max-age=86400 Connection    Keep-Alive Content-Length    8993670 Content-Type    video/mp4 Date    Thu, 23 Feb 2012 14:40:40 GMT Keep-Alive    timeout=15, max=100 Server    Apache X-Mod-H264-Streaming    version=2.0

内容长度与以下内容有所不同本地生活...

What's also weird is that the Content-Length differs from local to live...

推荐答案

解决方案是错误的 Conten-Length 来自直播服务器的标头。解决了这个问题之后就行了。

Solution is a wrong Conten-Length header from the live-server. After fixing this problem it worked.

同事固定服务器设置,所以我不知道他做了什么。只是长度现在与我本地机器上的长度相同

Collegue fixed server settings, so I don't know excactly what he did. Just that the lenght is now the same as on my local machine

这篇关于向iPad提供mp4视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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