Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-129863

Cannot show preview for video with only audio

Details

    Description

      Reproducing steps

      1. Start Liferay.
      2. Go to Control Panel > Server Administration > External Services and enable Xuggler. Restart the server. Go back to the same place and check Enable. Save.
      3. Go to Content & Data > Documents and Media.
      4. Click on the + button and File Upload.
      5. Select the attached video file (audio_to_video_20210329.mp4). This is a video file that only contains audio; no image frames. (See note below.)
      6. Publish.
        Expected: The preview for the video is generated successfully and shown, and no errors are shown in the logs.
        Observed: The preview for the video is not shown and the following errors are shown in the logs:
        2021-03-29 14:41:27.038 WARN  [liferay/document_library_video_processor-2][LiferayVideoThumbnailConverter:121] Unable to create thumbnail from specified frame. Will generate thumbnail from the beginning.
        2021-03-29 14:41:27.045 ERROR [liferay/document_library_video_processor-2][VideoProcessorImpl:475] com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.exception.SystemException: java.io.FileNotFoundException: /home/ricardo/Support/servers/masterce/tomcat-9.0.43/temp/liferay/document_thumbnail/39760.1.0.jpg (No such file or directory)
        com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.exception.SystemException: java.io.FileNotFoundException: /home/ricardo/Support/servers/masterce/tomcat-9.0.43/temp/liferay/document_thumbnail/39760.1.0.jpg (No such file or directory)
        	at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateThumbnailXuggler(VideoProcessorImpl.java:405) ~[portal-impl.jar:?]
        	at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideo(VideoProcessorImpl.java:469) [portal-impl.jar:?]
        	at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl.generateVideo(VideoProcessorImpl.java:119) [portal-impl.jar:?]
        	at com.liferay.document.library.kernel.util.VideoProcessorUtil.generateVideo(VideoProcessorUtil.java:36) [portal-kernel.jar:?]
        	at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.generate(VideoProcessorMessageListener.java:32) [portal-impl.jar:?]
        	at com.liferay.portlet.documentlibrary.messaging.BaseProcessorMessageListener.doReceive(BaseProcessorMessageListener.java:36) [portal-impl.jar:?]
        	at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48) [portal-kernel.jar:?]
        	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34) [portal-kernel.jar:?]
        	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74) [portal-kernel.jar:?]
        	at com.liferay.portal.messaging.internal.SerialDestination$1.run(SerialDestination.java:59) [bundleFile:?]
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_282]
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_282]
        	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
        Caused by: com.liferay.portal.kernel.exception.SystemException: java.io.FileNotFoundException: /home/ricardo/Support/servers/masterce/tomcat-9.0.43/temp/liferay/document_thumbnail/39760.1.0.jpg (No such file or directory)
        	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:88) ~[portal-impl.jar:?]
        	at com.liferay.document.library.kernel.store.DLStoreUtil.addFile(DLStoreUtil.java:97) ~[portal-kernel.jar:?]
        	at com.liferay.document.library.kernel.util.DLPreviewableProcessor.addFileToStore(DLPreviewableProcessor.java:231) ~[portal-kernel.jar:?]
        	at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl.storeThumbnailImages(VideoProcessorImpl.java:301) ~[portal-impl.jar:?]
        	at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateThumbnailXuggler(VideoProcessorImpl.java:394) ~[portal-impl.jar:?]
        	... 12 more
        Caused by: java.io.FileNotFoundException: /home/ricardo/Support/servers/masterce/tomcat-9.0.43/temp/liferay/document_thumbnail/39760.1.0.jpg (No such file or directory)
        	at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_282]
        	at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_282]
        	at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[?:1.8.0_282]
        	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:83) ~[portal-impl.jar:?]
        	at com.liferay.document.library.kernel.store.DLStoreUtil.addFile(DLStoreUtil.java:97) ~[portal-kernel.jar:?]
        	at com.liferay.document.library.kernel.util.DLPreviewableProcessor.addFileToStore(DLPreviewableProcessor.java:231) ~[portal-kernel.jar:?]
        	at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl.storeThumbnailImages(VideoProcessorImpl.java:301) ~[portal-impl.jar:?]
        	at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateThumbnailXuggler(VideoProcessorImpl.java:394) ~[portal-impl.jar:?]
        	... 12 more
        

      Note: One way to generate a video file (with mimetype video/mp4) but having only audio is to convert an audio file using ffmpeg -i <audio_file_path> <output_video_file_path>.

      Attachments

        Activity

          People

            jeremy.chen Jeremy Chen
            ricardo.couso Ricardo Couso
            Kiyoshi Lee Kiyoshi Lee
            Ricardo Couso Ricardo Couso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 25 weeks, 3 days ago

              Packages

                Version Package
                7.2.10 DXP FP13
                7.2.X
                7.3.7 CE GA8
                7.3.10 DXP FP2
                7.3.X
                7.4.0 CE GA1 DXP 7,4
                7.4.13 DXP GA1
                Master