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 Details

    • MISSING_PREVIEW_PICTURE

      public static final String MISSING_PREVIEW_PICTURE
      See Also:
    • FFMPEG_INFO_COMMAND_LINE

      public static final String FFMPEG_INFO_COMMAND_LINE
      See Also:
    • VIDEO_TX_TIMEOUT_PROPERTY

      public static final String VIDEO_TX_TIMEOUT_PROPERTY
      Since:
      11.5
      See Also:
    • DEFAULT_TX_TIMEOUT_SECONDS

      public static final int DEFAULT_TX_TIMEOUT_SECONDS
      Since:
      11.5
      See Also:
    • DEFAULT_MIN_DURATION_FOR_STORYBOARD

      public static final int DEFAULT_MIN_DURATION_FOR_STORYBOARD
      Since:
      7.4
      See Also:
    • DEFAULT_NUMBER_OF_THUMBNAILS

      public static final int DEFAULT_NUMBER_OF_THUMBNAILS
      Since:
      7.4
      See Also:
    • THUMBNAILS_VIEWS

      protected static final List<Map<String,Object>> THUMBNAILS_VIEWS
  • Method Details

    • 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)
    • getVideoInfo

      public static VideoInfo getVideoInfo(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