public MultimediaInfo getInfo ( ) throws InputFormatException , EncoderException { if ( inputFile . canRead ( ) ) { FFMPEGExecutor ffmpeg = locator . createExecutor ( ) ; ffmpeg . addArgument ( "-i" ) ; ffmpeg . addArgument ( inputFile . getAbsolutePath ( ) ) ; try { ffmpeg . execute ( ) ; } catch ( IOException e ) { throw new EncoderException ( e ) ; } try { RBufferedReader reader = new RBufferedReader ( new InputStreamReader ( ffmpeg . getErrorStream ( ) ) ) ; return parseMultimediaInfo ( inputFile , reader ) ; } finally { ffmpeg . destroy ( ) ; } } else { throw new EncoderException ( "Input file not found <" + inputFile . getAbsolutePath ( ) + ">" ) ; } }
Returns a set informations about a multimedia file if its format is supported for decoding .