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 int
DEFAULT_MIN_DURATION_FOR_STORYBOARD
static int
DEFAULT_NUMBER_OF_THUMBNAILS
static int
DEFAULT_TX_TIMEOUT_SECONDS
static String
FFMPEG_INFO_COMMAND_LINE
static Log
log
static String
MISSING_PREVIEW_PICTURE
protected static List<Map<String,Object>>
THUMBNAILS_VIEWS
static String
VIDEO_TX_TIMEOUT_PROPERTY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getTransactionTimeout()
Transaction timeout for video conversion in seconds.static VideoInfo
getVideoInfo(Blob video)
static void
newTransaction()
Commits and starts a new transaction with a custom timeout.static void
updatePreviews(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 void
updatePreviews(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 void
updateStoryboard(DocumentModel docModel, Blob video)
Update the JPEG story board and duration in seconds of a Video document from the video blob content.static void
updateVideoInfo(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
-
-