Flash视频编码笔记

根据 video_file_format_spec_v10.pdf 及 swf_file_format_spec_v10.pdf 两个文档中列出的flash所支持的视频编码,结合网上的资料做个简单的总结。

FLV中的视频编码:

1: JPEG (currently unused)

    unsued 忽略。

2: Sorenson H.263

    “A codec that was licensed to Macromedia for use in its Flash Player 6. In the same family as H.263.”

   “The Sorenson codec (also known as Sorenson Video Codec, Sorenson Video Quantizer or SVQ) is a digital video codec devised by the company Sorenson Media. It is used inApple's QuickTime and in Adobe Flash (formerly Macromedia Flash).”

  也属专有算法,最早是Apple用于QuickTime的,后授权给了Macromedia。

    “The specifications of the codec were not public, and for a long time the only way to play back Sorenson video was to use Apple's QuickTime player, or the MPlayer for Unix/Linux, which in turn piggy-backed DLL-files extracted from Apple's player for Microsoft Windows.

According to an anonymous developer of FFmpeg, reverse engineering of the SVQ3 codec revealed it as a tweaked version of H.264. The same developer also added support for this codec to FFmpeg, making native playback possible on all platforms supported by FFmpeg.”

  “这种格式是基于H.263。Sorenson H.263与 H.263有很少的不同。对于大多数部分,它是H.263的一个子集,一些高级功能被除去了。也有一些增加。
与 H.263的不同,部分H.263特征从 Sorenson H.263 格式中除去:
• GOB (块组) 层
• 屏幕分层指示
• 文档照相机指示
• 图片冻结释放
• 基于句法的算术编码
• PB-帧
• 多点连续出现
• 覆盖块移动补偿
下列非H.263特征加入 Sorenson H.263 格式:
• 任意使用的帧(不同的帧没有未来的依赖)
• 绝对宽和高到了65535像素
• 无限移动向量支持总打开
• 一个解锁标志可用,来建议解锁过滤器的使用”

3: Screen video

    “This is a simple screen capture codec. The screen is divided into x*16 * y*16 pixel blocks. Then only the "changed since last frame" blocks are transmitted zlib-compressed. The video is contained in Flash Video files.”


4: On2 VP6

5: On2 VP6 with alpha channel

    On2属于专有算法。由On2 Technologies公司开发。In 2004, On2's VP6 was selected for use as the Macromedia Flash 8 video codec. On2的网站是 http://on2.com/

       skype,AOL等都使用了On2的视频编码算法。

Features of VP6 6.4.2.0 :
- Achieves a 10-15% improvement over previous versions of VP6 beta.
- Supports Multi-pass encoding.
- Highly configurable (constant or variable) datarate control.
- Direct access to the reconstruction buffer.
- Improves Error recovery.
- Multiple platform support (Intel, Equator, TI, PowerPC).
- Compresses high-definition (HD) material with no restrictions on the encoder. VP6 can play back 1920x1080 HD material on a 2.5 GHz PC and 1280x720 material on a 1.5 GHz PC.
- Supports real-time encoding at full D1 resolution.
- Up to 40% image quality improvement over VP5.
- Up to 50% faster playback than VP5.
- Optimized to produce the best quality video available on high-resolution material (640x480 and higher).
- Designed for inexpensive DSP processors. VP6 is ideal for embedded chipsets in non-PC devices and set-top boxes. Unlike some standards-based codecs (JVT, MPEG-4 v10), VP6 runs on general-purpose DSPs without requiring expensive add-on subprocessors.
- VP6 is a purely software-based solution that can be upgraded easily.
- Introduces predefined "profiles": Simple for fast playback on inexpensive processors, General for full D1 on set-top boxes, and Advanced for ensuring the best quality possible at extremely low datarates.
- Achieves any requested data rate by choosing automatically to adjust quantization levels, adjust encoded frame dimensions, or drop frames altogether.
- Carries no patent pooling restrictions or external licensing fees.”

6: Screen video version 2

    同3。

7: AVC

    MPEG-4 is a suite of standards which has many "parts", where each part standardizes various entities related to multimedia, such as audio, video, and file formats. H.264 is a standard for video compression, and is equivalent to MPEG-4 Part 10, or MPEG-4 AVC (for Advanced Video Coding). The final drafting work on the first version of the standard was completed in May 2003.

    也就是说AVC就是H.264,是MPEG-4标准中的一部分,定义了视频编码,与之对应的AAC = Advanced Audio Coding.

