Message Boards

Liferay video testers needed!

thumbnail
Juan Gonzalez P, modified 12 Years ago.

Liferay video testers needed!

Liferay Legend Posts: 3089 Join Date: 10/28/08 Recent Posts
Hi community!

After developing for a while, video support for Liferay has been completed!:

http://issues.liferay.com/browse/LPS-22759

AFAIK, Liferay 6.1 GA is going to be released soon, so we need testers for this new feature.

We need the testers to do these steps:

  • Install Xuggler. Simply download and install Xuggler 3.4 for our environment from this URL:http://www.xuggle.com/xuggler/downloads/
  • Configure Xuggler environment variables. For Tomcat and Linux, simply add these lines to <TOMCAT_HOME>/bin/setenv.sh

    export XUGGLE_HOME=/usr/local/xuggler
    export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH
    export PATH=$XUGGLE_HOME/bin:$PATH

  • Enable Xuggler in Control Panel -> Server Administration->External Services -> Enable Xuggler
  • Upload ANY video type to Documents & Media that exists in this property (portal.properties):

    dl.file.entry.preview.video.mime.types

  • After a while (depending on video size), ensure that video has a thumbnail in Documents & Media and no exception is thrown in logs
  • Ensure that video can be played in Chrome/Chromium, Firefox and IE.
  • Additional checking could be testing in IPhone/Android/IPad.


Please post here your results of your testing. Better test with small videos because if tests fails, video should be send here...

The more video formats/codecs are tested, the better.

Thanks very much!
thumbnail
Tomáš Polešovský, modified 12 Years ago.

RE: Liferay video testers needed!

Liferay Master Posts: 676 Join Date: 2/13/09 Recent Posts
Hi Juan,

I've tried it and it's unbelievable! Work's like a charm!

I tried H264 inside MPEG-4 container (under Ubuntu 10.04, OpenJDK 1.6.0_20) and it works without problem. I've tried 15MB, 75MB and 123MB video. The only problem is encoding speed - I can't imagine to have customers with bigger video library to convert into DL in some reasonable time emoticon

Minor bugs:
* DL displays the films as video/quicktime mime-type, I'm sure its H264 inside MPEG-4
* When I display document detail with video preview, Google Chrome 15.0.xxx loads the HTML and then everything disappears - blank screen. I need to resize browser to make it work (browser repaint). How to reproduce: 1, open incognito mode, 2, inside Document And Media Display list of videos click on video detail 3, page loads and then everything inside page disappears. Displaying the video detail for the 2nd time is OK - maybe problem with loading external CSS/JS files?
* Video preview doesn't react on browser resizing :/, maybe problem of HTML video tag in Chrome?

Just a few notes - for encoding bigger than 3MB videos I had to set:
dl.file.max.size=0
com.liferay.portal.upload.UploadServletRequestImpl.max.size=1024000000


-- tom
thumbnail
Juan Gonzalez P, modified 12 Years ago.

RE: Liferay video testers needed!

Liferay Legend Posts: 3089 Join Date: 10/28/08 Recent Posts
Hi Tomáš,

Glad you like it.

Thanks very very much for your feedback.

Tomáš Polešovský:

I tried H264 inside MPEG-4 container (under Ubuntu 10.04, OpenJDK 1.6.0_20) and it works without problem. I've tried 15MB, 75MB and 123MB video. The only problem is encoding speed - I can't imagine to have customers with bigger video library to convert into DL in some reasonable time emoticon


Yep, there are some tweaks you can do for this. Anyway, H264 has a very good compression, and hence would spend a little more time in creating preview.

One option is to increase video bit rate (increasing size):


dl.file.entry.preview.video.bit.rate


You can "play" with ffmpeg H264 parameters (much t play here):


    xuggler.ffpreset.bf=0
    xuggler.ffpreset.cmp=+chroma
    xuggler.ffpreset.coder=0
    xuggler.ffpreset.flags=+loop
    xuggler.ffpreset.flags2=-wpred-dct8x8+mbtree
    xuggler.ffpreset.i_qfactor=0.71
    xuggler.ffpreset.me_method=umh
    xuggler.ffpreset.me_range=16
    xuggler.ffpreset.qcomp=0.6
    xuggler.ffpreset.qdiff=4
    xuggler.ffpreset.qmin=10
    xuggler.ffpreset.qmax=51
    xuggler.ffpreset.sc_threshold=40
    xuggler.ffpreset.subq=8
    xuggler.ffpreset.trellis=0
    xuggler.ffpreset.wpredp=0


