Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Juan Gonzalez
Liferay video testers needed!
6 de diciembre de 2011 3:16
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1872

Fecha de incorporación: 28 de octubre de 2008

Mensajes recientes

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:

  1. Install Xuggler. Simply download and install Xuggler 3.4 for our environment from this URL:http://www.xuggle.com/xuggler/downloads/
  2. 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

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

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

  5. After a while (depending on video size), ensure that video has a thumbnail in Documents & Media and no exception is thrown in logs
  6. Ensure that video can be played in Chrome/Chromium, Firefox and IE.
  7. 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!
Tomas Polesovsky
RE: Liferay video testers needed!
7 de diciembre de 2011 14:14
Respuesta

Tomas Polesovsky

LIFERAY STAFF

Ranking: Liferay Master

Mensajes: 574

Fecha de incorporación: 13 de febrero de 2009

Mensajes recientes

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:
1dl.file.max.size=0
2com.liferay.portal.upload.UploadServletRequestImpl.max.size=1024000000


-- tom
Juan Gonzalez
RE: Liferay video testers needed!
11 de diciembre de 2011 11:23
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1872

Fecha de incorporación: 28 de octubre de 2008

Mensajes recientes

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):

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


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

 1
 2    xuggler.ffpreset.bf=0
 3    xuggler.ffpreset.cmp=+chroma
 4    xuggler.ffpreset.coder=0
 5    xuggler.ffpreset.flags=+loop
 6    xuggler.ffpreset.flags2=-wpred-dct8x8+mbtree
 7    xuggler.ffpreset.i_qfactor=0.71
 8    xuggler.ffpreset.me_method=umh
 9    xuggler.ffpreset.me_range=16
10    xuggler.ffpreset.qcomp=0.6
11    xuggler.ffpreset.qdiff=4
12    xuggler.ffpreset.qmin=10
13    xuggler.ffpreset.qmax=51
14    xuggler.ffpreset.sc_threshold=40
15    xuggler.ffpreset.subq=8
16    xuggler.ffpreset.trellis=0
17    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:
1dl.file.max.size=0
2com.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.
Daniel Kempf
RE: Liferay video testers needed!
21 de diciembre de 2011 8:56
Respuesta

Daniel Kempf

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 22 de abril de 2011

Mensajes recientes

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:

 1
 2ERROR [VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 3com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 4        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
 5        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:371)
 6        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:391)
 7        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:309)
 8        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
 9        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
10        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
11        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
12        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
13        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
14        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
15        at java.lang.Thread.run(Thread.java:662)
16java.lang.ExceptionInInitializerError
17        at org.apache.log4j.Category.forcedLog(Category.java:391)
18        at org.apache.log4j.Category.log(Category.java:856)
19        at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)
20        at com.xuggle.ferry.NativeLogger.log(NativeLogger.java:105)
21        at com.xuggle.xuggler.XugglerJNI.IStreamCoder_decodeVideo(Native Method)
22        at com.xuggle.xuggler.IStreamCoder.decodeVideo(IStreamCoder.java:675)
23        at com.liferay.portlet.documentlibrary.util.LiferayConverter.decodeVideo(LiferayConverter.java:246)
24        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:237)
25        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
26        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:599)
27        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:1)
28        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
29Caused by: java.lang.IllegalArgumentException: Illegal Load: NaN
30        at java.util.Hashtable.<init>(Hashtable.java:157)
31        at java.util.Hashtable.<init>(Hashtable.java:175)
32        at org.apache.log4j.spi.LoggingEvent.<clinit>(LoggingEvent.java:145)
33        ... 12 more


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

1
2export XUGGLE_HOME=/usr/local/xuggler
3export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH
4...
5export 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:

 1
 2[VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 3com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 4        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
 5        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:371)
 6        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:391)
 7        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:309)
 8        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
 9        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
