com.googlecode.fascinator.transformer.ffmpeg
Class FfmpegInfo

java.lang.Object
  extended by com.googlecode.fascinator.transformer.ffmpeg.FfmpegInfo

public class FfmpegInfo
extends Object

Extract metadata about a media file

Author:
Oliver Lucido

Constructor Summary
FfmpegInfo(Ffmpeg ffmpeg, File inputFile)
          Extract metadata from the given file using the provided FFmpeg object
 
Method Summary
 int getDuration()
          Return the duration of the media
 int getHeight()
          Return the duration of the media
 String getRaw()
          Return the raw ouput that came from the binary
 int getWidth()
          Return the duration of the media
 boolean hasAudio()
          Does the media have audio?
 boolean hasVideo()
          Does the media have video?
 boolean isSupported()
          Is the file format supported?
 String toString()
          Return the processed metadata as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FfmpegInfo

public FfmpegInfo(Ffmpeg ffmpeg,
                  File inputFile)
           throws IOException
Extract metadata from the given file using the provided FFmpeg object

Parameters:
ffmpeg - implementation to used for extract
inputFile - to extract metadata from
Throws:
IOException - if execution failed
Method Detail

getRaw

public String getRaw()
Return the raw ouput that came from the binary

Returns:
String containing the raw output

getDuration

public int getDuration()
Return the duration of the media

Returns:
int duration in seconds

getWidth

public int getWidth()
Return the duration of the media

Returns:
int duration in seconds

getHeight

public int getHeight()
Return the duration of the media

Returns:
int duration in seconds

isSupported

public boolean isSupported()
Is the file format supported?

Returns:
boolean flag if supported

hasAudio

public boolean hasAudio()
Does the media have audio?

Returns:
boolean if media has audio

hasVideo

public boolean hasVideo()
Does the media have video?

Returns:
boolean if media has video

toString

public String toString()
Return the processed metadata as a string

Overrides:
toString in class Object
Returns:
String containing the processed output


Copyright © 2009-2014. All Rights Reserved.