public class FFAudioFileReader extends AudioFileReader
AudioFileFormat instance.| Constructor and Description |
|---|
FFAudioFileReader()
Creates a new
FFAudioFileReader. |
| Modifier and Type | Method and Description |
|---|---|
AudioFileFormat |
getAudioFileFormat(File file) |
AudioFileFormat |
getAudioFileFormat(InputStream stream) |
AudioFileFormat |
getAudioFileFormat(URL url) |
AudioFileFormat[] |
getAudioFileFormats(File file)
Returns one or more
AudioFileFormats for the given file. |
AudioFileFormat[] |
getAudioFileFormats(InputStream stream)
Returns all
AudioFileFormats detected in the given stream. |
AudioFileFormat[] |
getAudioFileFormats(URL url)
Returns one or more
AudioFileFormats for the given file. |
AudioInputStream |
getAudioInputStream(File file) |
AudioInputStream |
getAudioInputStream(File file,
int streamIndex)
Allows you to open a specific audio stream from the given file.
|
AudioInputStream |
getAudioInputStream(File file,
int streamIndex,
int fileBufferSize)
Allows you to open a specific audio stream from the given file with an explicit file I/O buffer
size.
|
AudioInputStream |
getAudioInputStream(InputStream stream) |
AudioInputStream |
getAudioInputStream(InputStream stream,
int streamIndex)
Allows you to open a specific audio stream from the given stream.
|
AudioInputStream |
getAudioInputStream(URL url) |
AudioInputStream |
getAudioInputStream(URL url,
int streamIndex)
Allows you to open a specific audio stream from the given URL.
|
AudioInputStream |
getAudioInputStream(URL url,
int streamIndex,
int fileBufferSize)
Allows you to open a specific audio stream from the given URL with an explicit file I/O buffer
size.
|
public AudioFileFormat[] getAudioFileFormats(InputStream stream) throws UnsupportedAudioFileException, IOException
AudioFileFormats detected in the given stream. The stream must support
InputStream.mark(int).stream - mark-supporting input stream to probeUnsupportedAudioFileException - if the stream cannot be recognised as a supported formatIOException - if an I/O error occurs or the stream does not support markpublic AudioFileFormat getAudioFileFormat(InputStream stream) throws UnsupportedAudioFileException, IOException
getAudioFileFormat in class AudioFileReaderUnsupportedAudioFileExceptionIOExceptionpublic AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException
getAudioFileFormat in class AudioFileReaderUnsupportedAudioFileExceptionIOExceptionpublic AudioFileFormat[] getAudioFileFormats(File file) throws UnsupportedAudioFileException, IOException
AudioFileFormats for the given file. Multiple objects are returned,
if the file contains multiple streams, e.g. for STEM files.file - fileAudioFileFormats for the given URLUnsupportedAudioFileException - if the audio is not supportedIOException - if an IO error occursgetAudioFileFormat(File)public AudioFileFormat[] getAudioFileFormats(URL url) throws UnsupportedAudioFileException, IOException
AudioFileFormats for the given file. Multiple objects are returned,
if the file contains multiple streams, e.g. for Stem files.url - urlAudioFileFormats for the given URLUnsupportedAudioFileException - if the audio is not supportedIOException - if an IO error occursgetAudioFileFormat(URL)public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException
getAudioFileFormat in class AudioFileReaderUnsupportedAudioFileExceptionIOExceptionpublic AudioInputStream getAudioInputStream(InputStream stream) throws UnsupportedAudioFileException, IOException
getAudioInputStream in class AudioFileReaderUnsupportedAudioFileExceptionIOExceptionpublic AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException
getAudioInputStream in class AudioFileReaderUnsupportedAudioFileExceptionIOExceptionpublic AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException
getAudioInputStream in class AudioFileReaderUnsupportedAudioFileExceptionIOExceptionpublic AudioInputStream getAudioInputStream(InputStream stream, int streamIndex) throws UnsupportedAudioFileException, IOException
stream - streamstreamIndex - audio stream indexUnsupportedAudioFileException - if the audio is not supportedIOException - if an IO error occursIndexOutOfBoundsException - if the index is not valid.getAudioInputStream(URL),
getAudioInputStream(File, int)public AudioInputStream getAudioInputStream(URL url, int streamIndex) throws UnsupportedAudioFileException, IOException
The FFmpeg file I/O buffer size is determined by the system property, falling back to FFURLInputStream.DEFAULT_FILE_BUFFER_SIZE if the property is not set.
url - urlstreamIndex - audio stream indexUnsupportedAudioFileException - if the audio is not supportedIOException - if an IO error occursIndexOutOfBoundsException - if the index is not valid.getAudioInputStream(URL),
getAudioInputStream(File, int),
getAudioInputStream(URL, int, int)public AudioInputStream getAudioInputStream(URL url, int streamIndex, int fileBufferSize) throws UnsupportedAudioFileException, IOException
The fileBufferSize controls the size of the FFmpeg internal read buffer, passed as
AVFormatContext.io_buffer_size. Larger values reduce system-call overhead and improve
throughput for bulk transcoding or analysis at the cost of higher per-stream memory use. Use
FFURLInputStream.DEFAULT_FILE_BUFFER_SIZE (1 MB) as a baseline for bulk work.
url - urlstreamIndex - audio stream indexfileBufferSize - FFmpeg file I/O buffer size in bytes; must be positiveUnsupportedAudioFileException - if the audio is not supportedIOException - if an IO error occursIndexOutOfBoundsException - if the index is not valid.IllegalArgumentException - if fileBufferSize is not positivegetAudioInputStream(URL, int),
FFURLInputStream.DEFAULT_FILE_BUFFER_SIZE,
FFURLInputStream.FILE_BUFFER_SIZE_PROPERTYpublic AudioInputStream getAudioInputStream(File file, int streamIndex) throws UnsupportedAudioFileException, IOException
The FFmpeg file I/O buffer size is determined by the system property, falling back to FFURLInputStream.DEFAULT_FILE_BUFFER_SIZE if the property is not set.
file - filestreamIndex - audio stream indexUnsupportedAudioFileException - if the audio is not supportedIOException - if an IO error occursIndexOutOfBoundsException - if the index is not valid.getAudioInputStream(URL, int),
getAudioInputStream(File),
getAudioInputStream(File, int, int)public AudioInputStream getAudioInputStream(File file, int streamIndex, int fileBufferSize) throws UnsupportedAudioFileException, IOException
The fileBufferSize controls the size of the FFmpeg internal read buffer, passed as
AVFormatContext.io_buffer_size. Larger values reduce system-call overhead and improve
throughput for bulk transcoding or analysis at the cost of higher per-stream memory use. Use
FFURLInputStream.DEFAULT_FILE_BUFFER_SIZE (1 MB) as a baseline for bulk work.
file - filestreamIndex - audio stream indexfileBufferSize - FFmpeg file I/O buffer size in bytes; must be positiveUnsupportedAudioFileException - if the audio is not supportedIOException - if an IO error occursIndexOutOfBoundsException - if the index is not valid.IllegalArgumentException - if fileBufferSize is not positivegetAudioInputStream(File, int),
getAudioInputStream(URL, int, int),
FFURLInputStream.DEFAULT_FILE_BUFFER_SIZE,
FFURLInputStream.FILE_BUFFER_SIZE_PROPERTYCopyright © 2013–2026 Jalulo UG (haftungsbeschränkt). All rights reserved.