10        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
11        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
12        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
13        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
14        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
15        at java.lang.Thread.run(Thread.java:662)
1617:49:14,493 ERROR [ffmpeg:105] [aac @ 0xb2c86fe0] Too many bits per frame requested
1717:49:14,506 WARN  [xuggler:76] Error: could not open codec (../../../../../../../csrc/com/xuggle/xuggler/StreamCoder.cpp:657)
1816:49:14,543 ERROR [VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Unable to open coder
19com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Unable to open coder
20        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:602)
21        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:1)
22        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
23Caused by: java.lang.RuntimeException: Unable to open coder
24        at com.liferay.portlet.documentlibrary.util.LiferayConverter.openStreamCoder(LiferayConverter.java:548)
25        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:181)
26        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
27        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:599)
28        ... 2 more
2917:49:16,194 WARN  [LiferayVideoThumbnailConverter:118] Unable to create thumbnail from specified frame. Will generate thumbnail from the beginning.
3016:49:16,239 ERROR [VideoProcessor:238] com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Error while seeking file
31com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Error while seeking file
32        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:657)
33        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:1)
34        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
35Caused by: java.lang.RuntimeException: Error while seeking file
36        at com.liferay.portlet.documentlibrary.util.LiferayConverter.rewind(LiferayConverter.java:695)
37        at com.liferay.portlet.documentlibrary.util.LiferayConverter.rewind(LiferayConverter.java:675)
38        at com.liferay.portlet.documentlibrary.util.LiferayVideoThumbnailConverter.doConvert(LiferayVideoThumbnailConverter.java:123)
39        at com.liferay.portlet.documentlibrary.util.LiferayVideoThumbnailConverter.convert(LiferayVideoThumbnailConverter.java:51)
40        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:654)
41        ... 2 more
4216:49:16,241 ERROR [VideoProcessor:327] com.liferay.portal.kernel.exception.SystemException: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
43com.liferay.portal.kernel.exception.SystemException: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
44        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateThumbnailXuggler(VideoProcessor.java:252)
45        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:321)
46        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
47        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
48        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
49        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
50        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
51        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
52        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
53        at java.lang.Thread.run(Thread.java:662)
54Caused by: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
55        at com.liferay.portlet.documentlibrary.store.BaseStore.addFile(BaseStore.java:108)
56        at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.addFile(StoreProxyImpl.java:52)
57        at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.addFile(SafeFileNameStoreWrapper.java:70)
58        at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:98)
59        at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:171)
60        at com.liferay.portlet.documentlibrary.store.DLStoreUtil.addFile(DLStoreUtil.java:186)
61        at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.addFileToStore(DLPreviewableProcessor.java:170)
62        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateThumbnailXuggler(VideoProcessor.java:241)
63        ... 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...
Juan Gonzalez
RE: Liferay video testers needed!
21 de diciembre de 2011 14:44
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1872

Fecha de incorporación: 28 de octubre de 2008

Mensajes recientes

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:

 1
 2ERROR [VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 3com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 4        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
 5        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:371)
 6        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:391)
 7        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:309)
 8        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
 9        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
10        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
11        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
12        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
13        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
14        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
15        at java.lang.Thread.run(Thread.java:662)
16java.lang.ExceptionInInitializerError
17        at org.apache.log4j.Category.forcedLog(Category.java:391)
18        at org.apache.log4j.Category.log(Category.java:856)
19        at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)
20        at com.xuggle.ferry.NativeLogger.log(NativeLogger.java:105)
21        at com.xuggle.xuggler.XugglerJNI.IStreamCoder_decodeVideo(Native Method)
22        at com.xuggle.xuggler.IStreamCoder.decodeVideo(IStreamCoder.java:675)
23        at com.liferay.portlet.documentlibrary.util.LiferayConverter.decodeVideo(LiferayConverter.java:246)
24        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:237)
25        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
26        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:599)
27        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:1)
28        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
29Caused by: java.lang.IllegalArgumentException: Illegal Load: NaN
30        at java.util.Hashtable.<init>(Hashtable.java:157)
31        at java.util.Hashtable.<init>(Hashtable.java:175)
32        at org.apache.log4j.spi.LoggingEvent.<clinit>(LoggingEvent.java:145)
33        ... 12 more


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

1
2export XUGGLE_HOME=/usr/local/xuggler
3export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH
4...
5export 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:

 1
 2[VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 3com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 4        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
 5        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:371)
 6        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideoXuggler(VideoProcessor.java:391)
 7        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:309)
 8        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
 9        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
