Recherche avancée

Médias (91)

Autres articles (74)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

Sur d’autres sites (9052)

  • Statically linking FFmpeg libraries into native C++ node addon

    11 juin 2019, par Suhail Doshi

    I trying to run a node addon that links to libraries without having to include their dynamic .dll library :

    When I try to include their static archive : .dll.a extension on Windows, the node addon returns an error :

    $ node index.js --client
    internal/modules/cjs/loader.js:840
     return process.dlopen(module, path.toNamespacedPath(filename));
                    ^

    Error: The specified procedure could not be found.

    This generally means that it was expecting to load some other function from a library but failed to find it. If there’s a way to debug this error message more specifically, I’d also love to know how !

    I’ve tried re-ordering the libraries, using different extensions, etc.

    I originally used just the .lib extension instead of the .dll.a extensions and the program works fine if I include the .dll’s.

    The code works fine if I use .lib files and place their corresponding .dlls in the same directory as the application I am executing.

    I’ve used these resources :

    I am using N-API and here’s what I am doing in binding.gyp :

    'libraries': [
               "ws2_32.lib",

               "C:\\Users\\$(username)\\Desktop\\workspace\\ffmpeg-win64-dev\\lib\\libavcodec.dll.a",
               "C:\\Users\\$(username)\\Desktop\\workspace\\ffmpeg-win64-dev\\lib\\libavutil.dll.a",
               "C:\\Users\\$(username)\\Desktop\\workspace\\ffmpeg-win64-dev\\lib\\libswresample.dll.a",

    I am expecting my application (node index.js --client) to run correctly without the need the .dlls I’ve had to include in the past.

    EDIT

    It’s possible this problem is as simple as : How do you statically link these FFmpeg libraries on Windows vs having anything to do with node specifically.

  • How to get your Piwik plugin translated in many languages ?

    8 septembre 2015, par Stefan Giehl — Community, Development, Plugins

    About a year ago we introduced the Piwik Marketplace to make it easy for developers to share their plugins with all Piwik users.

    As Piwik is currently available in 54 languages we would love to have as many plugins as possible available in at least a few of those languages.

    Currently most plugins on the Marketplace are only available in English and sometimes some other languages. To improve this situation, we offer plugin developers the possibility to use the power of our translators community to get their plugins translated.

    Some plugin developers are already using this service and some very popular plugins like BotTracker or CustomOptOut have already been translated in more than 10 languages !

    Getting translations for your plugin

    As long as you are developing an open source plugin hosted on Github, you may get in touch with us (translations@piwik.org) in order to get your plugin translated by the Piwik translators community.

    You will need an account on Transifex.com. If you use Transifex with a social login, please ensure to set a password in your account settings. This will be required for fetching new translations into your plugin repository.

    Importing your plugin’s strings in the translation platform

    While doing the initial setup for your plugin, we will import your english translation file (en.json) in your Github plugin repository and we will configure an auto-update for this file. Source strings on Transifex will automatically synchronise with your plugin repository. When you change any string in your en.json translation file, the updated English strings will automatically be imported in Transifex.

    How to fetch your plugins translations into your repository

    As soon as we have set up your plugin within our project Piwik on Transifex and there are new translations available, you will be able to update your plugin translations using the Piwik console. You will need a locally installed Piwik with development mode enabled, and your plugin installed. To update the translations go to the Piwik directory on your development box and execute the following command :

    ./console translations:update -u {YourTransifexUserName} -p {YourTransifexPassword} -P {YourPluginName}

    We are looking forward to seeing your Piwik plugins available in more languages ! For more information, check out our Translations plugin developer guide.

    Happy hacking,

  • Decode AAC to PCM with ffmpeg on android

    26 novembre 2012, par JeffG

    I have built ffmpeg 0.8.12 (love) with the android NDK (r8c) on ubuntu.
    I then use the generated library in another android application through JNI.

    Essentially what I want to do is pass a byte stream from java to my c jni function and use ffmpeg to decode it into a PCM audio buffer which will then be passed back to java to be played using Android's AudioTrack. I can successfully pass the buffer through to jni (have checked the values) and ffmpeg seems to initialise correctly, but when it tries to decode the first frame, it throws an error in the aac_decode_frame_int method in aacdec.c "channel element 0.0 is not allocated". The aac file plays fine and is valid.

    Here is my jni code to do the decoding

    jint Java_com_example_testffmpeg_MainActivity_decodeAacBytes(JNIEnv * env,
           jobject this, jbyteArray input, jint numBytes) {

       //copy bytes from java
       jbyte* bufferPtr = (*env)->GetByteArrayElements(env, input, NULL);
       uint8_t inputBytes[numBytes + FF_INPUT_BUFFER_PADDING_SIZE];
       memset(inputBytes, 0, numBytes + FF_INPUT_BUFFER_PADDING_SIZE);
       memcpy(inputBytes, bufferPtr, numBytes);
       (*env)->ReleaseByteArrayElements(env, input, bufferPtr, 0);

       av_register_all();

       AVCodec *codec = avcodec_find_decoder(CODEC_ID_AAC);

       if (codec == NULL) {
           LOGE("Cant find AAC codec\n");
           return 0;
       }
       LOGI("AAC codec found\n");

       AVCodecContext *avCtx = avcodec_alloc_context();

       if (avCtx == NULL) {
           LOGE("Could not allocate codec context\n");
           return 0;
       }
       LOGI("codec context allocated\n");

       if (avcodec_open2(avCtx, codec, NULL) < 0) {
           LOGE("Could not open codec\n");
           return 0;
       }
       LOGI("AAC codec opened");

       //the input buffer
       AVPacket avPacket;
       av_init_packet(&avPacket);

       LOGI("AVPacket initialised\n");

       avPacket.size = numBytes; //input buffer size
       avPacket.data = inputBytes; // the input buffer

       int outSize;
       int len;
       uint8_t *outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);

       while (avPacket.size > 0) {
           outSize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
           len = avcodec_decode_audio3(avCtx, (short *) outbuf, &outSize,
                   &avPacket);

           if (len < 0) {
               LOGE("Error while decoding\n");
               return 0;
           }

           if (outSize > 0) {
               LOGI("Decoded some stuff\n");
           }

           avPacket.size -= len;
           avPacket.data += len;
       }

       LOGI("Freeing memory\n");

       av_free_packet(&avPacket);
       avcodec_close(avCtx);
       av_free(avCtx);

       return 0;
    }

    The problem occurs in the call to avcodec_decode_audio3, when the decoding first occurs. I have stepped through the ffmpeg code, but can't find the problem. Any help would be greatly appreciated !