FLVTool2 介绍
FLVTool2是用来操作 FLV 的工具
其命令格式:flvtool2.exe [-ACDPUVaciklnoprstvx]… [-key:value]… in-path|stdin
[out-path|stdout]
如果out-path未定义,则将覆盖原文件,如果指定in-path为目录,out-path应为同一目录,否则将被忽略。
Commands:
-A Adds tags from -t tags-file
-C Cuts file using -i inpoint and -o outpoint
-D Debugs file (writes a lot to stdout)
-H Helpscreen will be shown
-P Prints out meta data to stdout
-U Updates FLV with an onMetaTag event
Switches:
-a Collapse space between cutted regions
-c Compatibility mode calculates some onMetaTag values different
-key:value Key-value-pair for onMetaData tag (overwrites generated values)
-i timestamp Inpoint for cut command in miliseconds
-k Keyframe mode slides onCuePoint(navigation) tags added by the
add command to nearest keyframe position
-l Logs FLV stream reading to stream.log in current directory
-n Number of tag to debug
-o timestamp Outpoint for cut command in miliseconds
-p Preserve mode only updates FLVs that have not been processed
before
-r Recursion for directory processing
-s Simulation mode never writes FLV data to out-path
-t path Tagfile (MetaTags written in XML)
-v Verbose mode
-x XML mode instead of YAML mode
举个简单的例子,新建文本文件,敲入下列内容,另存为.DAT批处理文件
“C:\Program Files\flvtool2.exe” -UPx “C:\in.flv” “C:\out.flv”
运行该批处理文件,将更新(修复)C:\in.flv文件的Meta Data,同时按照XML格式输出Meta Data信息内容到屏幕。