10        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
11        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
12        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
13        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
14        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
15        at java.lang.Thread.run(Thread.java:662)
1617:49:14,493 ERROR [ffmpeg:105] [aac @ 0xb2c86fe0] Too many bits per frame requested
1717:49:14,506 WARN  [xuggler:76] Error: could not open codec (../../../../../../../csrc/com/xuggle/xuggler/StreamCoder.cpp:657)
1816:49:14,543 ERROR [VideoProcessor:396] com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Unable to open coder
19com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Unable to open coder
20        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:602)
21        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:1)
22        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
23Caused by: java.lang.RuntimeException: Unable to open coder
24        at com.liferay.portlet.documentlibrary.util.LiferayConverter.openStreamCoder(LiferayConverter.java:548)
25        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:181)
26        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
27        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoProcessCallable.call(VideoProcessor.java:599)
28        ... 2 more
2917:49:16,194 WARN  [LiferayVideoThumbnailConverter:118] Unable to create thumbnail from specified frame. Will generate thumbnail from the beginning.
3016:49:16,239 ERROR [VideoProcessor:238] com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Error while seeking file
31com.liferay.portal.kernel.process.ProcessException: java.lang.RuntimeException: Error while seeking file
32        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:657)
33        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:1)
34        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
35Caused by: java.lang.RuntimeException: Error while seeking file
36        at com.liferay.portlet.documentlibrary.util.LiferayConverter.rewind(LiferayConverter.java:695)
37        at com.liferay.portlet.documentlibrary.util.LiferayConverter.rewind(LiferayConverter.java:675)
38        at com.liferay.portlet.documentlibrary.util.LiferayVideoThumbnailConverter.doConvert(LiferayVideoThumbnailConverter.java:123)
39        at com.liferay.portlet.documentlibrary.util.LiferayVideoThumbnailConverter.convert(LiferayVideoThumbnailConverter.java:51)
40        at com.liferay.portlet.documentlibrary.util.VideoProcessor$LiferayVideoThumbnailProcessCallable.call(VideoProcessor.java:654)
41        ... 2 more
4216:49:16,241 ERROR [VideoProcessor:327] com.liferay.portal.kernel.exception.SystemException: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
43com.liferay.portal.kernel.exception.SystemException: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
44        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateThumbnailXuggler(VideoProcessor.java:252)
45        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateVideo(VideoProcessor.java:321)
46        at com.liferay.portlet.documentlibrary.util.VideoProcessor.generateVideo(VideoProcessor.java:67)
47        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
48        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
49        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
50        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
51        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
52        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
53        at java.lang.Thread.run(Thread.java:662)
54Caused by: com.liferay.portlet.documentlibrary.NoSuchFileException: document_thumbnail/10480/185/15801/15802.jpg
55        at com.liferay.portlet.documentlibrary.store.BaseStore.addFile(BaseStore.java:108)
56        at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.addFile(StoreProxyImpl.java:52)
57        at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.addFile(SafeFileNameStoreWrapper.java:70)
58        at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:98)
59        at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:171)
60        at com.liferay.portlet.documentlibrary.store.DLStoreUtil.addFile(DLStoreUtil.java:186)
61        at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.addFileToStore(DLPreviewableProcessor.java:170)
62        at com.liferay.portlet.documentlibrary.util.VideoProcessor._generateThumbnailXuggler(VideoProcessor.java:241)
63        ... 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!
Juan Gonzalez
RE: Liferay video testers needed!
21 de diciembre de 2011 15:02
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1872

Fecha de incorporación: 28 de octubre de 2008

Mensajes recientes

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.
Daniel Kempf
RE: Liferay video testers needed!
22 de diciembre de 2011 4:56
Respuesta

Daniel Kempf

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 22 de abril de 2011

Mensajes recientes

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.
Daniel Kempf
RE: Liferay video testers needed!
22 de diciembre de 2011 4:59
Respuesta

Daniel Kempf

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 22 de abril de 2011

Mensajes recientes

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.
Juan Gonzalez
RE: Liferay video testers needed!
22 de diciembre de 2011 5:05
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1872

Fecha de incorporación: 28 de octubre de 2008

Mensajes recientes

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!
Daniel Kempf
RE: Liferay video testers needed!
22 de diciembre de 2011 7:17
Respuesta

Daniel Kempf

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 22 de abril de 2011

Mensajes recientes

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

 1
 2[VideoProcessorImpl:442] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 3com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 4        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
 5        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideoXuggler(VideoProcessorImpl.java:406)
 6        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideoXuggler(VideoProcessorImpl.java:437)
 7        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideo(VideoProcessorImpl.java:343)
 8        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl.generateVideo(VideoProcessorImpl.java:70)
 9        at com.liferay.portlet.documentlibrary.util.VideoProcessorUtil.generateVideo(VideoProcessorUtil.java:31)
10        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
11        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
12        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
13        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
14        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
15        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
16        at java.lang.Thread.run(Thread.java:662)
17Exception in thread "main" java.lang.ExceptionInInitializerError
18        at org.apache.log4j.Category.forcedLog(Category.java:391)
19        at org.apache.log4j.Category.log(Category.java:856)
20        at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)
21        at com.xuggle.ferry.NativeLogger.log(NativeLogger.java:105)
22        at com.xuggle.xuggler.XugglerJNI.IStreamCoder_decodeVideo(Native Method)
23        at com.xuggle.xuggler.IStreamCoder.decodeVideo(IStreamCoder.java:675)
24        at com.liferay.portlet.documentlibrary.util.LiferayConverter.decodeVideo(LiferayConverter.java:246)
25        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:237)
26        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
27        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl$LiferayVideoProcessCallable.call(VideoProcessorImpl.java:647)
28        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl$LiferayVideoProcessCallable.call(VideoProcessorImpl.java:1)
29        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
30Caused by: java.lang.IllegalArgumentException: Illegal Load: NaN
31        at java.util.Hashtable.<init>(Hashtable.java:157)
32        at java.util.Hashtable.<init>(Hashtable.java:175)
33        at org.apache.log4j.spi.LoggingEvent.<clinit>(LoggingEvent.java:145)
34        ... 12 more


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