If you want more info search about ffmpeg ffpreset options. Be careful because depending on what you change it won't be playable in IPhone/IPad.


Tomáš Polešovský:

Minor bugs:
* DL displays the films as video/quicktime mime-type, I'm sure its H264 inside MPEG-4

No problem, H264 is taken as video/quicktime AFAIK . Wouldn't worry about this. Anyway, this mime types are obtained from other tool (Apache Tika), which is used for all Documents.

Tomáš Polešovský:

* When I display document detail with video preview, Google Chrome 15.0.xxx loads the HTML and then everything disappears - blank screen. I need to resize browser to make it work (browser repaint). How to reproduce: 1, open incognito mode, 2, inside Document And Media Display list of videos click on video detail 3, page loads and then everything inside page disappears. Displaying the video detail for the 2nd time is OK - maybe problem with loading external CSS/JS files?


Not sure about this. Seems something wrong with Chrome/Chromium the very first time the <video> is loaded. After that, you can load any videos you want without problem (if this isn't the case please tell me).

Tomáš Polešovský:

* Video preview doesn't react on browser resizing :/, maybe problem of HTML video tag in Chrome?


Yep, this is a known problem: http://issues.liferay.com/browse/LPS-23514
Because we have to know the size if using flash fallback player, the size is set on page loading.

Tomáš Polešovský:

Just a few notes - for encoding bigger than 3MB videos I had to set:
dl.file.max.size=0
com.liferay.portal.upload.UploadServletRequestImpl.max.size=1024000000


-- tom


Ups forgot to tell! Preview files are stored in DLStore, so the maximum size is controlled by application.
Taruchit Goyal, modified 5 Years ago.

RE: Liferay video testers needed!

Junior Member Posts: 60 Join Date: 3/16/18 Recent Posts

Hello Juan,

 

I am using Liferay 7, and unable to play .swf format in the video content.
Can you suggest some ways to resolve the same?

Moreover, can you please suggest a way to determine the list of formats supported by printing them in console?

Thanks
Taruchit

thumbnail
Daniel Kempf, modified 12 Years ago.

RE: Liferay video testers needed!

New Member Posts: 15 Join Date: 4/22/11 Recent Posts
In the current trunk source code (r96341) I encounter some troubles converting video files.

In an older Trunk-Version (~ 1mo ago, installed with Social Office 2.0) the Video conversion worked just fine, where now I get the following error when uploading a Quicktime-Video file, which could be conversed in the older trunk version:


ERROR [VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:371)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:391)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:309)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
        at java.lang.Thread.run(Thread.java:662)
java.lang.ExceptionInInitializerError
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)
        at com.xuggle.ferry.NativeLogger.log(NativeLogger.java:105)
        at com.xuggle.xuggler.XugglerJNI.IStreamCoder_decodeVideo(Native Method)
        at com.xuggle.xuggler.IStreamCoder.decodeVideo(IStreamCoder.java:675)
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.decodeVideo(LiferayConverter.java:246)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:237)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:599)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:1)
        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
Caused by: java.lang.IllegalArgumentException: Illegal Load: NaN
        at java.util.Hashtable.<init>(Hashtable.java:157)
        at java.util.Hashtable.<init>(Hashtable.java:175)
        at org.apache.log4j.spi.LoggingEvent.<clinit>(LoggingEvent.java:145)
        ... 12 more
</clinit></init></init>


The xuggle-installation has not changed, neither did the environment variables set in my .profile file:


export XUGGLE_HOME=/usr/local/xuggler
export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH
...
export PATH=$LIFERAY_HOME/bin:$XUGGLE_HOME/bin:$PATH


Though, when I upload a broken .avi file (can be played in MediaPlayer Classic but not in Windows Media Player), the following error is written to the console:


[VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:371)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:391)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:309)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
        at java.lang.Thread.run(Thread.java:662)
