yamdi
Yet Another MetaData Injector for FLV
2012-12-09: 1.9
* [Fix] VP6 width/height detection
* [Fix] Interpreting invalid data as FLV tag
2011-02-26: 1.8
* [Add] Replace input file with output file with -w
* [Add] Keyframes for audio only files with -a
2010-12-27: 1.7
* [Fix] off-by-one bug while indexing an FLV file
2010-10-17: 1.6
* [Fix] Large file support
* [Fix] VP62 occasional wrong width/height detection [jgreer-zencoder]
* [Add] onLastKeyframe event with -k
* [Add] onLastSecond event with -s. -l deprecated
* [Add] Strip all metadata with -M
* [Add] Omit the keyframes tag in the XML output with -X.
2010-04-03: 1.5
* [Fix] Segfault on empty files under *nix [zas_]
* [Fix] VP62 occasional zero height [xtat]
* [Add] AVC/H.264 support
* [Add] Input file can be read from stdin
* [Fix] VP6 width/height detection
* [Fix] Interpreting invalid data as FLV tag
2011-02-26: 1.8
* [Add] Replace input file with output file with -w
* [Add] Keyframes for audio only files with -a
2010-12-27: 1.7
* [Fix] off-by-one bug while indexing an FLV file
2010-10-17: 1.6
* [Fix] Large file support
* [Fix] VP62 occasional wrong width/height detection [jgreer-zencoder]
* [Add] onLastKeyframe event with -k
* [Add] onLastSecond event with -s. -l deprecated
* [Add] Strip all metadata with -M
* [Add] Omit the keyframes tag in the XML output with -X.
2010-04-03: 1.5
* [Fix] Segfault on empty files under *nix [zas_]
* [Fix] VP62 occasional zero height [xtat]
* [Add] AVC/H.264 support
* [Add] Input file can be read from stdin
yamdi stands for Yet Another MetaData Injector and is a metadata injector for FLV files.
It adds the onMetaData event to your FLV files. yamdi should run under *BSD, Linux and Windows
and is published under the BSD license.
Examples:
yamdi injects the following event into your FLV files:
features?
Some key features of yamdi are:- large file support
- H.264 support
- onMetaData, onLastSecond, onLastKeyframe events
- low memory footprint
- XML metadata output
- ...
how?
Download the source code from SourceForge.net and extract it with tar:
tar xzf yamdi-1.9.tar.gz
Change into the yamdi directory and compile the source code with:
cd yamdi-1.9
gcc yamdi.c -o yamdi -O2 -Wall
yamdi accepts these paramters:
-i | The source FLV file. If the file name is '-' the input file will be read from stdin. Use the -t option to specify a temporary file. |
-o | The resulting FLV file with the metatags. If the output file is '-' the FLV file will be written to stdout. |
-x | An XML file with the resulting metadata information. If the output file is ommited, only metadata will be generated. This parameter is optional. |
-t | A temporary file to store the source FLV file in if the input file is read from stdin. |
-c | A string that will be written into the creator tag. This parameter is optional. |
-s | Adds the onLastSecond event. |
-k | Adds the onLastKeyframe event. |
-M | Strip all metadata from the FLV. The -s and -k options will be ignored. |
-X | Omit the keyframes tag in the XML output. |
-a | Time in milliseconds between keyframes if there is only audio. This option will be ignored if there is a video stream. No keyframes will be added if this option is omitted. |
-w | Replace the input file with the output file. -i and -o are required to be different files otherwise this option will be ignored. |
-h | Displays a description of the available parameters |
yamdi -i sample.flv -o sample_with_metadata.flv
yamdi -i sample.flv -o - > sample_with_metadata.flv
yamdi -i sample.flv -o sample_with_metadata.flv -c "John Doe"
what do i get?
yamdi injects the following metadata into your FLV files:- creator
- metadatacreator
- hasKeyframes
- hasVideo
- hasAudio
- hasMetaData
- canSeekToEnd
- duration
- datasize
- videosize
- videocodecid
- audiosize
- audiocodecid
- audiosamplerate
- audiosamplesize
- stereo
- filesize
- lasttimestamp
- lastkeyframetimestamp
- lastkeyframelocation
- keyframes (filepositions, times)
- width
- height
- framerate
- videodatarate
- audiodatarate
yamdi injects the following event into your FLV files:
- onMetaData
- onLastSecond
- onLastKeyframe
why?
For a project I had to add metadata to quite large FLV files (over 1GB). The other known free tools (flvmdi and flvtool2) are not suitable for that job because they read the whole file into memory. Because I'm not very familiar with ruby (in order to modify flvtool2) and flvmdi is not open source I took the FLV specs and implemented a metadata injector in C. yamdi uses less memory and is faster.bugs?
I do not guarantee that yamdi is free of bugs. If you find a bug you can post it here.
© 2007+, Ingo Oppermann. All rights reserved.