flvmeta(1) | flvmeta(1) |
flvmeta - manipulate or extract metadata in Adobe Flash Video files
flvmeta INPUT_FILE
flvmeta INPUT_FILE OUTPUT_FILE
flvmeta -D|--dump [options] INPUT_FILE
flvmeta -F|--full-dump [options] INPUT_FILE
flvmeta -C|--check [options] INPUT_FILE
flvmeta -U|--update [options] INPUT_FILE [OUTPUT_FILE]
flvmeta is a command-line utility aimed at manipulating Adobe(tm) Flash Video files (FLV), through several commands, only one of which can be used for each invocation of the program.
It possesses the ability to compute and inject a variety of values in the onMetaData event tag, including keyframe indices used by most video players to allow random-access seeking, notably for HTTP pseudo-streamed files via a server-side module, by having the client send the file offset looked up for the nearest desired keyframe.
Tools such as flvmeta must be used in the case the initial encoding process is unable to inject those metadata.
It can also optionnally inject the onLastSecond event, used to signal the end of playback, for example to revert the player software to a `stopped' state.
flvmeta also has the ability to dump metadata and full file information to standard output, in a variety of textual output formats, including XML, YAML, and JSON.
Finally, the program can analyze FLV files to detect potential problems and errors, and generate a textual report as a raw format, as JSON, or as XML. It has the ability to detect more than a hundred problems, going from harmless to potentially unplayable, using a few real world encountered issues.
flvmeta can operate on arbitrarily large files, and can handle FLV files using extended (32-bit) timestamps. It can guess video frame dimensions for all known video codecs supported by the official FLV specification.
Its memory usage remains minimal, as it uses a two-pass reading algorithm which permits the computation of all necessary tags without loading anything more than the file's tags headers in memory.
Only one command can be specified for an invocation of flvmeta. The chosen command determines the mode of execution of the program.
By default, if no command is specified, flvmeta will implicitly choose the command to use according to the presence of INPUT_FILE and OUTPUT_FILE.
If only INPUT_FILE is present, the --dump command will be executed.
If both INPUT_FILE and OUTPUT_FILE are present, the --update command will be executed.
Here is a list of the supported commands:
Dump a textual representation of the first onMetaData tag found in INPUT_FILE to standard output. The default format is XML, unless specified otherwise.
It is also possible to specify another event via the --event option, such as onLastSecond.
Dump a textual representation of the whole contents of INPUT_FILE to standard output. The default format is XML, unless specified otherwise.
Print a report to standard output listing warnings and errors detected in INPUT_FILE, as well as potential incompatibilities, and information about the codecs used in the file. The exit code will be set to a non-zero value if there is at least one error in the file.
The output format can either be plain text, XML using the --xml option, or JSON using the --json option. It can also be disabled altogether using the --quiet option if you are only interested in the exit status.
Messages are divided into four specific levels of increasing importance:
The --level option allows flvmeta to limit the display of messages to a minimum level among those, for example if the user is only interested in error messages and above.
Each message or message template presented to the user is identified by a specific code of the following format:
[level][topic][id]
Messages can be related to the following topics :
For example, represents a Warning in topic 51 with the id 050, which represents a warning message related to audio codecs, in that case to signal that an audio tag has an unknown codec.
Update the given input file by inserting a computed onMetaData tag. If OUTPUT_FILE is specified, it will be created or overwritten instead and the input file will not be modified. If the original file is to be updated, a temporary file will be created in the default temp directory of the platform, and it will be copied over the original file at the end of the operation. This is due to the fact that the output file is written while the original file is being read due to the two-pass method.
The computed metadata contains among other data full keyframe information, in order to allow HTTP pseudo-streaming and random-access seeking in the file.
By default, an onLastSecond tag will be inserted, unless the --no-last-second option is specified.
Normally overwritten by the update process, the existing metadata found in the input file can be preserved by the --preserve option.
It is also possible to insert custom string values with the --add option, which can be specified multiple times.
By default, the update operation is performed without output, unless the --verbose option is specified, or the --print-metadata is used to print the newly written metadata to the standard output.
The various XML formats used by flvmeta are precisely described by the following XSD schemas:
flvmeta example.flv
Prints the onMetadata tag contents of example.flv as XML output.
flvmeta example.flv out.flv
Creates a file named out.flv containing updated metadata and an onLastSecond tag from the exemple.flv file.
flvmeta --check --xml --level=error example.flv
Checks the validity of the example.flv file and prints the error report to stdout in XML format, displaying only errors and fatal errors.
flvmeta --full-dump --yaml example.flv
Prints the full contents of example.flv as YAML format to stdout.
flvmeta --update --no-last-second --show-metadata --json example.flv
Performs an in-place update of example.flv by inserting computed onMetadata without an onLastSecond tag, and prints the newly inserted metadata on stdout as JSON.
flvmeta does not support encrypted FLV files yet.
Marc Noirot <marc.noirot@gmail.com>
Copyright 2007-2016 Marc Noirot
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Please report bugs to <flvmeta-discussion@googlegroups.com>
January 2014 | flvmeta user manual |