视频元数据metaData 视频元信息

  • duration: (Number) Length of the FLV in seconds. FLVMDI computes this value.
  • lasttimestamp: (Number) TimeStamp of the last tag in the FLV file.
  • lastkeyframetimestamp: (Number) TimeStamp of the last video tag which is a key frame. This info might be needed because seeking a frame after this time usually does not work.
  • width: (Number) Width of the video in pixels. (Flash exporter 1.1 sets this to 0).
  • height: (Number) Height of the video in pixels. (Flash exporter 1.1 sets this to 0).
  • videodatarate: (Number) FLVMDI does not compute this value and imports it if present. (Defaults to 0).
  • audiodatarate: (Number) FLVMDI does not compute this value and imports it if present. (Defaults to 0).
  • framerate: (Number) FLVMDI computes this value, but uses imported value if not 0.
  • creationdate: (String) FLVMDI cannot compute this value and imports it if present. (Defaults to 'unknown').
  • filesize: (Number) Filesize in bytes (including the injected data).
  • videosize: (Number) Total size of video tags in the file in bytes.
  • audiosize: (Number) Total size of audio tags in the file in bytes.
  • datasize: (Number) Total size of data tags in the file in bytes.
  • metadatacreator: (String) Will be set to 'Manitu Group FLV MetaData Injector 2'.
  • metadatadate: (Date) Date and time metadata added. (Note that this is not of type string like 'creationdate').
  • xtradata: (string) Additional string data if specified.
  • videocodecid: (Number) Video codec ID number used in the FLV. (Sorenson H.263 =2, Screen Video =3, On2 VP6 = 4 and 5, Screen Video V2 = 6).
  • audiocodecid: (Number) Audio codec ID number used in the FLV. (Uncompressed = 0, ADPCM = 1, MP3 = 2, NellyMoser = 5 and 6).
  • audiodelay:(Number) Audio delay in seconds. Flash 8 encoder delays the video forbetter synch with audio (Audio and video does not start both at time 0,Video starts a bit later). This value is also important for Flash 8Video Encoder injected Cue Points, because logical time of the cuepoints does not correspond to physical time they are inserted in theFLV. (Cue points are injected before encoding, when the video isshifted by 'audio delay' seconds, cue points are also shifted and theirphysical time in the FLV changes).
  • canSeekToEnd: (Boolean) True if the last video tag is a key frame and hence can be 'seek'ed.
  • keyframes: (Object) 

 

  • 持续时间:(数字)FLV的长度(以秒为单位)。FLVMDI计算此值。
  • lasttimestamp:(数字)FLV文件中最后一个标记的时间戳。
  • lastkeyframetimestamp:(数字)最后一个视频标记的时间戳,它是关键帧。可能需要此信息,因为在此时间之后搜索帧通常不起作用。
  • 宽度:(数字)视频的宽度(以像素为单位)(Flash exporter 1.1将其设置为0)。
  • 高度:(数字)视频的高度(以像素为单位)(Flash exporter 1.1将其设置为0)。
  • videodatarate:(数字)FLVMDI不计算此值,如果存在,则将其导入(默认值为0)。
  • audiodatarate:(数字)FLVMDI不计算此值,如果存在,则将其导入(默认值为0)。
  • 帧率:(数字)FLVMDI计算此值,但如果不是0,则使用导入的值。
  • creationdate:(字符串)FLVMDI无法计算此值并导入它(如果存在)(默认为“未知”)。
  • filesize:(Number)文件大小(以字节为单位)(包括注入的数据)。
  • videosize:(数字)文件中视频标记的总大小(字节)。
  • audiosize:(数字)文件中音频标记的总大小(字节)。
  • datasize:(Number)文件中数据标记的总大小(以字节为单位)。
  • metadatacreator:(字符串)将设置为“Manitu组FLV元数据注入器2”。
  • metadatadate:(日期)添加了日期和时间元数据(请注意,这不是类似于“creationdate”的字符串类型。
  • xtradata:(字符串)如果指定,则附加字符串数据。
  • VideoCodeId:(编号)FLV中使用的视频编解码器ID编号(Sorenson H.263=2,屏幕视频=3,On2 VP6=4和5,屏幕视频V2=6)。
  • audiocodecid:(编号)FLV中使用的音频编解码器ID编号(未压缩=0,ADPCM=1,MP3=2,Nellymore=5和6)。
  • 音频延迟:(数字)以秒为单位的音频延迟。Flash 8编码器延迟视频预编器与音频同步(音频和视频不会在时间0同时启动,视频启动稍晚)。该值对于Flash 8Video编码器注入的提示点也很重要,因为提示点的逻辑时间和它们插入LF的物理时间不一致(在编码之前注入提示点,当视频被“音频延迟”秒移位时,提示点也被移位,并且它们在FLV中的物理时间发生变化)。
  • canSeekToEnd:(布尔)如果最后一个视频标记是关键帧,因此可以进行“搜索”,则为True。
  • 关键帧:(对象)

[ 视频安全 ] 相关原创文章

[ 视频直播 ] 相关原创文章

[ 视频存储与应用 ] 相关原创文章

[ 视频播放器 ] 相关文章

[ WebRTC ] 相关文章

[ 谷歌浏览器 ] 相关文章

[ 微信公众号运营 ] 相关文章

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在WebRTC中为视频帧添加元数据信息可以通过以下步骤实现: 1. 使用getUserMedia()方法获取视频流。 2. 将视频流添加到RTCPeerConnection中。 3. 使用Canvas绘制视频帧,并在Canvas上添加元数据信息。例如,在Canvas上使用JavaScript代码添加文本或图像等信息。 4. 使用Canvas的toDataURL()方法将Canvas中的内容转换为Base64编码的图像数据。 5. 将Base64编码的图像数据作为元数据添加到视频帧中。可以使用WebRTC的RTCRtpSender对象的send()方法将视频帧发送到远端。 以下是示例代码: ```javascript // 获取视频流 navigator.mediaDevices.getUserMedia({ video: true }) .then(function(stream) { // 将视频流添加到RTCPeerConnection中 var pc = new RTCPeerConnection(); pc.addStream(stream); // 获取视频轨道 var videoTrack = stream.getVideoTracks()[0]; // 创建Canvas素 var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); // 监听视频轨道的onended事件 videoTrack.onended = function() { pc.close(); }; // 监听视频轨道的onactive事件 videoTrack.onactive = function() { // 每隔一段时间处理一帧视频 setInterval(function() { // 绘制视频帧到Canvas上 ctx.drawImage(video, 0, 0, canvas.width, canvas.height); // 在Canvas上添加元数据信息 ctx.fillText('This is a test', 10, 10); // 将Canvas中的内容转换为Base64编码的图像数据 var imageData = canvas.toDataURL('image/png'); // 将元数据信息添加到视频帧中 var frame = new VideoFrame(videoTrack, { width: canvas.width, height: canvas.height, timestamp: performance.now(), data: { metadata: imageData } }); // 将视频帧发送到远端 var sender = pc.getSenders().find(function(s) { return s.track === videoTrack; }); sender.send(frame); }, 1000 / 30); // 每秒30帧 }; }) .catch(function(error) { console.error(error); }); ``` 上述代码仅供参考,具体实现方式可能因应用场景而异。另外,需要注意的是,添加元数据信息可能会增加视频帧的大小,从而影响视频传输的性能。因此,需要根据实际情况进行优化。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值