17:49:14,493 ERROR [ffmpeg:105] [aac @ 0xb2c86fe0] Too many bits per frame requested
17:49:14,506 WARN  [xuggler:76] Error: could not open codec (../../../../../../../csrc/com/xuggle/xuggler/StreamCoder.cpp:657)
16:49:14,543 ERROR [VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Unable to open coder
com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Unable to open coder
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:602)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:1)
        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
Caused by: java.lang.RuntimeException: Unable to open coder
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.openStreamCoder(LiferayConverter.java:548)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:181)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:599)
        ... 2 more
17:49:16,194 WARN  [LiferayVideoThumbnailConverter:118] Unable to create thumbnail from specified frame. Will generate thumbnail from the beginning.
16:49:16,239 ERROR [VideoProcessor:238] com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Error while seeking file
com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Error while seeking file
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:657)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:1)
        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
Caused by: java.lang.RuntimeException: Error while seeking file
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.rewind(LiferayConverter.java:695)
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.rewind(LiferayConverter.java:675)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoThumbnailConverter.doConvert(LiferayVideoThumbnailConverter.java:123)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoThumbnailConverter.convert(LiferayVideoThumbnailConverter.java:51)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:654)
        ... 2 more
16:49:16,241 ERROR [VideoProcessor:327] com.liferay.portal.kernel.exception.SystemException: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
com.liferay.portal.kernel.exception.SystemException: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateThumbnailXuggler(VideoProcessor.java:252)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:321)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
        at java.lang.Thread.run(Thread.java:662)
Caused by: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
        at com.liferay.portlet.documentlibrary.store.BaseStore.addFile(BaseStore.java:108)
        at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.addFile(StoreProxyImpl.java:52)
        at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.addFile(SafeFileNameStoreWrapper.java:70)
        at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:98)
        at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:171)
        at com.liferay.portlet.documentlibrary.store.DLStoreUtil.addFile(DLStoreUtil.java:186)
        at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.addFileToStore(DLPreviewableProcessor.java:170)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateThumbnailXuggler(VideoProcessor.java:241)
        ... 9 more


Also, the current trunk version of liferay did not include the "Video" file type in document library portlet. Wondering where this comes from...
thumbnail
Juan Gonzalez P, modified 12 Years ago.

RE: Liferay video testers needed!

Liferay Legend Posts: 3089 Join Date: 10/28/08 Recent Posts
Daniel Kempf:
In the current trunk source code (r96341) I encounter some troubles converting video files.

In an older Trunk-Version (~ 1mo ago, installed with Social Office 2.0) the Video conversion worked just fine, where now I get the following error when uploading a Quicktime-Video file, which could be conversed in the older trunk version:


ERROR [VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:371)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:391)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:309)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
        at java.lang.Thread.run(Thread.java:662)
java.lang.ExceptionInInitializerError
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)
        at com.xuggle.ferry.NativeLogger.log(NativeLogger.java:105)
        at com.xuggle.xuggler.XugglerJNI.IStreamCoder_decodeVideo(Native Method)
        at com.xuggle.xuggler.IStreamCoder.decodeVideo(IStreamCoder.java:675)
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.decodeVideo(LiferayConverter.java:246)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:237)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:599)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:1)
        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
Caused by: java.lang.IllegalArgumentException: Illegal Load: NaN
        at java.util.Hashtable.<init>(Hashtable.java:157)
        at java.util.Hashtable.<init>(Hashtable.java:175)
        at org.apache.log4j.spi.LoggingEvent.<clinit>(LoggingEvent.java:145)
        ... 12 more
</clinit></init></init>


The xuggle-installation has not changed, neither did the environment variables set in my .profile file:


export XUGGLE_HOME=/usr/local/xuggler
export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH
...
export PATH=$LIFERAY_HOME/bin:$XUGGLE_HOME/bin:$PATH


Though, when I upload a broken .avi file (can be played in MediaPlayer Classic but not in Windows Media Player), the following error is written to the console:


[VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:371)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:391)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:309)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
        at java.lang.Thread.run(Thread.java:662)
17:49:14,493 ERROR [ffmpeg:105] [aac @ 0xb2c86fe0] Too many bits per frame requested
17:49:14,506 WARN  [xuggler:76] Error: could not open codec (../../../../../../../csrc/com/xuggle/xuggler/StreamCoder.cpp:657)
16:49:14,543 ERROR [VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Unable to open coder
com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Unable to open coder
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:602)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:1)
        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
