121
Tika Flv File Extraction
To extract flv file, Tika provides FLVParser class. This class is used to extract content and metadata from the .flv file. It is located into the org.apache.tika.parser.video package and contains various constructors and methods that are tabled below.
Tika FLVParser Constructor
Constructor | Description |
---|---|
public FLVParser() | It is used to instantiate FLVParser class. |
Tika FLVParser Methods
Method | Description |
---|---|
public Set<MediaType> getSupportedTypes(ParseContext context)0 | It returns the set of media types supported by this parser when used with the given parse context. |
public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException | It parses a document stream into a sequence of XHTML SAX events. It throws IOException,SAXException, TikaException. |
Tika Flv File Extraction Example
In the following example, we are extracting content and metadata from .flv file. See the example.
Output:
Document Content: Document Metadata: hasVideo: true hasAudio: true framerate: 24.0 audiodatarate: 51.421875 audiocodecid: 2.0 videodatarate: 781.25 audiosamplesize: 16.0 audiosamplerate: 22050.0 filesize: 90580.0 duration: 1.167 videocodecid: 2.0 stereo: false width: 170.0 Content-Type: video/x-flv height: 120.0
Next Topic#