Recherche avancée

Médias (91)

Autres articles (92)

  • 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 (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (14195)

  • Returning struct from function causes memory corruption

    8 janvier 2015, par William Seemann

    I’m trying to return a FFmpeg AVDictionary struct from one function to another. I wrote the following two functions :

    int get_p_metadata(State **ps, AVDictionary *metadata) {
       printf("get_p_metadata\n");

       State *state = *ps;

       if (!state || !state->pFormatCtx) {
           return FAILURE;
       }

       metadata = NULL;
       av_dict_copy(&metadata, state->pFormatCtx->metadata, 0);

       printf("count in get_p_metadata %d\n", metadata->count);

       return SUCCESS;
    }

    int get_metadata(State **ps) {
       printf("get_metadata\n");

       AVDictionary m;
       get_p_metadata(ps, &m);
       printf("count in get_metadata %d\n", (&m)->count);

       return SUCCESS;
    }

    The code compiles and runs however when I call the get_metadata function the generated output is :

    count in get_p_metadata 12
    count in get_metadata 2073109240

    Can someone explain why the value of count changes from 12 to a random value every time I run this code ? Why isn’t the value of 12 retained once the get_p_metadata function returns ? How would I fix this ?

    UPDATE :

    This solution worked (Thanks to Cornstalks for actually reading the FFmpeg documentation and
    linkdd for the answer) :

    int get_p_metadata (State **ps, AVDictionary **metadata) {
       printf("get_p_metadata\n");

       State *state = *ps;

       if (!state || !state->pFormatCtx) {
           return FAILURE;
       }

       av_dict_copy(metadata, state->pFormatCtx->metadata, 0);

       return SUCCESS;
    }

    int get_metadata(State **ps, AVDictionary *metadata) {
       printf("get_metadata\n");

       AVDictionary *m = NULL;
       get_p_metadata (ps, &m);
       printf("count in get_metadata %d\n", m->count);

       return SUCCESS;
    }
  • Windows 2003 using php popen "start /b" because of executing ffmpeg.exe

    1er juillet 2013, par Oh Seung Kwon

    I have some problem.

    There is a php code that convert audio(wav) to mp3 file with using ffmpeg.exe.

    Here is some code.

    $cmd = "./inc/ffmpeg.exe -i ".$file_name." -acodec mp3 -y -ac 1 -ab 96k ".$mp3_file_name;

    echo $cmd;
    echo "Windows";
    $handle = popen("start /B ".$cmd, "r");
    while(!feof($handle)) {
       $read = fread($handle, 2096);
       echo $read;
    }
    pclose($handle);

    Problem is when I execute this code, ffmpeg.exe process isn't terminated. And not gonna die when I stop process with using Windows task manager.

    Do you have a solution for this situation ?

  • FFMPEG - Palettegen for animations is not working

    18 juillet 2018, par deanhodges

    I have a script taken from the correct answer at https://superuser.com/questions/1002562/convert-multiple-images-to-a-gif-with-cross-dissolve, but I am getting no results.

    Even copying the code word for word does not work for me.

    However, if I run $ffmpeg = shell_exec("ffmpeg -i images/image001.jpg -vf palettegen palette_test.png"); on a single image, it works fine. But because I need it for an animation, I need to create a pallete for all images.

    Unless of course, on each image in the GIF sequence I can load a new palette ?

    $q = "ffmpeg -f image2 -framerate 0.5 -i ../view/client/files/".$dir."/%*.jpg -i palettePro.png -lavfi paletteuse -y .." . $save_path . '/' . $filename . " -report";