Caused by: java.lang.RuntimeException: Unable to open coder
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.openStreamCoder(LiferayConverter.java:548)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:181)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:599)
        ... 2 more
17:49:16,194 WARN  [LiferayVideoThumbnailConverter:118] Unable to create thumbnail from specified frame. Will generate thumbnail from the beginning.
16:49:16,239 ERROR [VideoProcessor:238] com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Error while seeking file
com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Error while seeking file
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:657)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:1)
        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
Caused by: java.lang.RuntimeException: Error while seeking file
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.rewind(LiferayConverter.java:695)
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.rewind(LiferayConverter.java:675)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoThumbnailConverter.doConvert(LiferayVideoThumbnailConverter.java:123)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoThumbnailConverter.convert(LiferayVideoThumbnailConverter.java:51)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:654)
        ... 2 more
16:49:16,241 ERROR [VideoProcessor:327] com.liferay.portal.kernel.exception.SystemException: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
com.liferay.portal.kernel.exception.SystemException: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateThumbnailXuggler(VideoProcessor.java:252)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:321)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
        at java.lang.Thread.run(Thread.java:662)
Caused by: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
        at com.liferay.portlet.documentlibrary.store.BaseStore.addFile(BaseStore.java:108)
        at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.addFile(StoreProxyImpl.java:52)
        at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.addFile(SafeFileNameStoreWrapper.java:70)
        at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:98)
        at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:171)
        at com.liferay.portlet.documentlibrary.store.DLStoreUtil.addFile(DLStoreUtil.java:186)
        at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.addFileToStore(DLPreviewableProcessor.java:170)
        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateThumbnailXuggler(VideoProcessor.java:241)
        ... 9 more


Also, the current trunk version of liferay did not include the "Video" file type in document library portlet. Wondering where this comes from...


Thanks very much for your testing,

About the first error ("Subprocess terminated with exit code 1..") is an error that appeared after we added fork process to video generation.

I've created an issue for let users configurate this and have the "old" behaviour (same process for video generation).
:

http://issues.liferay.com/browse/LPS-24267

Simply download sources, patch them with file I've attached, and re-test (I've added a parameter to portal.properties "dl.file.entry.preview.video.fork.process" that is false by default). Hopefuly this will be added to sources shortly.


About the second issue, seems bits in audio sample are too high. There is no parameter to configure that in Liferay 6.1 (there are parameters for video streams but not for audio streams), so you would have to convert that file yourself to an audio with less bits per sample.

Please re-test and tell me the results.

Thanks very much!
thumbnail
Daniel Kempf, modified 12 Years ago.

RE: Liferay video testers needed!

New Member Posts: 15 Join Date: 4/22/11 Recent Posts
Your patch works like a charm, thank you very much. I have modified the diff to be applied to r96456 and will upload it in JIRA as well.
thumbnail
Juan Gonzalez P, modified 12 Years ago.

RE: Liferay video testers needed!

Liferay Legend Posts: 3089 Join Date: 10/28/08 Recent Posts
Daniel Kempf:
Your patch works like a charm, thank you very much. I have modified the diff to be applied to r96456 and will upload it in JIRA as well.


Thanks very much Daniel.

There is another way to enable process fork and video preview for some weird cases (one is your case :-D).

You could disable logging for org.ffmpeg, like I tell here:

http://issues.liferay.com/browse/LPS-24128

Please apply the patch from that issue, enable that parameter for forking process, and tell me the result.

Thanks very much Daniel, your help is much appreciated!
thumbnail
Daniel Kempf, modified 12 Years ago.

RE: Liferay video testers needed!

New Member Posts: 15 Join Date: 4/22/11 Recent Posts
I have tested the additional logging configuration, but it did not seem to help.

I placed the snippet in my portal-log4j-ext.xml, residing in Tomcat's lib directory. I made sure, that the logging configuration is respected by the portal. I furthermore inspected the classPath variabel in ProcessExecutor:51 to make sure the file is being correctly referenced in the conversion process call.

Unfortunately the error message


