Package org.nuxeo.ecm.platform.video
Class VideoHelper
- java.lang.Object
-
- org.nuxeo.ecm.platform.video.VideoHelper
-
public class VideoHelper extends Object
Helper class to factorize logic than can be either called from the UI or from core event listener.If the need to evolve to make this further configurable (not just using the existing converter / commandline extensions points), we might want to turn this class into a full blown nuxeo service.
- Author:
- ogrisel
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MIN_DURATION_FOR_STORYBOARDstatic intDEFAULT_NUMBER_OF_THUMBNAILSstatic intDEFAULT_TX_TIMEOUT_SECONDSstatic StringFFMPEG_INFO_COMMAND_LINEstatic Loglogstatic StringMISSING_PREVIEW_PICTUREprotected static List<Map<String,Object>>THUMBNAILS_VIEWSstatic StringVIDEO_TX_TIMEOUT_PROPERTY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetTransactionTimeout()Transaction timeout for video conversion in seconds.static VideoInfogetVideoInfo(Blob video)static voidnewTransaction()Commits and starts a new transaction with a custom timeout.static voidupdatePreviews(DocumentModel docModel, Blob video)Update the JPEG previews of a Video document from the video blob content by taking a screen-shot of the movie.static voidupdatePreviews(DocumentModel docModel, Blob video, Double position, List<Map<String,Object>> templates)Update the JPEG previews of a Video document from the video blob content by taking a screen-shot of the movie at timecode offset given in seconds.static voidupdateStoryboard(DocumentModel docModel, Blob video)Update the JPEG story board and duration in seconds of a Video document from the video blob content.static voidupdateVideoInfo(DocumentModel docModel, Blob video)
-
-
-
Field Detail
-
log
public static final Log log
-
MISSING_PREVIEW_PICTURE
public static final String MISSING_PREVIEW_PICTURE
- See Also:
- Constant Field Values
-
FFMPEG_INFO_COMMAND_LINE
public static final String FFMPEG_INFO_COMMAND_LINE
- See Also:
- Constant Field Values
-
VIDEO_TX_TIMEOUT_PROPERTY
public static final String VIDEO_TX_TIMEOUT_PROPERTY
- Since:
- 11.5
- See Also:
- Constant Field Values
-
DEFAULT_TX_TIMEOUT_SECONDS
public static final int DEFAULT_TX_TIMEOUT_SECONDS
- Since:
- 11.5
- See Also:
- Constant Field Values
-
DEFAULT_MIN_DURATION_FOR_STORYBOARD
public static final int DEFAULT_MIN_DURATION_FOR_STORYBOARD
- Since:
- 7.4
- See Also:
- Constant Field Values
-
DEFAULT_NUMBER_OF_THUMBNAILS
public static final int DEFAULT_NUMBER_OF_THUMBNAILS
- Since:
- 7.4
- See Also:
- Constant Field Values
-
-
Method Detail
-
updateStoryboard
public static void updateStoryboard(DocumentModel docModel, Blob video)
Update the JPEG story board and duration in seconds of a Video document from the video blob content.
-
updatePreviews
public static void updatePreviews(DocumentModel docModel, Blob video, Double position, List<Map<String,Object>> templates) throws IOException
Update the JPEG previews of a Video document from the video blob content by taking a screen-shot of the movie at timecode offset given in seconds.- Throws:
IOException
-
updatePreviews
public static void updatePreviews(DocumentModel docModel, Blob video) throws IOException
Update the JPEG previews of a Video document from the video blob content by taking a screen-shot of the movie.- Throws:
IOException
-
updateVideoInfo
public static void updateVideoInfo(DocumentModel docModel, Blob video)
-
newTransaction
public static void newTransaction()
Commits and starts a new transaction with a custom timeout.- Since:
- 11.5
-
getTransactionTimeout
public static int getTransactionTimeout()
Transaction timeout for video conversion in seconds.- Since:
- 11.5
-
-