1
2    <category name="org.ffmpeg">
3        <priority value="OFF" />
4    </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.
James Falkner
Thread Split
22 de diciembre de 2011 8:34
Respuesta

James Falkner

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1198

Fecha de incorporación: 17 de septiembre de 2010

Mensajes recientes

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.
Juan Gonzalez
RE: Liferay video testers needed!
22 de diciembre de 2011 9:46
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1872

Fecha de incorporación: 28 de octubre de 2008

Mensajes recientes

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

 1
 2[VideoProcessorImpl:442] com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 3com.liferay.portal.kernel.process.ProcessException: Subprocess terminated with exit code 1
 4        at com.liferay.portal.kernel.process.ProcessExecutor.execute(ProcessExecutor.java:68)
 5        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideoXuggler(VideoProcessorImpl.java:406)
 6        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideoXuggler(VideoProcessorImpl.java:437)
 7        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl._generateVideo(VideoProcessorImpl.java:343)
 8        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl.generateVideo(VideoProcessorImpl.java:70)
 9        at com.liferay.portlet.documentlibrary.util.VideoProcessorUtil.generateVideo(VideoProcessorUtil.java:31)
10        at com.liferay.portlet.documentlibrary.messaging.VideoProcessorMessageListener.doReceive(VideoProcessorMessageListener.java:34)
11        at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
12        at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
13        at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
14        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
15        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
16        at java.lang.Thread.run(Thread.java:662)
17Exception in thread "main" java.lang.ExceptionInInitializerError
18        at org.apache.log4j.Category.forcedLog(Category.java:391)
19        at org.apache.log4j.Category.log(Category.java:856)
20        at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)
21        at com.xuggle.ferry.NativeLogger.log(NativeLogger.java:105)
22        at com.xuggle.xuggler.XugglerJNI.IStreamCoder_decodeVideo(Native Method)
23        at com.xuggle.xuggler.IStreamCoder.decodeVideo(IStreamCoder.java:675)
24        at com.liferay.portlet.documentlibrary.util.LiferayConverter.decodeVideo(LiferayConverter.java:246)
25        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.doConvert(LiferayVideoConverter.java:237)
26        at com.liferay.portlet.documentlibrary.util.LiferayVideoConverter.convert(LiferayVideoConverter.java:78)
27        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl$LiferayVideoProcessCallable.call(VideoProcessorImpl.java:647)
28        at com.liferay.portlet.documentlibrary.util.VideoProcessorImpl$LiferayVideoProcessCallable.call(VideoProcessorImpl.java:1)
29        at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:128)
30Caused by: java.lang.IllegalArgumentException: Illegal Load: NaN
31        at java.util.Hashtable.<init>(Hashtable.java:157)
32        at java.util.Hashtable.<init>(Hashtable.java:175)
33        at org.apache.log4j.spi.LoggingEvent.<clinit>(LoggingEvent.java:145)
34        ... 12 more


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

1
2    <category name="org.ffmpeg">
3        <priority value="OFF" />
4    </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)
Daniel Kempf
RE: Liferay video testers needed!
22 de diciembre de 2011 10:54
Respuesta

Daniel Kempf

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 22 de abril de 2011

Mensajes recientes

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 :-).
Juan Gonzalez
RE: Liferay video testers needed!
22 de diciembre de 2011 11:02
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1872

Fecha de incorporación: 28 de octubre de 2008

Mensajes recientes

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!
Daniel Kempf
RE: Liferay video testers needed!
4 de enero de 2012 3:41
Respuesta

Daniel Kempf

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 22 de abril de 2011

Mensajes recientes

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.
Daniel Kempf
RE: Liferay video testers needed!
4 de enero de 2012 3:58
Respuesta

Daniel Kempf

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 22 de abril de 2011

Mensajes recientes

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
Juan Gonzalez
RE: Liferay video testers needed!
4 de enero de 2012 4:18
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1872

Fecha de incorporación: 28 de octubre de 2008

Mensajes recientes

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)?
Daniel Kempf
RE: Liferay video testers needed!
4 de enero de 2012 6:01
Respuesta

Daniel Kempf

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 22 de abril de 2011

Mensajes recientes

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)