Recherche avancée

Médias (0)

Mot : - Tags -/performance

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (101)

  • Les sons

    15 mai 2013, par
  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (12128)

  • Trying to use FFMPEG for android. Compiling but still not working

    15 avril 2014, par Austin Mueller

    So to start off... Im trying to use ffmpeg to compile an array of images into a video on Android.

    I have followed a variety of tutorials online and have gotten as far as being able to compile the lib for Android and still have to project run.
    The repo im now using can be found here : https://github.com/Batterii/android-ffmpeg-x264

    I made a couple tweaks to the setttings.sh just to correct ndk location. Besides that, I followed the instructions and it seemed to work flawlessly.

    After that, I converted the "Project" project into an Android stdio library module.
    Screenshot of android studio module

    I am not getting any compile errors, nor am I getting any runtime errors, or any other errors that I can detect... Nothing on logcat... But I am definitely not getting any video called out.mp4.
    In an onCreate of a particular activity, I am running this code :

    Videokit vk = new Videokit();
    vk.run(new String[]{"ffmpeg", "-r", "1/5", "-i", "%d.jpg", "-c:v", "libx264", "-r", "30", "-pix_fmt", "yuv420p", project.getProjectDirectory() + "/out.mp4"});

    This command is taken from the command line example found here :
    https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images

    Thank you in advance for anyone taking the time to look through this post... I am pretty baffled at this point, as there are no errors I can find and no video...
    Thanks

    ======================================================================

    Update

    Turns out it is not actually compiling correctly... but i have found a few things.
    here is the make file from the Eclipse version of the project

    LOCAL_PATH := $(call my-dir)

    include $(CLEAR_VARS)
    LOCAL_MODULE  := videokit
    # These need to be in the right order
    FFMPEG_LIBS := $(addprefix ffmpeg/, \
    libavdevice/libavdevice.a \
    libavformat/libavformat.a \
    libavfilter/libavfilter.a \
    libavcodec/libavcodec.a \
    libswscale/libswscale.a \
    libavutil/libavutil.a \
    libswresample/libswresample.a \
    libpostproc/libpostproc.a )
    # ffmpeg uses its own deprecated functions liberally, so turn off that annoying noise
    LOCAL_CFLAGS += -g -Iffmpeg -Ivideokit -Wno-deprecated-declarations
    LOCAL_LDLIBS += -llog -lz $(FFMPEG_LIBS) x264/libx264.a
    LOCAL_SRC_FILES :=  ffmpeg/cmdutils.c ffmpeg/ffmpeg.c videokit/uk_co_halfninja_videokit_Videokit.c
    include $(BUILD_SHARED_LIBRARY)

    and here is the make file that gradle is auto-generating for me... thanks to Android Studio...

    LOCAL_PATH := $(call my-dir)
    include $(CLEAR_VARS)

    LOCAL_MODULE := videokit
    LOCAL_CFLAGS := -g -Isrc/main/jni/ffmpeg -Isrc/main/jni/videokit -Wno-deprecated-declarations
    LOCAL_LDLIBS := \
       -lffmpeg/libavformat/libavformat.a \
       -lffmpeg/libavcodec/libavcodec.a \
       -lffmpeg/libswresample/libswresample.a \
       -lffmpeg/libavfilter/libavfilter.a \
       -lffmpeg/libpostproc/libpostproc.a \
       -lffmpeg/libavdevice/libavdevice.a \
       -lx264/libx264.a \
       -lffmpeg/libavutil/libavutil.a \
       -llog \
       -lz \
       -lffmpeg/libswscale/libswscale.a \

    LOCAL_SRC_FILES := \
       Project/Module/src/main/jni/ffmpeg/cmdutils.c \
       Project/Module/src/main/jni/ffmpeg/ffmpeg.c \
       Project/Module/src/main/jni/videokit/com_t10_project_util_FfmpegHelper.c \

    LOCAL_C_INCLUDES += Project/Module/src/main/jni/ffmpeg/cmdutils.c
    LOCAL_C_INCLUDES += Project/Module/src/main/jni/ffmpeg/ffmpeg.c
    LOCAL_C_INCLUDES += Project/Module/src/main/jni/videokit/com_t10_project_util_FfmpegHelper.c
    LOCAL_C_INCLUDES += Project/Module/src/arm/jni
    LOCAL_C_INCLUDES += Project/Module/src/debug/jni
    LOCAL_C_INCLUDES += Project/Module/src/armDebug/jni

    include $(BUILD_SHARED_LIBRARY)

    And finally, here is my build.gradle

    apply plugin: 'android'

    android {
       compileSdkVersion 19
       buildToolsVersion '19.0.1'

       defaultConfig {
           minSdkVersion 14
           targetSdkVersion 19
           versionCode 1
           versionName "1.0"

           ndk {
               moduleName "videokit"
               stl "stlport_shared"
               ldLibs "log", "z",
                       "ffmpeg/libavdevice/libavdevice.a",
                       "ffmpeg/libavformat/libavformat.a",
                       "ffmpeg/libavfilter/libavfilter.a",
                       "ffmpeg/libavcodec/libavcodec.a",
                       "ffmpeg/libswscale/libswscale.a",
                       "ffmpeg/libavutil/libavutil.a",
                       "ffmpeg/libswresample/libswresample.a",


                 "ffmpeg/libpostproc/libpostproc.a",
                   "x264/libx264.a"
               cFlags "-g -Isrc/main/jni/ffmpeg -Isrc/main/jni/videokit -Wno-deprecated-declarations"

           }
       }

       sourceSets.main {
           jniLibs.srcDir 'src/main/libs'
           jni.srcDirs = ['src/main/jni/ffmpeg/cmdutils.c',
                          'src/main/jni/ffmpeg/ffmpeg.c',
                          'src/main/jni/videokit/com_t10_project_util_FfmpegHelper.c']
       }

       productFlavors {
           x86 {
               versionCode Integer.parseInt("6" + defaultConfig.versionCode)
               ndk {
                   abiFilter "x86"
               }
           }
           mips {
               versionCode Integer.parseInt("4" + defaultConfig.versionCode)
               ndk {
                   abiFilter "mips"
               }
           }
           armv7 {
               versionCode Integer.parseInt("2" + defaultConfig.versionCode)
               ndk {
                   abiFilter "armeabi-v7a"
               }
           }
           arm {
               versionCode Integer.parseInt("1" + defaultConfig.versionCode)
               ndk {
                   abiFilter "armeabi"
               }
           }
           fat
       }

       buildTypes {
           release {
               runProguard false
               proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
           }
       }
    }

    dependencies {
       compile 'com.android.support:support-v4:19.0.0'
       compile fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
    }

    As you can see, my build.gradle generates something that is pretty close to the original... but not the same. When i try to run/compile it, gradle spits this out

    Executing tasks: [:Project:assembleArmDebug]

    :Project:compileArmDebugNdkcc1: warning: Project/Module/src/main/jni/ffmpeg/cmdutils.c: not a directory [enabled by default]
    cc1: warning: Project/Module/src/main/jni/ffmpeg/ffmpeg.c: not a directory [enabled by default]
    cc1: warning: Project/Module/src/main/jni/videokit/com_t10_project_util_FfmpegHelper.c: not a directory [enabled by default]
    In file included from Project/Module/src/main/jni/ffmpeg/cmdutils.c:32:0:
    Project/Module/src/main/jni/ffmpeg/libavformat/avformat.h:82:32: fatal error: libavcodec/avcodec.h: No such file or directory
    compilation terminated.
    make: *** [Project/Module/build/ndk/arm/debug/obj/local/armeabi/objs/videokit/Project/Module/src/main/jni/ffmpeg/cmdutils.o] Error 1
    FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':Project:compileArmDebugNdk'.
    > com.android.ide.common.internal.LoggedErrorException: Failed to run command:
       android-ndk-r9d/ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=Project/Module/build/ndk/arm/debug/Android.mk APP_PLATFORM=android-19 NDK_OUT=Project/Module/build/ndk/arm/debug/obj NDK_LIBS_OUT=Project/Module/build/ndk/arm/debug/lib APP_STL=stlport_shared APP_ABI=armeabi
     Error Code:
       2
     Output:
       cc1: warning: Project/Module/src/main/jni/ffmpeg/cmdutils.c: not a directory [enabled by default]
       cc1: warning: Project/Module/src/main/jni/ffmpeg/ffmpeg.c: not a directory [enabled by default]
       cc1: warning: Project/Module/src/main/jni/videokit/com_t10_project_util_FfmpegHelper.c: not a directory [enabled by default]
       In file included from Project/Module/src/main/jni/ffmpeg/cmdutils.c:32:0:
       Project/Module/src/main/jni/ffmpeg/libavformat/avformat.h:82:32: fatal error: libavcodec/avcodec.h: No such file or directory
       compilation terminated.
       make: *** [Project/Module/build/ndk/arm/debug/obj/local/armeabi/objs/videokit/Project/Module/src/main/jni/ffmpeg/cmdutils.o] Error 1


    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED

    Total time: 8.184 secs

    I've been messing around with it for a couple hours now and pretty much every time, i get gradle yelling at me about the fact that it can't find some file. I'm beginning to think that maybe it is because my LOCAL_LDLIBS aren't in the same order as the original...? Im not entirely sure... Does anyone else have any ideas...?

  • VP8 and WebM, not working in ffmpeg-php [migrated]

    6 octobre 2012, par Olaf Erlandsen

    I need a help with ffmpeg-php and Ffmpeg.

    Ffmpeg :

    ffmpeg version 1.0.git
    built on Oct  6 2012 01:54:50 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
    configuration: --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-version3
    libavutil      51. 73.102 / 51. 73.102
    libavcodec     54. 63.100 / 54. 63.100
    libavformat    54. 29.105 / 54. 29.105
    libavdevice    54.  3.100 / 54.  3.100
    libavfilter     3. 19.102 /  3. 19.102
    libswscale      2.  1.101 /  2.  1.101
    libswresample   0. 16.100 /  0. 16.100
    libpostproc    52.  1.100 / 52.  1.100

    Ffmpeg-PHP

    FFmpeg 0.6.5
    libavutil     50.15. 1 / 50.15. 1
    libavcodec    52.72. 2 / 52.72. 2
    libavformat   52.64. 2 / 52.64. 2
    libavdevice   52. 2. 0 / 52. 2. 0
    libavfilter    1.19. 0 /  1.19. 0
    libswscale     0.11. 0 /  0.11. 0
    libpostproc   51. 2. 0 / 51. 2. 0

    FFMPEG-PHP Command :

    ffmpeg -y -i /f1ccd3a27d36270492ce660da358b436.mp4 -t 99 -f webm /f1ccd3a27d36270492ce660da358b436.webm

    FFMPEG(SSH) Command :

    ffmpeg -y -i /f1ccd3a27d36270492ce660da358b436.mp4 -t 99 -f webm /f1ccd3a27d36270492ce660da358b436.webm

    FFMPEG-PHP Output :

    FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
     built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
     libavutil     50.15. 1 / 50.15. 1
     libavcodec    52.72. 2 / 52.72. 2
     libavformat   52.64. 2 / 52.64. 2
     libavdevice   52. 2. 0 / 52. 2. 0
     libavfilter    1.19. 0 /  1.19. 0
     libswscale     0.11. 0 /  0.11. 0
     libpostproc   51. 2. 0 / 51. 2. 0
    Seems stream 1 codec frame rate differs from container frame rate: 59.94 (2997/50) -> 29.97 (30000/1001)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/f1ccd3a27d36270492ce660da358b436.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isomavc1mp42
     Duration: 00:04:16.32, start: 0.000000, bitrate: 650 kb/s
       Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 108 kb/s
       Stream #0.1(und): Video: h264, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 539 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
    Output #0, webm, to '/f1ccd3a27d36270492ce660da358b436.webm':
       Stream #0.0(und): Video: 0x0000, yuv420p, 480x360 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
       Stream #0.1(und): Audio: 0x0000, 44100 Hz, stereo, s16, 64 kb/s
    Stream mapping:
     Stream #0.1 -> #0.0
     Stream #0.0 -> #0.1
    Encoder (codec id 146) not found for output stream #0.0

    FFMPEG(SSH) Output :

    ffmpeg version 1.0.git Copyright (c) 2000-2012 the FFmpeg developers
     built on Oct  6 2012 01:54:50 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
     configuration: --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-version3
     libavutil      51. 73.102 / 51. 73.102
     libavcodec     54. 63.100 / 54. 63.100
     libavformat    54. 29.105 / 54. 29.105
     libavdevice    54.  3.100 / 54.  3.100
     libavfilter     3. 19.102 /  3. 19.102
     libswscale      2.  1.101 /  2.  1.101
     libswresample   0. 16.100 /  0. 16.100
     libpostproc    52.  1.100 / 52.  1.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/f1ccd3a27d36270492ce660da358b436.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isomavc1mp42
       creation_time   : 2009-12-23 02:00:55
     Duration: 00:04:16.32, start: 0.000000, bitrate: 650 kb/s
       Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 108 kb/s
       Metadata:
         creation_time   : 2009-12-23 02:00:55
         handler_name    : (C) 2007 Google Inc. v08.13.2007.
       Stream #0:1(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 539 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
       Metadata:
         creation_time   : 2009-12-23 02:00:55
         handler_name    : (C) 2007 Google Inc. v08.13.2007.
    [libvpx @ 0x2166e00] v1.1.0
    Output #0, webm, to '/f1ccd3a27d36270492ce660da358b436.webm':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isomavc1mp42
       encoder         : Lavf54.29.105
       Stream #0:0(und): Video: vp8, yuv420p, 480x360 [SAR 1:1 DAR 4:3], q=-1--1, 200 kb/s, 1k tbn, 29.97 tbc
       Metadata:
         creation_time   : 2009-12-23 02:00:55
         handler_name    : (C) 2007 Google Inc. v08.13.2007.
       Stream #0:1(und): Audio: vorbis, 44100 Hz, stereo, flt
       Metadata:
         creation_time   : 2009-12-23 02:00:55
         handler_name    : (C) 2007 Google Inc. v08.13.2007.
    Stream mapping:
     Stream #0:1 -> #0:0 (h264 -> libvpx)
     Stream #0:0 -> #0:1 (aac -> libvorbis)
    Press [q] to stop, [?] for help
    [libvorbis @ 0x2167340] Que input is backward in time
    frame= 2968 fps= 61 q=0.0 Lsize=    4464kB time=00:01:39.03 bitrate= 369.3kbits/s
    video:3068kB audio:1319kB subtitle:0 global headers:4kB muxing overhead 1.662821%

    Error :

    Encoder (codec id 146) not found for output stream #0.0
  • Revision 66607 : Remise a plat des listes d’objet : structure commune .liste[.long][.short] ...

    9 octobre 2012, par cedric@… — Log

    Remise a plat des listes d’objet :
    structure commune .liste[.long][.short] &gt ; .liste-items[.long][.short] &gt ; .item
    le contenu de chaque .item est fourni par inclure/resume/xxx.html (article, rubrique, breve... a completer) qui a une structure commune (héritée de hNews) dans un &lt ;article&gt ;
    Les classes modificatrices .long ou .short permettent d’avoir une liste plus detaillee ou plus courte, mais ce n’est qu’une option de presentation, le html etant identique.
    Le seul parametre pris en compte par resume/xxx est "coupe" qui permet de changer la longueur de coupe
    Un repertoire de demo (activé pour les seuls webmestres) avec une page de presentation des listes (toutes variantes)
    .secondary sur le contenu secondaire du layout (les colonnes)