[VideoProcessorImpl:442] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideoXuggler(VideoProcessorImpl.java:406)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideoXuggler(VideoProcessorImpl.java:437)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideo(VideoProcessorImpl.java:343)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl.generateVideo(VideoProcessorImpl.java:70)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorUtil.generateVideo(VideoProcessorUtil.java:31)
        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
        at java.lang.Thread.run(Thread.java:662)
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)
        at com.xuggle.ferry.NativeLogger.log(NativeLogger.java:105)
        at com.xuggle.xuggler.XugglerJNI.IStreamCoder_decodeVideo(Native Method)
        at com.xuggle.xuggler.IStreamCoder.decodeVideo(IStreamCoder.java:675)
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.decodeVideo(LiferayConverter.java:246)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:237)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl$LiferayVideoProcessCallable.call(VideoProcessorImpl.java:647)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl$LiferayVideoProcessCallable.call(VideoProcessorImpl.java:1)
        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
Caused by: java.lang.IllegalArgumentException: Illegal Load: NaN
        at java.util.Hashtable.<init>(Hashtable.java:157)
        at java.util.Hashtable.<init>(Hashtable.java:175)
        at org.apache.log4j.spi.LoggingEvent.<clinit>(LoggingEvent.java:145)
        ... 12 more
</clinit></init></init>


prevails after switching to the fork process call and Adding the snippet


	<category name="org.ffmpeg">
		<priority value="OFF" />
	</category>


to my logging configuration.

When i'm back at work I might be patching my portal-log4j.xml as described in the JIRA issue, just to make sure that ffmpeg is using the proper configuration.
thumbnail
Juan Gonzalez P, modified 12 Years ago.

RE: Liferay video testers needed!

Liferay Legend Posts: 3089 Join Date: 10/28/08 Recent Posts
Daniel Kempf:
I have tested the additional logging configuration, but it did not seem to help.

I placed the snippet in my portal-log4j-ext.xml, residing in Tomcat's lib directory. I made sure, that the logging configuration is respected by the portal. I furthermore inspected the classPath variabel in ProcessExecutor:51 to make sure the file is being correctly referenced in the conversion process call.

Unfortunately the error message


[VideoProcessorImpl:442] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideoXuggler(VideoProcessorImpl.java:406)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideoXuggler(VideoProcessorImpl.java:437)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideo(VideoProcessorImpl.java:343)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl.generateVideo(VideoProcessorImpl.java:70)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorUtil.generateVideo(VideoProcessorUtil.java:31)
        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
        at java.lang.Thread.run(Thread.java:662)
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)
        at com.xuggle.ferry.NativeLogger.log(NativeLogger.java:105)
        at com.xuggle.xuggler.XugglerJNI.IStreamCoder_decodeVideo(Native Method)
        at com.xuggle.xuggler.IStreamCoder.decodeVideo(IStreamCoder.java:675)
        at com.liferay.portlet.documentlibrary.util.LiferayConverter.decodeVideo(LiferayConverter.java:246)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:237)
        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl$LiferayVideoProcessCallable.call(VideoProcessorImpl.java:647)
        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl$LiferayVideoProcessCallable.call(VideoProcessorImpl.java:1)
        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
Caused by: java.lang.IllegalArgumentException: Illegal Load: NaN
        at java.util.Hashtable.<init>(Hashtable.java:157)
        at java.util.Hashtable.<init>(Hashtable.java:175)
        at org.apache.log4j.spi.LoggingEvent.<clinit>(LoggingEvent.java:145)
        ... 12 more
</clinit></init></init>


prevails after switching to the fork process call and Adding the snippet


	<category name="org.ffmpeg">
		<priority value="OFF" />
	</category>


to my logging configuration.

When i'm back at work I might be patching my portal-log4j.xml as described in the JIRA issue, just to make sure that ffmpeg is using the proper configuration.



Mmmmm weird. I've tested and worked ok for me (I was having the same error).

Please check that logging is OFF for that category (you can check it in Control Panel -> Server config -> Log levels)
thumbnail
Daniel Kempf, modified 12 Years ago.

RE: Liferay video testers needed!

New Member Posts: 15 Join Date: 4/22/11 Recent Posts
That solved the issue :-). Found out, that the category wasn't present in the control panel. Adding it manually and setting level to OFF made the video appear. Nice work, well done :-).
thumbnail
Juan Gonzalez P, modified 12 Years ago.

