如何在不使用流服务器的情况下实现 Adob​​e HTTP 流规范 [英] How to implement the Adobe HTTP Streaming spec without using their Streaming server

查看:24
本文介绍了如何在不使用流服务器的情况下实现 Adob​​e HTTP 流规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 Flash 10.1 开始,他们添加了通过 appendBytes 方法将字节添加到 NetStream 对象的功能(此处描述 http://www.bytearray.org/?p=1689).这个增加的主要原因是 Adob​​e 终于支持了视频的 HTTP 流.这很棒,但似乎您需要使用 Adob​​e Media Streaming Server (http://www.adobe.com/products/httpdynamicstreaming/) 从现有视频创建正确的视频块,以实现流畅的流式传输.

As of Flash 10.1, they have added the ability to add bytes into the NetStream object via the appendBytes method (described here http://www.bytearray.org/?p=1689). The main reason for this addition is that Adobe is finally supporting HTTP streaming of video. This is great, but it seems that you need to use the Adobe Media Streaming Server (http://www.adobe.com/products/httpdynamicstreaming/) to create the correct video chunks from your existing video to allow for smooth streaming.

过去我曾尝试做一个黑客版本的 HTTP 流,在那里我交换了 NetStream 对象(类似于这里 http://video.leizhu.com/video.html),但块之间总是有短暂的停顿.使用新的 appendBytes,我尝试对来自前一个站点的两个视频部分进行快速模拟,但即便如此,跳过仍然存在.

I have tried to do a hacked version of HTTP streaming in the past where I swap out the NetStream objects (similar to here http://video.leizhu.com/video.html), but there is always a momentary pause between the chunks. With the new appendBytes, I tried to do a quick mock up with the two sections of video from the preceding site, but even then, the skip still remains.

有谁知道需要如何格式化两个连续的 .FLV 文件,以便 NetStream 对象上的 appendBytes 方法创建流畅的视频,而不会在段之间出现明显的跳跃?

Does anyone know how the two consecutive .FLV files needs to be formated in order for the appendBytes method on the NetStream object to create a nice smooth video without a noticeable skip between the segments?

推荐答案

我能够使用 Samuel 描述的 Adob​​e 的文件打包工具来完成这项工作.我没有使用 NetStream 对象,但我使用了 OSMF Sample Player,我认为它在内部使用.以下是不使用 FMS 的方法:

I was able to get this working using Adobe's File Packager Tool which Samuel described. I didn't use the NetStream object but I used the OSMF Sample Player which I assume uses this internally. Here's how to do with without using FMS:

  1. http://www.adobe.com/products/获取 Adob​​e 的用于 Http 动态流的文件打包程序httpdynamicstreaming/
  2. 在包含 H.264/AAC 的现有 MP4 文件上运行 File Packager,如下所示:C:Program FilesAdobeFlash Media Server 4 oolsf4fpackager>f4fpackager.exe --input-file="MyFile.mp4" --segment-duration=30

这将产生 30 秒长的 F4F 文件,还有 F4X 和 F4M 文件.F4F 文件是应该播放的正确分段(和碎片化)的 MP4 文件.如果您想使用 OSMF 播放器对此进行测试,请执行以下操作:

This will result in 30 second long F4F files, also F4X and a F4M file. The F4F files are your correctly segmented (and fragmented) MP4 files that should play. If you want to test this using the OSMF Player also do the following:

  1. 获取 Apache 服务器
  2. http://www.adobe.com/products/httpdynamicstreaming 获取 Adob​​e 的 Apache Http 源模块/
  3. 根据http://help.adobe 安装模块.com/en_US/HTTPStreaming/1.0/Using/WS8d6ed60bd880807c48597a9e1265edd6cc0-8000.html
  4. 将F4F、F4X、F4M文件放入httpdocs下的vod目录
  5. http://www.osmf 获取用于 HTTP 动态流传输的 OSMF 示例播放器".org/downloads/OSFMPlayer_zeri2.zip
  6. 将示例播放器放在 httpdocs 目录中
  7. 在浏览器中从示例播放器加载 html 文件,例如 http://localhost/OSMFPlayer.html
  8. 按下弹出按钮并输入您的 F4M 文件的 URL,它应该可以播放

所以要回答最初的问题,Adobe 的 File Packager 是要使用的文件拆分器,您无需购买 FMS 即可使用它,它适用于 FLV 和 MP4/F4V 文件.

So to answer the original question Adobe's File Packager is the file splitter to use, you don't need to buy FMS to use it and it works for FLV and MP4/F4V files.

这篇关于如何在不使用流服务器的情况下实现 Adob​​e HTTP 流规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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