Blackberry、QR 和视频
我被要求创建一个 QR 图像,在用智能手机扫描时,将播放一个 2 分钟的短视频。该视频当前为 .mp4 格式,但格式可能会更改。视频播放在 iPhone 上运行良好,但在使用 BlackBerry Bold 时遇到一些问题。
当用户扫描二维码时,手机会将他们引导至 URL。现在,他们定向到的 URL 是 http://domain.com/video.mp4
。然而,当用户尝试访问此页面时,他们会收到 413 错误“实体太大”。基本上,太多的东西被推给了客户。
阅读标题为 “请求实体太大”,我发现您需要增加允许的请求大小。但用户可以在黑莓手机上完美播放 YouTube 视频!为什么? youtube 视频尺寸是否较小? YouTube 使用什么格式?为什么 YouTube 可以工作,而我的方法却行不通?
我知道这里显而易见的解决方案是使用 YouTube 作为托管服务并嵌入视频,但我被告知我无法使用这种快速且简单的解决方案。
I've been asked to create a QR image that, on being scanned by a smartphone, will play a short 2-minute video. The video is currently in .mp4 format, but the format can change. The video playback works fine on iPhone however I'm having some problems with the BlackBerry Bold.
When the user scans the QR code the phone directs them to a URL. Right now the URL they are directed to is http://domain.com/video.mp4
. However when the user attempts to access this page they get a 413 Error "Entity too large". Basically, too much is being pushed to the client.
Reading the BlackBerryForums.com.au thread titled "Request Entity Too Large", I see you need to increase the allowed request size. But the user is able to play YouTube videos perfectly fine on their blackberry! WHY? is the youtube video size smaller? What format is YouTube using? Why does YouTube work, when my method doesn't?
I know the obvious solution here is to use YouTube as a hoster and embed the video but I am told I cannot use this quick and easy solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是 YouTube 流式传输视频。您要做的就是让用户下载整个视频文件。
您可能需要获取流媒体服务器才能播放视频。
或者,通过降低视频分辨率和比特率来减小文件的文件大小,并确保声音是单声道且低比特率。
The problem is that YouTube streams the video. What you're trying to do is get the user to download the whole video file.
You may need to get a streaming server so that the video can be played.
Alternatively, reduce the filesize of the file by reducing the video resolution and bitrate, make sure the sound is mono and low bitrate as well.