SWF文件中定义的视频编码:

  1. Sorenson H.263
  2. Screen video (SWF 7 and later only)
  3. VP6 (SWF 8 and later only)
  4. VP6 video with alpha channel (SWF 8 and later only)

这是flv中定义编码的一个子集,文档中同时也说明了将视频提供给flash player有三种方法:

  1. 嵌入swf文件,也就是上面列出的四种编码格式。
  2. 放在Adobe Flash Media Server上通过RTMP协议传送。
  3. (Flash Player7 及以后)通过脚本提供的方法加载flv文件播放。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
英文版flv官方文档 Contents Introduction-----------------------------------------------------------------------------------------------------1 The F4V Video File Format ------------------------------------------------------------------------------------ 1 New in the F4V Video File Format --------------------------------------------------------------------------- 1 The FLV Video File Format ------------------------------------------------------------------------------------ 1 1 The F4V File Format-------------------------------------------------------------------------------------2 1.1 Overview--------------------------------------------------------------------------------------------------- 2 1.2 Simple data types --------------------------------------------------------------------------------------- 2 1.3 F4V box format------------------------------------------------------------------------------------------- 3 1.4 F4V Box Hierarchy --------------------------------------------------------------------------------------- 4 1.5 Sample Description Box Hierarchy ------------------------------------------------------------------ 6 1.6 Handling Unsupported Boxes ----------------------------------------------------------------------- 6 1.7 Ordering of Boxes --------------------------------------------------------------------------------------- 7 1.8 Supported Media Types ------------------------------------------------------------------------------- 7 1.8.1 Supported audio types ------------------------------------------------------------------------------ 7 1.8.2 Supported video types ------------------------------------------------------------------------------ 8 1.8.3 Supported data types-------------------------------------------------------------------------------- 8 2 F4V Box Definitions -------------------------------------------------------------------------------------9 2.1 File Type box --------------------------------------------------------------------------------------------- 9 2.2 Progressive Download Information box------------------------------------------------------------ 9 2.3 Movie box ----------------------------------------------------------------------------------------------- 10 2.4 Movie Header box------------------------------------------------------------------------------------- 10 2.5 Track box ------------------------------------------------------------------------------------------------ 11 2.5.1 Track Header box ----------------------------------------------------------------------------------- 12 2.5.2 Edit box ------------------------------------------------------------------------------------------------ 13 2.5.2.1 Edit List box----------------------------------------------------------------------------------------- 13 2.6 Media box ----------------------------------------------------------------------------------------------- 14 2.6.1 Media Header box ---------------------------------------------------------------------------------- 14 2.6.2 Handler Reference box ---------------------------------------------------------------------------- 15 2.7 Media Information box------------------------------------------------------------------------------- 16 2.7.1 Video Media Header box-------------------------------------------------------------------------- 16 2.7.2 Sound Media Header box ------------------------------------------------------------------------ 17 2.7.3 Hint Media Header box---------------------------------------------------------------------------- 17 2.7.4 Null Media Header box ---------------------------------------------------------------------------- 18 2.7.5 Data Information box------------------------------------------------------------------------------- 18 2.7.5.1 Data Reference box------------------------------------------------------------------------------- 18 2.7.6 Sample Table box ----------------------------------------------------------------------------------- 19 2.7.6.1 Decoding Time to Sample box----------------------------------------------------------------- 19 2.7.6.2 Composition Time to Sample box ------------------------------------------------------------- 20 2.7.6.3 Sample to Chunk box---------------------------------------------------------------------------- 21 2.7.6.4 Sample Size box ----------------------------------------------------------------------------------- 21 2.7.6.5 Chunk Offset box --------------------------------------------------------------------------------- 22 2.7.6.6 Sync Sample box---------------------------------------------------------------------------------- 22 2.7.6.7 Independent and Disposable Samples box ----------------------------------------------- 23 2.8 Sample Description Box Structure ----------------------------------------------------------------- 24 2.8.1 Sample Description box --------------------------------------------------------------------------- 24 2.8.2 VisualSampleEntry box ----------------------------------

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值