Class DefaultFFMPEGLocator
java.lang.Object
ws.schild.jave.process.ffmpeg.DefaultFFMPEGLocator
- All Implemented Interfaces:
ProcessLocator
The default ffmpeg executable locator, which exports on disk the ffmpeg
executable bundled with the library distributions. It should work both for
windows and many linux distributions. If it doesn't, try compiling your own
ffmpeg executable and plug it in JAVE with a custom
FFMPEGProcess-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIt builds the default FFMPEGLocator, exporting the ffmpeg executable on a temp file. -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancopy(InputStream source, String destination) Copy a file from source to destination.private voidCopies a file bundled in the package to the supplied destination.It returns a brand newProcessWrapper, ready to be used in a ffmpeg call.This method should return the path of a ffmpeg executable suitable for the current machine.
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
path
The ffmpeg executable file path.
-
-
Constructor Details
-
DefaultFFMPEGLocator
public DefaultFFMPEGLocator()It builds the default FFMPEGLocator, exporting the ffmpeg executable on a temp file.
-
-
Method Details
-
getExecutablePath
Description copied from interface:ProcessLocatorThis method should return the path of a ffmpeg executable suitable for the current machine.- Specified by:
getExecutablePathin interfaceProcessLocator- Returns:
- The path of the ffmpeg executable.
-
copyFile
Copies a file bundled in the package to the supplied destination.- Parameters:
path- The name of the bundled file.dest- The destination.- Throws:
RuntimeException- If an unexpected error occurs.
-
copy
Copy a file from source to destination.- Parameters:
source- The name of the bundled file.destination- the destination- Returns:
- True if succeeded , False if not
-
createExecutor
Description copied from interface:ProcessLocatorIt returns a brand newProcessWrapper, ready to be used in a ffmpeg call.- Specified by:
createExecutorin interfaceProcessLocator- Returns:
- A newly instanced
ProcessWrapper, using this locator to call the ffmpeg executable.
-