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