Class FFmpegUtil
- java.lang.Object
-
- org.silverpeas.core.util.exec.ExternalExecution
-
- org.silverpeas.core.io.media.video.ffmpeg.FFmpegUtil
-
public class FFmpegUtil extends ExternalExecution
This class wrapp FFmpeg command line execution.ffmpeg -ss $i*$interval -i /path/to/video.mov -vframes 1 -filter:v scale="600:-1" /path/to/thumbnail_$i.jpg
- Author:
- ebonnet
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.silverpeas.core.util.exec.ExternalExecution
ExternalExecution.Config
-
-
Constructor Summary
Constructors Constructor Description FFmpegUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>
extractVideoThumbnail(File videoFile, File outputFile, double position)
Extracts a frame of the specified video at the given position and stores the obtained image into the specified output file.static boolean
isActivated()
-
Methods inherited from class org.silverpeas.core.util.exec.ExternalExecution
exec, exec
-
-
-
-
Method Detail
-
isActivated
public static boolean isActivated()
-
extractVideoThumbnail
public static List<String> extractVideoThumbnail(File videoFile, File outputFile, double position)
Extracts a frame of the specified video at the given position and stores the obtained image into the specified output file. The type of the image is get from the output file extension.- Parameters:
videoFile
- the file containing the video.outputFile
- the file into which will be registered the extracted thumbnail.position
- the position of the frame in the video from which a thumbnail will be extracted. Note that in most formats it is not possible to seek exactly, so the extraction will seek to the closest seek point before the given position.- Returns:
- a
List
of console lines written by the image extraction command.
-
-