
Recherche avancée
Autres articles (16)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Diogene : création de masques spécifiques de formulaires d’édition de contenus
26 octobre 2010, parDiogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
A quoi sert ce plugin
Création de masques de formulaires
Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)
Sur d’autres sites (4013)
-
Alfresco Content transformation from .avi to *.flv using ffmpeg
25 octobre 2011, par MasanchezI'm trying to transform diferents video formats into .flv in Alfresco
I'm using 'ffmpeg' tool to transform content.
My code :
avi2flv-transform-context.xml<?xml version='1.0' encoding='UTF-8'?>
<beans>
<bean class="org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker">
<property>
<ref bean="mimetypeService"></ref>
</property>
<property>
<bean class="org.alfresco.util.exec.RuntimeExec">
<property>
<map>
<entry key=".*">
<list>
<value>ffmpeg</value>
<value>-version</value>
</list>
</entry>
</map>
</property>
<property>
<value>1</value>
</property>
</bean>
</property>
<property>
<bean class="org.alfresco.util.exec.RuntimeExec">
<property>
<map>
<entry key="Linux">
<value>ffmpeg -i '${target}' ${flv.encoder.params} '${source}'</value>
</entry>
</map>
</property>
<property>
<value>1,2</value>
</property>
<property>
<value>true</value>
</property>
<property>
<props>
<prop key="flv.encoder.params">-vcodec flv</prop>
</props>
</property>
</bean>
</property>
<property>
<list>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/avi</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/x-msvideo</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/mpeg</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/mp4</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/mpeg2</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/x-sgi-movie</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/quicktime</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/x-ms-asf</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/x-ms-wmv</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/x-rad-screenplay</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property>
<value>video/ogg</value>
</property>
<property>
<value>video/x-flv</value>
</property>
</bean>
</list>
</property>
</bean>
<bean class="org.alfresco.repo.content.transform.ProxyContentTransformer" parent="baseContentTransformer">
<property>
<ref bean="transformer.ffmpeg.avi.worker"></ref>
</property>
</bean>
</beans>webservice :
if(getFile(folderVIDEO, field.filename) == null)
{
if(file_test_node=folderVIDEO.createFile(nombrefichero+field.filename)){
model.mensajes.push('Se ha creado el fichero '+nombrefichero+field.filename);
}else
model.mensajes.push('Ha ocurrido un error cuando se intentaba crear el fichero '+nombrefichero+field.filename);
file_test_node.properties.content.write(field.content);
folderVIDEO = getFolder(search.findNode("workspace://SpacesStore/"+fondoid),nameFolderVIDEO);
var action = actions.create("transform");
// Store the transformed version in the same folder as the source
action.parameters["destination-folder"] = file_test_node.parent;
action.parameters["assoc-type"] = "{http://www.alfresco.org/model/content/1.0}contains";
action.parameters["assoc-name"] = file_test_node.name + "transformed";
action.parameters["mime-type"] = "video/x-flv";
// Execute
action.execute(file_test_node);
}The error
The Web Script /alfresco/s/gcd/fondo has responded with a status of 500 - Internal Error.
500 Description: An error inside the HTTP server which prevented it from fulfilling the request.
Message: 09180016 Wrapped Exception (with status template): 09180029 Failed to execute script '/com/inventiaplus/gcd/fondo/creado.post.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 09180028 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2011/10/18/20/56/65b3457f-c37c-4404-b4b7-9abac30f018d.bin, mimetype=video/x-msvideo, size=1614694, encoding=null, locale=es_ES] writer: ContentAccessor[ contentUrl=store://2011/10/18/20/56/e92d00e2-7bd8-4bdd-8d50-b61fe4bac903.bin, mimetype=video/x-flv, size=0, encoding=null, locale=es_ES] options: org.alfresco.service.cmr.repository.TransformationOptions@745ce55
Exception: org.alfresco.service.cmr.repository.ContentIOException - 09180027 Transformation failed - status indicates an error: Execution result: os: Linux command: [ffmpeg, -i, '/home/inventiaplus/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_target_3008293789769608319.flv', -vcodec flv, '/home/inventiaplus/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_source_5021918644492976031.avi'] succeeded: false exit code: 1 out: err: FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.2, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1.2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --e
org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker.transform(RuntimeExecutableContentTransformerWorker.java:272)
org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:68)
org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:161)
org.alfresco.repo.content.ContentServiceImpl.transform(ContentServiceImpl.java:555)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:125)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:160)
org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:137)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
$Proxy42.transform(Unknown Source)
org.alfresco.repo.action.executer.TransformActionExecuter.doTransform(TransformActionExecuter.java:305)
org.alfresco.repo.action.executer.TransformActionExecuter.executeImpl(TransformActionExecuter.java:270)
org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)
org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:749)
org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:675)
org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:540)
org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:526)
org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:758)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:217)
org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:184)
org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:137)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
$Proxy34.executeAction(Unknown Source)
org.alfresco.repo.jscript.ScriptAction.executeImpl(ScriptAction.java:147)
org.alfresco.repo.jscript.ScriptAction.execute(ScriptAction.java:136)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
org.mozilla.javascript.gen.c59._c9(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/com/inventiaplus/gcd/fondo/creado.post.js:459)
org.mozilla.javascript.gen.c59.call(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/com/inventiaplus/gcd/fondo/creado.post.js)
org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
org.mozilla.javascript.gen.c59._c0(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/com/inventiaplus/gcd/fondo/creado.post.js:271)
org.mozilla.javascript.gen.c59.call(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/com/inventiaplus/gcd/fondo/creado.post.js)
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
org.mozilla.javascript.gen.c59.call(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/com/inventiaplus/gcd/fondo/creado.post.js)
org.mozilla.javascript.gen.c59.exec(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/com/inventiaplus/gcd/fondo/creado.post.js)
org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:472)
org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:190)
org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:282)
org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:981)
org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:383)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:619)
Exception: org.alfresco.service.cmr.repository.ContentIOException - 09180028 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2011/10/18/20/56/65b3457f-c37c-4404-b4b7-9abac30f018d.bin, mimetype=video/x-msvideo, size=1614694, encoding=null, locale=es_ES] writer: ContentAccessor[ contentUrl=store://2011/10/18/20/56/e92d00e2-7bd8-4bdd-8d50-b61fe4bac903.bin, mimetype=video/x-flv, size=0, encoding=null, locale=es_ES] options: org.alfresco.service.cmr.repository.TransformationOptions@745ce55
org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:177)
Exception: org.alfresco.scripts.ScriptException - 09180029 Failed to execute script '/com/inventiaplus/gcd/fondo/creado.post.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 09180028 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2011/10/18/20/56/65b3457f-c37c-4404-b4b7-9abac30f018d.bin, mimetype=video/x-msvideo, size=1614694, encoding=null, locale=es_ES] writer: ContentAccessor[ contentUrl=store://2011/10/18/20/56/e92d00e2-7bd8-4bdd-8d50-b61fe4bac903.bin, mimetype=video/x-flv, size=0, encoding=null, locale=es_ES] options: org.alfresco.service.cmr.repository.TransformationOptions@745ce55
org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:194)
Exception: org.springframework.extensions.webscripts.WebScriptException - 09180016 Wrapped Exception (with status template): 09180029 Failed to execute script '/com/inventiaplus/gcd/fondo/creado.post.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 09180028 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2011/10/18/20/56/65b3457f-c37c-4404-b4b7-9abac30f018d.bin, mimetype=video/x-msvideo, size=1614694, encoding=null, locale=es_ES] writer: ContentAccessor[ contentUrl=store://2011/10/18/20/56/e92d00e2-7bd8-4bdd-8d50-b61fe4bac903.bin, mimetype=video/x-flv, size=0, encoding=null, locale=es_ES] options: org.alfresco.service.cmr.repository.TransformationOptions@745ce55
org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:758)
Server: Community v3.4.0 (c 3335) schema 4,113
Time: Oct 18, 2011 8:56:51 PM
Diagnostics: Inspect Web Script (com/inventiaplus/gcd/fondo/creado.post)I don't know where is the problem
Somebody can help me ?I did some changes...
avi2flv-transform-context.xml :
<entry key="Linux">
<value>ffmpeg -y -i '${target}' ${flv.encoder.params} '${source}'</value>
</entry>Source <-> Target
<props>
<prop key="flv.encoder.params">-threads 2 -s 320x240 -r 29.97 -threads 1 -pix_fmt yuv420p -g 300 -qmin 3 -b 512k -async 50 -ar 44100 -ac 2 -ab 128k</prop>
</props>change parameters
error :
The Web Script /alfresco/s/gcd/fondo/9fe0bf90-1875-4f51-9f75-7c35f6d0802c has responded with a status of 500 - Internal Error.
500 Description: An error inside the HTTP server which prevented it from fulfilling the request.
Message: 09250001 Wrapped Exception (with status template): 09250004 Failed to execute script '/com/inventiaplus/gcd/fondo/guardar.post.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 09250003 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2011/10/25/8/27/efff7050-3a67-492d-9e5b-507c03bd0a80.bin, mimetype=video/x-msvideo, size=256362496, encoding=null, locale=es_ES] writer: ContentAccessor[ contentUrl=store://2011/10/25/8/28/cb81b7f2-3c72-4266-afd7-0d1a3fb9f420.bin, mimetype=video/x-flv, size=0, encoding=null, locale=es_ES] options: org.alfresco.service.cmr.repository.TransformationOptions@18c4074f
Exception: org.alfresco.service.cmr.repository.ContentIOException - 09250002 Transformation failed - status indicates an error: Execution result: os: Linux command: [ffmpeg, -y, -i, '/home/inventiaplus/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_target_4598080275234396407.flv', -threads 2 -s 320x240 -r 29.97 -threads 1 -pix_fmt yuv420p -g 300 -qmin 3 -b 512k -async 50 -ar 44100 -ac 2 -ab 128k, '/home/inventiaplus/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_source_6538382831295915428.avi'] succeeded: false exit code: 1 out: err: FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.2, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1.2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --e
...
Exception: org.alfresco.service.cmr.repository.ContentIOException - 09250003 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2011/10/25/8/27/efff7050-3a67-492d-9e5b-507c03bd0a80.bin, mimetype=video/x-msvideo, size=256362496, encoding=null, locale=es_ES] writer: ContentAccessor[ contentUrl=store://2011/10/25/8/28/cb81b7f2-3c72-4266-afd7-0d1a3fb9f420.bin, mimetype=video/x-flv, size=0, encoding=null, locale=es_ES] options: org.alfresco.service.cmr.repository.TransformationOptions@18c4074f
org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:177)
Exception: org.alfresco.scripts.ScriptException - 09250004 Failed to execute script '/com/inventiaplus/gcd/fondo/guardar.post.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 09250003 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2011/10/25/8/27/efff7050-3a67-492d-9e5b-507c03bd0a80.bin, mimetype=video/x-msvideo, size=256362496, encoding=null, locale=es_ES] writer: ContentAccessor[ contentUrl=store://2011/10/25/8/28/cb81b7f2-3c72-4266-afd7-0d1a3fb9f420.bin, mimetype=video/x-flv, size=0, encoding=null, locale=es_ES] options: org.alfresco.service.cmr.repository.TransformationOptions@18c4074f
org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:194)
Exception: org.springframework.extensions.webscripts.WebScriptException - 09250001 Wrapped Exception (with status template): 09250004 Failed to execute script '/com/inventiaplus/gcd/fondo/guardar.post.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 09250003 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2011/10/25/8/27/efff7050-3a67-492d-9e5b-507c03bd0a80.bin, mimetype=video/x-msvideo, size=256362496, encoding=null, locale=es_ES] writer: ContentAccessor[ contentUrl=store://2011/10/25/8/28/cb81b7f2-3c72-4266-afd7-0d1a3fb9f420.bin, mimetype=video/x-flv, size=0, encoding=null, locale=es_ES] options: org.alfresco.service.cmr.repository.TransformationOptions@18c4074f
org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:758)
Server: Community v3.4.0 (c 3335) schema 4,113
Time: Oct 25, 2011 8:28:29 AMI use command line
ffmpeg -y -i /home/inventiaplus/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_source_6538382831295915428.avi -threads 2 -s 320x240 -r 29.97 -threads 1 -pix_fmt yuv420p -g 300 -qmin 3 -b 512k -async 50 -ar 44100 -ac 2 -ab 128k /home/inventiaplus/alfresco/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_target_4598080275234396407.flv
and It works
-
Playing Video on a Sega Dreamcast
9 mars 2011, par Multimedia Mike — Sega DreamcastHere’s an honest engineering question : If you were tasked to make compressed video play back on a Sega Dreamcast video game console, what video format would you choose ? Personally, I would choose RoQ, the format invented for The 11th Hour computer game and later used in Quake III and other games derived from the same engine. This post explains my reasoning.
Video Background
One of the things I wanted to do when I procured a used Sega Dreamcast back in 2001 was turn it into a set-top video playback unit. This is something that a lot of people tried to do, apparently, to varying degrees of success. Interest would wane in a few years as it became easier and easier to crack an Xbox and install XBMC. The Xbox was much better suited to playing codecs that were getting big at the time, most notably MPEG-4 part 2 video (DivX/XviD).The Dreamcast, while quite capable when it was released in 1999, was not very well-equipped to deal with an MPEG-type codec. I have recently learned that there are other hackers out there on the internet who are still trying to get the most out of this system. I was contacted for advice about how to make Theora perform better on the Dreamcast.
Interesting thing about consoles and codecs : Since you are necessarily distributing code along with your data, you have far more freedom to use whatever codecs you want for your audio and video data. This is why Vorbis and even Theora have seen quite a bit of use in video games, "internet standards" be darned. Thus, when I realized this application had no hard and fast requirement to use Theora, and that it could use any codec that fit the platform, my mind started churning. When I was programming the DC 10 years ago, I didn’t have access to the same wealth of multimedia knowledge that is currently available.Requirements Gathering
What do we need here ?- Codec needs to run on the Sega Dreamcast ; this eliminates codecs for which only binary decoder implementations are available
- Must decode 320x240 video at 30 fps ; higher resolutions up to 640x480 would be desirable
- Must deliver decent quality at 12X optical read speeds (DC drive speed)
- There must be some decent, preferably free, encoder readily available ; speed of encoding, however, is not important ; i.e., "take as long as you need, encoder"
Theora was the go-to codec because it’s just commonly known as "the free, open source video codec". But clearly it’s not suitable for, well... any purpose, really (sorry, easy target ; OW ! stop throwing things !). VP8/WebM — Theora’s heir apparent — would not qualify either, as my prior experiments have already demonstrated.
Candidates
What did the big boys use for video on the Dreamcast ? A lot of games relied on CRI’s Sofdec middleware which was MPEG-1 video and a custom ADPCM format. I don’t know if I have ever seen DC games that used MPEG-1 video at a higher resolution than 320x240 (though I have not searched exhaustively). The fact that CRI used a custom ADPCM format for this application may indicate that there wasn’t enough CPU power left over to decode a perceptual, transform-based audio codec alongside the 320x240 video.A few other DC games used 4X Technologies’ 4XM format. The most notable licensee was Alone in the Dark : The New Nightmare (DC version only ; PC version used Bink). This codec was DCT-based but incorporated 16-bit RGB colorspace into its design, presumably to optimize for applications like game consoles that couldn’t directly handle planar YUV. AITD:TNN’s videos were 640x360, a marked improvement over the typical Sofdec fare. I was about to write off 4XM as a contender due to lack of encoder, but the encoding tools are preserved on our samples site. A few other issues, though : The FFmpeg decoder doesn’t seem to work correctly as of this writing (and nobody has noticed yet, even though it’s tested via FATE).
What ideas do I have ? Right off the bat, I’m thinking vector quantizer (VQ). Vector quantizers are notoriously slow to compress but are blazingly fast to decompress which is why they were popular in the early days of video compression. First, there’s Cinepak. I fear that might be too simple for this application. Plus, I don’t know if existing (binary-only) compressors are very decent. It seems that they only ever had to handle small videos and I’ve heard that they can really fall over if anything more is demanded of them.
Sorenson Video 1 is another contender. FFmpeg has an encoder (which some allege is better than Sorenson’s original compressor). However, I fear that the wonky algorithm and colorspace might not mesh well with the Dreamcast.
My thinking quickly converged on RoQ. This was designed to run fullscreen (640x480) video on i486-class hardware. While RoQ fundamentally operates in a YUV colorspace, it’s trivial to convert it to any other colorspace during decoding and the image will be rendered in that colorspace. Plus, there are open source encoders available for the format (namely, several versions of Eric Lasota’s Switchblade encoder, one of which lives natively in FFmpeg), as well as the original proprietary encoder.
Which Library ?
There are several code choices here : FFmpeg (LGPL), Switchblade (GPL), and the original Quake 3 source code (GPL). There is one more option that I think might be easiest, which is the decoder Dr. Tim created when he reverse engineered the format in the first place. That has a very liberal "do whatever you like, but be nice and give me credit" license (probably qualifies as BSD).This code is no longer at its original home but the Wayback Machine still had a copy, which I have now mirrored (idroq.tar.gz).
Adaptation
Dr. Tim’s code still compiles and runs great on Linux (64-bit !) with SDL output. I would like to get it ported to the Dreamcast using the same SDL output, which KallistiOS supports. Then, there is the matter of fixing the longstanding chroma bug in the original sample decoder (described here). The decoder also needs to be modified to natively render RGB565 data, as that will work best with the DC’s graphics hardware.After making the code work, I want to profile it and test whether it can handle full-frame 640x480 playback at 30 frames/second. I will need to contrive a sample to achieve this.
Unfortunately, things went off the rails pretty quickly when I tried to get the RoQ decoder ported to DC/KOS. It looks like there’s a bug in KallistiOS’s minimalistic standard C library, or at least a discrepancy with my desktop Linux system. When you read to the end of a file and then seek backwards to someplace that isn’t the end, is the file still in EOF state ?
According to my Linux desktop :
open file ; feof() = 0 seek to end ; feof() = 0 read one more byte ; feof() = 1 seek back to start ; feof() = 0
According to KallistiOS :
open file ; feof() = 0 seek to end ; feof() = 0 read one more byte ; feof() = 1 seek back to start ; feof() = 1
Here’s the seek-test.c program I used to test this issue :
C :-
#include <stdio .h>
-
-
int main()
-
{
-
FILE *f ;
-
unsigned char byte ;
-
-
f = fopen("seek_test.c", "r") ;
-
fseek(f, 0, SEEK_END) ;
-
fread(&byte, 1, 1, f) ;
-
fseek(f, 0, SEEK_SET) ;
-
fclose(f) ;
-
-
return 0 ;
-
}
EOF
Speaking of EOF, I’m about done for this evening.What codec would you select for this task, given the requirements involved ?
-
Dreamcast Anniversary Programming
10 septembre 2010, par Multimedia Mike — Game HackingThis day last year saw a lot of nostalgia posts on the internet regarding the Sega Dreamcast, launched 10 years prior to that day (on 9/9/99). Regrettably, none of the retrospectives that I read really seemed to mention the homebrew potential, which is the aspect that interested me. On the occasion of the DC’s 11th anniversary, I wanted to remind myself how to build something for the unit and do so using modern equipment and build tools.
Background
Like many other programmers, I initially gained interest in programming because I desired to program video games. Not content to just plunk out games on a PC, I always had a deep, abiding ambition to program actual video game hardware. That is, I wanted to program a purpose-built video game console. The Sega Dreamcast might be the most ideal candidate to ever emerge for that task. All that was required to run your own software on the unit was the console, a PC, some free software tools, and a special connectivity measure.The Equipment
Here is the hardware required (ideally) to build software for the DC :- The console itself (I happen to have 3 of them laying around, as pictured above)
- Some peripherals : Such as the basic DC controller, the DC keyboard (flagship title : Typing of the Dead), and the visual memory unit (VMU)
- VGA box : The DC supported 480p gaming via a device that allowed you to connect the console straight to a VGA monitor via 15-pin D-sub. Not required for development, but very useful. I happen to have 3 of them from different third parties :
- Finally, the connectivity measure for hooking the DC to the PC.
There are 2 options here. The first is rare, expensive and relatively fast : A DC broadband adapter. The second is slower but much less expensive and relatively easy to come by– the DC coder’s cable. This was a DB-9 adapter on one end and a DC serial adapter on the other, and a circuit in the middle to monkey with voltage levels or some such ; I’m no electrical engineer. I procured this model from the notorious Lik Sang, well before that outfit was sued out of business.
Dealing With Legacy
Take a look at that coder’s cable again. DB-9 ? When was the last time you owned a computer with one of those ? And then think farther back to the last time to had occasion to plug something into one of those ports (likely a serial mouse).
A few years ago, someone was about to toss out this Belkin USB to DB-9 serial converter when I intervened. I foresaw the day when I would dust off the coder’s cable. So now I can connect a USB serial cable to my Eee PC, which then connects via converter to a different serial cable, one which has its own conversion circuit that alters the connection to yet another type of serial cable.
Bits is bits is bits as far as I’m concerned.
Putting It All Together
Now to assemble all the pieces (plus a monitor) into one development desktop :
The monitor says “dcload 1.0.3, idle…”. That’s a custom boot CD-ROM that is patiently waiting to receive commands, code and data via the serial port.
Getting The Software
Back in the day, homebrew software development on the DC revolved around these components :- GNU binutils : for building base toolchains for the Hitachi SH-4 main CPU as well as the ARM7-based audio coprocessor
- GNU gcc/g++ : for building compilers on top of binutils for the 2 CPUs
- Newlib : a C library intended for embedded systems
- KallistiOS : an open source, real-time OS developed for the DC
The DC was my first exposure to building cross compilers. I developed some software for the DC in the earlier part of the decade. Now, I am trying to figure out how I did it, especially since I think I came up with a few interesting ideas at the time.
Struggling With the Software Legacy
The source for KallistiOS has gone untouched since about 2004 but is still around thanks to Sourceforge. The instructions for properly building the toolchain have been lost to time, or would be were it not for the Internet Archive’s copy of a site called Hangar Eleven. Also, KallistiOS makes reference to a program called ‘dc-tool’ which is needed on the client side for communicating with dcload. I was able to find this binary at the Boob ! site (well-known in DC circles).I was able to build the toolchain using binutils 2.20.1, gcc 4.5.1 and newlib 1.18.0. Building the toolchain is an odd process as it requires building the binutils, then building the C compiler, then newlib, and then building the C compiler again along with the C++ compiler because the C++ compiler depends on newlib.
With some effort, I got the toolchain to build KallistiOS and most of its example programs. I documented most of the tweaks I had to make, several of them exactly the same as this one that I recently discovered while resurrecting a 10-year-old C program (common construct in C programming of old ?).
Moment of Truth
So I had some example programs built as ELF files. I told dc-tool to upload and run them on the waiting console. Unfortunately, the tool would just sort of stall, though some communication had evidently taken place. It has been many years since I have seen this in action but I recall that something more ought to be happening.Plan B (Hardware)
This is the point that I remember that I have been holding onto one rather old little machine that still has a DB-9 serial port. It’s not especially ergonomic to set up. I have to run it on my floor because, to connect it to my network, I need to run a 25′ ethernet cable that just barely reaches from the other room. The machine doesn’t seem to like USB keyboards, which is a shame since I have long since ditched any PS/2 keyboards. Fortunately, the box still has an old Gentoo distro and is running sshd, a holdover from its former life as a headless box.
Now when I run dc-tool, both the PC and DC report the upload progress while pretty overscan bars oscillate on the DC’s monitor. Now I’m back in business, until…
Plan C (Software)
None of these KallistiOS example programs are working. Some are even reporting catastrophic failures (register dumps) via the serial console. That’s when I remember that gcc can be a bit fickle on CPU architectures that are not, shall we say, first-class citizens. Back in the day, gcc 2.95 was a certified no-go for SH-4 development. 3.0.3 or 3.0.4 was called upon at the time. As I’m hosting this toolchain on x86_64 right now, gcc 3.0.4 can’t even be built (predates the architecture).One last option : As I searched through my old DC project directories, I found that I still have a lot of the resulting binaries, the ones I built 7-8 years ago. I upload a few of those and I finally see homebrew programming at work again, including this old program (described in detail here).
Next Steps
If I ever feel like revisiting this again, I suppose I can try some of the older 4.x series to see if they build valid programs. Alternatively, try building an x86_32-hosted 3.0.4 toolchain which ought to be a known good. And if that fails, search a little bit more to find that there are still active Dreamcast communities out there on the internet which probably have development toolchain binaries ready for download.