|
MediaPreviews
Media Previews add-on for Alfresco Share, providing video thumbnailing and previewing, audio previewing and a video dashlet
Addon-Dashlet, AlfrescoVersion-3.x, Addon-PageComponent IntroductionThis add-on project for Alfresco Share 3.3/3.4 provides the ability to preview audio and video files within the Share user interface. Specifically the project provides enhancements to the web preview component to support Flash-based previews of audio and video content, using the open source FLV Player and MP3 Player media players by neolao. Based on the content's MIME type, the updated component automatically chooses the appropriate previewer to use. The supplied Spring configuration extends the repository thumbnailing capabilities to support either H264 or FLV format 'thumbnails' for video content and MP3 format 'thumbnails' for audio content, using FFmpeg.
The previews do not require FFmpeg for content that is already encoded in these formats, but it is highly recommended to support the widest range of formats, and for thumbnail image generation. In addition to support for the additional media types in the Share Document Details screen, a custom site dashlet is provided, which can be configured to display a chosen video.
InstallationThe dashlet is packaged as a single JAR file for easy installation into Alfresco Share. To install the dashlet, simply drop the media-preview.jar file into the tomcat/shared/lib folder within your Alfresco installation, and restart the application server. You might need to create this folder if it does not already exist. To enable FFmpeg support you must
ffmpeg.exe=<location of ffmpeg executable> ffmpeg.base=<location of ffmpeg base dir> (Windows only) After you have deployed the JAR file you will need to restart Tomcat to ensure it picks up the changes. Check the alfresco.log file while the repository is starting up for any warnings or errors related to FFmpeg, if you have enabled it. Building from SourceCheck out the project if you have not already done so svn checkout http://share-extras.googlecode.com/svn/trunk/Media%20Preview Change into the new directory cd "Media Preview" An Ant build script is provided to build a JAR file containing the custom files, which can then be installed into the tomcat/shared/lib folder of your Alfresco installation. To build the JAR file, run the following command from the base project directory. ant clean dist-jar The command should build a JAR file named media-preview.jar in the dist directory within your project, which you can then copy into the tomcat/shared/lib folder of your Alfresco installation. Alternatively, you can use the build script to hot deploy the JAR file directly into a local Tomcat instance for testing. You will need to use the hotcopy-tomcat-jar task and set the tomcat.home property in Ant. ant -Dtomcat.home=C:/Alfresco/tomcat clean dist-jar hotcopy-tomcat-jar After you have deployed the JAR file you will need to restart Tomcat to ensure it picks up the changes. See the Installing section above for information on configuring FFmpeg. UsageUsing Video Previews
Using the Video Preview dashlet
TroubleshootingIf you have problems, first check your alfresco.log for any errors being thrown at startup, relating to FFmpeg. If no errors are shown, you can force the transformers to give you a little more information by adding the following lines to the file webapps/alfresco/WEB-INF/classes/log4j.properties. log4j.logger.org.alfresco.util.exec.RuntimeExec=debug log4j.logger.org.alfresco.repo.content.transform=debug log4j.logger.org.alfresco.repo.thumbnail=debug If no problems are obvious and you still find that thumbnails do not get generated or the player does not render, you can make a direct request for the specific renditions to help diagnose the problem. In the URLs below you will need to replace the {nodeId} token with the GUID of the problematic file (which you can grab from the end of the Document Details page URL), and substitute in the hostname of your server.
Known Issues
| |
Hi Will,
For your records: I was able to successfully setup and run this media preview with the latest Alfresco Enterprise 3.4.0 beta2 on Ubuntu 10.04 (64 bit), by following these instructions:
http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289
The only different thing is I had to put the media-preview.jar file into tomcat/lib instead of tomcat/shared/lib
I can also "preview" mp3 music, even if when I preview mp3 files my log reports some exceptions, probably due to a misconfigured mimetype or something:
WARN [config.forms.NodeTypeEvaluator?] Failed to find node type in JSON response from metadata service. org.json.JSONException: JSONObject["type"] not found.
However, music is played correctly.
Thank you!
Maurizio (Alfresco)
I installed the media-preview with Alfresco Community 3.4.0 b3262 and I got mp3 previews. Could not preview the videos I tried (avi and mov).
I also had the problem with the location of the jar, but I followed this instructions and solved it:
http://wiki.alfresco.com/wiki/Install_Tomcat6
note: I had to put an absolute path instead of using catalina.base
thanks, Vitor Fernandes
Hi Victor, I suspect this is down to the RuntimeExecutable? problem that is mentioned in the known issues section above. You should find that FLV and MP4 video files work OK as they can be played directly by Flash and do not require conversion.
The underlying issue is a repository issue and has been fixed in SVN, but unfortunately was too late for 3.4.b.
Maurizio, I get the same error with MP3 files and it is unrelated to the preview as I still get it without the media previews installed. I've raised https://issues.alfresco.com/jira/browse/ALF-6113 to track it.
Hi Will, I just unstalled your media-preview extension and it works really well. Thank you for your time, I'm sure many people will appreciate it. I have no problem listening to mp3 audio or playing flv video but I'm wondering if it would be easy to support ogg/vorbis audio as well. I'm using Alfresco 3.4b with ffmpeg installed on a Ubuntu 10.04 64bit system. How can I trigger the audio conversion by ffmpeg for this format (if it is necessary). Thanks again.
Hi, I've just installed the MediaPreviews on our Alfresco 3.4.d. I can see the thumbnails of mp4 and mpeg videos just fine. The problem is that when I want to preview these files. In the case of the mp4 I get a video player with a still image, but when I click on play, the preview turns black and I can only hear the sound of the video. In the case of the mpg, I only get a message saying "Preview not currently available." Any idea what could be going wrong?
Hi, it sounds like you do not have FFmpeg installed if conversion from other formats fails, or perhaps it does not have H264 support, or Alfresco cannot find the ffmpeg executable. Have you followed the instructions above in the Installation section?
MPEG4 content should play natively with the player, but I have come across some that do not, depending on which software/settings were used to produce them. If you are able to share the mp4 file then that would be helpful in troubleshooting further.
Hi, I grabbed FFmpeg git-2a0d4d4 32-bit Static from http://hawkeye.arrozcru.org, which should include H264. I've also followed the instructions above and configured the path properly. I've also tried example config above, but no luck.
Regarding the mp4 videos, how can I share them with you?
I installed the module under v3.4c, but have been unable to play .mov (quicktime) files, no thumbnail image is generated either. The following message appears: Preview not currently available. Click here to download. Flash video (flv) files are working well, including the generation of a thumbnail image. When I execute the webscript described in the Troubleshooting section for player problems the following error is generated:
500 - org.springframework.extensions.webscripts.WebScriptException? - 05010001 Wrapped Exception (with status template): 05010056 Failed to execute script 'classpath:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': No bean named '' is defined
FFmpeg is installed and no errors appear during startup: 10:27:19,261 DEBUG [org.alfresco.util.exec.RuntimeExec?] Execution result:
Any suggestion for getting Quicktime .mov files to play? When I looked at the FLV Player web site it seems to indicate that mov files are natively supported.
Hi Steve, I tried this out myself and it seems that the conversion from non-native formats doesn't work in 3.4.c as I thought. The error you mention (which I also get) is characteristic of ALF-4214.
It should be fine in 3.4.d (I've definitely had this working myself), or you could try modifying the _getSupportedVideoMimeTypes function in video-preview.js, to return the Quicktime mimetype in the list where possible. Right now only .flv and .mp4 are considered for native playback, but you may well be right that Quicktime files can be played too. Please can you raise an enhancement issue if you find this works?
I modified your code to enable native playback of Quicktime/mov files. There were two places I needed to change code in the video-preview.js file. In my initial testing the mov files play natively, but without sound. I had a few mov files from my camera that I tried and videos that I downloaded from an Apple sample video site. In some cases I would get sound, but no image. In others, image, but no sound. I believe this is purely a player issue at this point, beyond anything for me to do to correct it. I did find one MOV file that played correctly with video and sound. MP4s play fine, it is only the mov files that I don't get sound consistently. Thanks Steve
Hi Will, Great extension. Tried with ffmpeg from: FFmpeg git-faa3381 64-bit Static (Latest) http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-git-faa3381-win64-static.7z
mp4 display works, but I cant get the avi and other formats to show; get message: Preview not currently available
Do you have an url where we can download ffmpeg with x264 for windows 64bit in order for the avi's to play?
track above question/answer: http://code.google.com/p/share-extras/issues/detail?id=41&sort=-id
I have a mp4 file of size around 750 MB uploaded to alfresco share site. It's a video 1 hour long. It seems to me that when I play my long video, player want start until it downloads the whole file. Is that how it's suppose to be or am I doing something wrong?
Thanxs for your help.
Hi Petar, if you download and install the latest FFmpeg (Ubuntu instructions), then one of the options is to also build the qt-faststart executable.
According to that guide, qt-faststart is a useful tool if you're showing your H.264 MP4 videos on the web. It relocates some data in the video to allow playback to begin before the file is completely downloaded.
I've not tried this myself but if you get it working let me know and I'll see if I can add some basic guidance to the page.
I've managed to download and install qt-faststart program but I'm not sure how to use it. Instructions say that it's used with following command qt-faststart <input_mov> <output_mov>. I tried that from command line and it seems to bi working ok.
I'm still wandering how to use it with your video previewing dashlet? If you could provide any instructions I would be grateful.
Thnx.
Ok. I have a new update now :) I've uploaded video that was previously processed with qt-quickstart tool into my site document library.
When I play this processed video it starts before the whole file is downloaded witch is just what I wanted. But now I only get the sound and no picture.
I've tried to play processed video with VLC player and it plays ok (picture and sound) so I don't think the processed video is corrupted. I think this is a flash player issue.
What do you think?
Hi Petar, yes I've seen this behaviour before with some Flash videos. It seems to be related to the player somehow. Unless you tell me the video played correctly (albeit with long download time) before you used qt-faststart then I assume you are having the same problem.
I would suggest you try the alfrescoshareflowplayer project and see if that works instead for you (since Flowplayer is much more widely used). If it does I could investigate making that player an option for the this add-on too.
Hi Will. It seems to be encoding error off my video that was causing problems. After I converted video to H.264 codec properly and applied qt-faststart again everything worked great.
Using both flash players video now starts to play almost immediately. Sorry to bother you and thanks for your help.