Is there a way to speed up the video conversion?
Is there a way to speed up the video conversion? I would like to decrease the resolution target (eg 240 instead of 480). Also, I noticed that the video conversions are performed one at a time and queued. Is there a way to parallelize them?
Thanks in advance, Maurizio
You could try overriding the video-service-contrib.xml contribution (made in nuxeo-platform-video-core) as this is where the default 480 is set.
The original contrib is listed below… package and deploy your own custom contribution with the changes you require. Make sure that the original component is named in a
<require>org.nuxeo.ecm.platform.video.service.contrib</require> statement. I haven't tried this so I don't know for certain the override will work.
<?xml version="1.0"?> <component name="org.nuxeo.ecm.platform.video.service.contrib"> <extension target="org.nuxeo.ecm.platform.video.service.VideoService" point="videoConversions"> <videoConversion name="MP4 480p" converter="convertToMP4" height="480"/> <videoConversion name="WebM 480p" converter="convertToWebM" height="480"/> <videoConversion name="Ogg 480p" converter="convertToOgg" height="480"/> </extension> <extension target="org.nuxeo.ecm.platform.video.service.VideoService" point="automaticVideoConversions"> <automaticVideoConversion name="MP4 480p" order="0" /> <automaticVideoConversion name="WebM 480p" order="10" /> </extension> </component>
As for parallelizing video conversion - I have no doubt it's possible but you'd have to dig into the guts of the video packages to understand how to best achieve. Might be easier to get more processing power and RAM - both of which are critical in any event for processing video and large images. And it certainly helps if you have an SSD for file conversion.
To increase the number of threads, you can provide a contribution bumping the default 1 thread to something more:
<require>org.nuxeo.ecm.platform.video.workmanager</require> <extension target="org.nuxeo.ecm.core.work.service" point="queues"> <queue id="videoConversion"> <maxThreads>2</maxThreads> <category>videoConversion</category> </queue> </extension>
Thanks for your answer. But I don't know how override the contribution.
I have to edit the xml file in the jar and deploy the jar changed or is there another way (cleaner?) to do this?
Thanks again Maurizio