RE: Liferay video testers needed!

Liferay Legend Posts: 3089 Join Date: 10/28/08 Recent Posts
Daniel Kempf:
That solved the issue :-). Found out, that the category wasn't present in the control panel. Adding it manually and setting level to OFF made the video appear. Nice work, well done :-).


Great! If you add that category to portal-log4j.xml (don't remember the name exactly, it's in the patch) it should appear the category in Control Panel without adding it manually, and will persist in future restarts.

Whenever you can, test that and confirm it.

Thanks!
thumbnail
Daniel Kempf, modified 12 Years ago.

RE: Liferay video testers needed!

New Member Posts: 15 Join Date: 4/22/11 Recent Posts
I created my own log4j extension (portal-log4j-ext.xml) and copied it together with log4j.dtd to webapps/ROOT/WEB-INF/classes/META-INF.

Video preview generation is working fine now, and logging category org.ffmpeg is being displayed in the control panel.
thumbnail
James Falkner, modified 12 Years ago.

Thread Split

Liferay Legend Posts: 1399 Join Date: 9/17/10 Recent Posts
I split this out in to a separate thread (it is not related to the video discussion)

The new thread can be found at http://www.liferay.com/community/forums/-/message_boards/view_message/11874468.
thumbnail
selam Aweke selam, modified 8 Years ago.

RE: Thread Split

Junior Member Posts: 60 Join Date: 11/14/12 Recent Posts
Hey James Falkner or Community members, I've one urgent Question ,
I upload a video but didn't preview

I'm using liferay 6.2. I want to to play a video on my portal site. I installed xuggler, on my liferay from control panel->external service.
I' upload three videos, but 2 of the videos didn't preview and can't play video. even one of the video previews after taking a long time
there is an error saying "Unable to open coder". so how can I fix such a problem.
thumbnail
Juan Gonzalez P, modified 12 Years ago.

RE: Liferay video testers needed!

Liferay Legend Posts: 3089 Join Date: 10/28/08 Recent Posts
Daniel Kempf:

Though, when I upload a broken .avi file (can be played in MediaPlayer Classic but not in Windows Media Player), the following error is written to the console:


Well, Liferay (and Xuggler) manage almost all of the video/audio files, but there are some videos with "bad" encodings/configs/etc. If you can play a file with only a player doesn't mean it has to be played with every player. Although we can afford many of the errors and get around them, others can't.

Daniel Kempf:

Also, the current trunk version of liferay did not include the "Video" file type in document library portlet. Wondering where this comes from...

This is expected, because that metadata wasn't created for that kind of file "types". There is an issue in JIRA for this where it explains perfectly.
thumbnail
Daniel Kempf, modified 12 Years ago.

RE: Liferay video testers needed!

New Member Posts: 15 Join Date: 4/22/11 Recent Posts
Juan Gonzalez P:

This is expected, because that metadata wasn't created for that kind of file "types". There is an issue in JIRA for this where it explains perfectly.


I think you are referring to LPS-22921. Thanks again.
thumbnail
Daniel Kempf, modified 12 Years ago.

RE: Liferay video testers needed!

New Member Posts: 15 Join Date: 4/22/11 Recent Posts
I noticed that in current trunk revision (r97202) no hint will be displayed, that the preview is being generated. I filed a bug report for this, please see LPS-24599
thumbnail
Juan Gonzalez P, modified 12 Years ago.

RE: Liferay video testers needed!

Liferay Legend Posts: 3089 Join Date: 10/28/08 Recent Posts
Daniel Kempf:
I noticed that in current trunk revision (r97202) no hint will be displayed, that the preview is being generated. I filed a bug report for this, please see LPS-24599



Did you test this with the same file in both revisions?

I didn't see this before, if it's generating a preview, it will show the message.

Are you sure the video is being generated and the video has the extension (so Liferay can determine properly if mimeType can be converted)?
thumbnail
Daniel Kempf, modified 12 Years ago.

RE: Liferay video testers needed!

New Member Posts: 15 Join Date: 4/22/11 Recent Posts
Yes, I tested with the same file in both revisions and yes, the video is being generated and I'm able to watch the preview.

Tested with both settings for dl.file.entry.preview.video.fork.process (false/true)