视频tags的组成: //————————————————————————— tag类型 0×09
tag数据大小 3个字节的视频数据大小
tag时间戳 3个字节tag数据应用的时间(毫秒)
tag时间戳扩展 1个字节的时间戳扩展,让时间戳变成4字节,本字节作为时间戳的高位.
streamID 3个字节的类id,总是0
视频tags的数据
//———————————————————————————————————– 视频tags的数据:
视频tags数据和swf文件格式中的VideoFrame是相似的.他们的数据是一样的
视频格式的数据的组成如下:
帧类型 4bit
1: 关键帧keyframe(视频中的关键帧,数据存储的是整个画面完整的数据,可以提取它来生成图片) 2: 中间帧inter frame(关键帧之间的状态,不完整的画面数据,需要依靠前面帧的数据生成) 3: 可任意使用的中间帧disposable inter frame(H.263 only)
视频编码id 4bit
2: Sorenson H.263(mencoder转换所使用的视频编码) 3: Screen video 4: On2 VP6 5: On2 VP6 with alpha channel 6: Screen video version 2
//—————
视频数据
If CodecID = 2 H263VIDEOPACKET If CodecID = 3 SCREENVIDEOPACKET If CodecID = 4 VP6FLVVIDEOPACKET If CodecID = 5 VP6FLVALPHAVIDEOPAC KET If CodecID = 6 SCREENV2VIDEOPACKET
//——————————————————————————————–
这里说一下Sorenson H.263视频编码以及其数据包:
从swf6开始,flash使用被称作Sorenson H.263的视频编码格式,这种格式基于h.263,一个公开视频编码标准由ITU(国际电信联盟) 提出的.想了解h.263编码格式的朋友可以看 /index.php?_content&task=view&id=123&Itemid=0
但是Sorenson H.263编码和H.263是有差别的: 下面的特性不存在Sorenson H.263中: ■ GOB (group of blocks) layer ■ Split-screen indicator ■ Document camera indicator ■ Picture freeze release ■ Syntax-based arithmetic coding ■ PB frames ■ Continuous-presence multipoint ■ Overlapped pensation 下面的特性是Sorenson H.263增加的: ■ Disposable frames (difference frames with no future dependencies) ■ Arbitrary picture width and height up to 65535 pixels ■ Unrestricted motion vector support is always on ■ A deblocking flag is available to suggest the use of a deblocking filter
//——————————————————————————— H263VIDEOPACKET数据结构:
PictureStartCode UB[17] 和H.263 5.1.1相似 0000 0000 0000 0000 1
Version UB[5] 视频格式版本 Flash Player 6 supports 0 and 1 TemporalReference UB[8] 察看 H.263 5.1.2
PictureSize UB[3] 图像尺寸: 000: custom, 1 byte 001: custom, 2 bytes 010: CIF (352×288) 011: QCIF (176×144) 100: SQCIF (128×96) 101: 320×240 110: 160×120 111: 保留
CustomWidth If PictureSize = 000 UB[8] If PictureSize = 001 UB[16] 否则不存在 注意:UB[16]不一样UI16,这里不是字节交换的 单位是像素
CustomHeight If PictureSize = 000 UB[8] If PictureSize = 001 UB[16] 否则不存在 注意:UB[16]不一样UI16,这里不是字节交换的 单位是像素
PictureType UB[2] 00: intra frame 01: inter frame 10: disposable inter frame 11: reserved DeblockingFlag UB[1] Requests use of deblocking filter (advisory only, Flash Player may ignore) Quantizer UB[5] See H.263 5.1.4 ExtraInformationFlag UB[1] See H.263 5.1.9 ExtraInformation If ExtraInformationFlag = 1 UB[8] Otherwise absent See H.263 5.1.10
The ExtraInformationFlag- ExtraInformation sequence repeats until an ExtraInformationFlag of 0 is encountered
Macroblock MACROBLOCK See following PictureStuffing varies See H.263 5.1.13
//—————————————————————————— 下面的这些数据是视频图像的具体数据,如果想提取图片的话可以研究一下,但我的目的是从中提取视频的舞台大小. 那么CustomWidth和CustomHeight就够了…
至于其它的数据,常用的就是o2 vp6和带alpha通道的o2 vp6格式了.这里就不多提了,我的目的是从flv中提取meta信息,大多的o2 vp6格式的flv已经有了meta信息了…
FLV是一个二进制文件,由文件头(FLV header)和很多tag组成。
tag又可以分成三类:audio,video,script,分别代表音频流,视频流,脚本流(关键字或者文件信息之类)。
详细资料:
/post/flv_format.html
请笑纳...
ucloud6.18推出全球大促活动,针对新老用户(个人/企业)提供云服务器促销产品,其中最低配快杰云服务器月付5元起,中国香港快杰型云服务器月付13元起,最高可购3年,有AMD/Intel系列。当然这都是针对新用户的优惠。注意,UCloud全球有31个数据中心,29条专线,覆盖五大洲,基本上你想要的都能找到。注意:以上ucloud 618优惠都是新用户专享,老用户就随便看看!点击进入:uclou...
星梦云怎么样?星梦云资质齐全,IDC/ISP均有,从星梦云这边租的服务器均可以备案,属于一手资源,高防机柜、大带宽、高防IP业务,一手整C IP段,四川电信,星梦云专注四川高防服务器,成都服务器,雅安服务器。星梦云目前夏日云服务器促销,四川100G高防4H4G10M月付仅60元;西南高防月付特价活动,续费同价,买到就是赚到!点击进入:星梦云官方网站地址1、成都电信年中活动机(成都电信优化线路,封锁...
Digital-VM商家的暑期活动促销,这个商家提供有多个数据中心独立服务器、VPS主机产品。最低配置月付80美元,支持带宽、流量和IP的自定义配置。Digital-VM,是2019年新成立的商家,主要从事日本东京、新加坡、美国洛杉矶、荷兰阿姆斯特丹、西班牙马德里、挪威奥斯陆、丹麦哥本哈根数据中心的KVM架构VPS产品销售,分为大硬盘型(1Gbps带宽端口、分配较大的硬盘)和大带宽型(10Gbps...