Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • how to create or extract a silent mp3 from a video file using ffmpeg or mencoder ? [migrated]

    25 octobre 2011, par mirswith

    I am looking to create an mp3 of silence that is the same duration as the input video file using either ffmpeg or mencoder.

    Using ffmpeg I have tried this:

    ffmpeg -y -i in.avi -ab 8k -ac 1 -vol 0 -acodec libmp3lame out.mp3
    

    Which works great if the video has an audio track but fails miserably if it does not.

    Any ideas?

    Thanks!

  • FFPMEG : any example of an RTSP client ? [closed]

    25 octobre 2011, par Alex

    Where can I find an example C code for a simple RTSP client?

  • Alfresco Content transformation from .avi to *.flv using ffmpeg

    25 octobre 2011, par Masanchez

    I'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'?>
    
    
        
            
                
            
            
                
                    
                        
                            
                                
                                    ffmpeg
                                    -version
                                
                            
                        
                    
                    
                        1
                    
                
            
            
                
                    
                        
                            
                                ffmpeg -i '${target}' ${flv.encoder.params} '${source}'
                            
                        
                    
                    
                        1,2
                    
                    
                        true
                    
                    
                        
                            -vcodec flv
                        
                    
                
            
            
                
    
                        
                            video/avi
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/x-msvideo
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/mpeg
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/mp4
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/mpeg2
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/x-sgi-movie
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/quicktime
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/x-ms-asf
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/x-ms-wmv
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/x-rad-screenplay
                        
                        
                            video/x-flv
                        
                    
                    
                        
                            video/ogg
                        
                        
                            video/x-flv
                        
                    
                
            
        
        
            
                
            
        
    
    

    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:

    
            ffmpeg -y -i '${target}' ${flv.encoder.params} '${source}'
    
    

    Source <-> Target

    
        -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
    
    

    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 AM
    

    I 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

  • ffmpeg bitrate error when trying to capture frames at intervals from a video

    25 octobre 2011, par TheShaggyBeard

    Here is the error I get from running this script:

    [mjpeg @ 0x8559710]bitrate tolerance too small for bitrate Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

    So here is what I am trying to do - I want to automate creating animated gif previews from a video file (in this case I know they will always be a specific format being mp4). Here is what I have:

    echo 'Save the file-name and make a folder named "filenamemp4"'
    fileName=$(find . -type f -name "*.mp4")
    folderName=$( cat $fileName | grep -o [[:alnum:]] | tr -d '\n' | cat)
    
    echo 'Grab the frame rate and total number of frames and put them into xaa and xab'
    qtinfo asa.mp4 | awk 'NR = 1 { print $2 }' | grep -o "^[0-9]*" | split -l 1
    
    echo 'Assign values to variable'
    frameRate=$(cat xaa)
    frameTotal=$(cat xab)
    videoLength=$(expr $frameTotal / $frameRate)
    
    echo 'Take a screenshot at 10% intervals - this is the part that gives me a bitrate error.  It says that the -r option has an invalid input being 1 / value of videoLength' 
    ffmpeg -i $fileName -y -ss $videoLength -an -sameq -f image2 -s 'qcif' -r $(expr 1/$videoLength) preview%02d.jpg
    
    echo 'Take the jpgs and mash them into an animated gif'
    convert -delay 50 -loop 10 preview*.jpg preview.gif
    
    echo 'Move the gif to the specified folder'
    mv preview.gif $folderName/preview.gif
    
    echo 'Clean Up'
    find . -type f -name "*.jpg" -exec rm -rf {} \;
    

    So perhaps there is a better way of doing this, or I am understanding how to use the -r option of ffmpeg wrong. In the tutorial I read on ffmpeg for a similar scenario, they used -r 1/5 to produce frames with a 5 second interval. My assumption is that for the desired interval you want, you just slap it in the denominator for the -r option.

  • How to render video and audio

    25 octobre 2011, par pic11

    I am trying to implement my own media player. What is the best way to render video and audio? At this point I am thinking to use SurfaceView and AudioTrack classes, but not sure if it is the best option. I am interested in SDK and NDK solutions.

    File output on regular desktop is non-blocking, that is OS takes care of buffering and actual disk writes are asynchronous to the thread that initiates the output. Does the same principle apply to video and audio output? If not, I would need to run a separate thread to handle output asynchronously from decoding/demuxing.

    What free software decoders are available for android? I am thinking to use ffmpeg. Can relatively recent (say, top 30% in terms of CPU power) tablet handle 1,280×720 and 1,920×1,080 formats in software mode?