Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (44)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6163)

  • what is ffmpeg exit code 2 ? and also output error array is empty and not working in php

    14 juin 2019, par Mehdi Zamani

    I use ffmpeg to convert bitrate to 128 but not working in php

    exec("ffmpeg -i input.mp3 -codec:a libmp3lame -b:a 128k output().mp3 2>&1",
    $output, $exit_code);
    if ($exit_code!= 0) {
       $data['message'][] = "Error";
    }

    print_r($output);
    print_r($exit_code);
    exit;

    After running this code show error code 2.
    The output is an empty array and also exit_code is 2 and not create output.mp3 file.

    I already study How can I find out what this ffmpeg error code means ? but this isn’t my problem and don’t explain error code 2 or error code 2 is not defined. My problem is dont show any error and error message is empty just exit_code show 2 that means is some error happened.

  • How to accurately match an image to a video frame and exit with ffmpeg

    10 avril 2020, par Hans J

    In Bash,
I am trying to match an image to a frame in ffmpeg. I also want to exit the ffmpeg process when the match is found. Here is a (simplified version) of the code currently :

    



    ffmpeg --hide_banner -ss 0 -to 60 \
-i "video.mp4" -i "image.jpg" -filter_complex \
"blend=difference, blackframe" -f null - null 2>log.txt &
pid=$!
trap "kill $pid 2>/dev/null" EXIT
while kill -0 $pid 2>/dev/null; do
     # (grep command to monitor log file)
     # if grep finds blackframe match, return blackframe time
done


    



    To my understanding, if the video actually contains a blackframe I will get a false-positive. How can I effectively mitigate this ?

    



    While this is unnecessary to answer the question, I would like to exit the ffmpeg process without having to use grep to constantly monitor the log file, instead using pure ffmpeg

    



    Edit : I say this because while I understand the blend filter is computing the difference, I am getting a false positive on a blackframe in my video and I don't know why.

    



    Edit : A possible solution to this issue is to not use blackframe at all, but psnr (Peak Signal to Noise Ratio) but normal usage is by comparing two videos frame by frame, and I don't know how to effectively use it with an image as input.

    


  • ffplay does not exit in forked child

    6 septembre 2019, par user12030145

    ffplay  -autoexit does not exit in a forked child

    I need to pipe my application (stdout) to ffplay (stdin). I do this by forking ffplay as a child and using -i pipe:0 as argument.

    #include
    #include
    #include <sys></sys>types.h>
    #include <sys></sys>wait.h>

    int main(int argc, const char** argv)
    {
    int tube[2];
    int c;
    FILE* f = fopen(argv[1], "rb");
    pid_t pid;
    if (argc &lt; 2) return -1;
    if (pipe(tube))  {
       perror("Pipe");
       return -1;
     }

    // main process cats a .mlp file to stdout, sent to a child ffplay stdin through a pipe
    char* const arg[] = {"-i", "pipe:0", "-f", "mlp", "-nodisp", "-autoexit", NULL};
    switch (pid = fork())    {
               case -1:
                   fprintf(stderr,"%s\n", "Could not launch ffplay");
                   break;

               case 0:
                   close(tube[1]);
                   dup2(tube[0], STDIN_FILENO);
                   execv("/usr/bin/ffplay", arg);
                   fprintf(stderr, "%s\n", "Runtime failure in ffplay child process");
                   return -2;

               default:
                   close(tube[0]);
                   dup2(tube[1], STDOUT_FILENO);
           }

    // Here the main process code sending the .mlp file to stdout...

    while ((c = fgetc(f)) != EOF) putchar(c);

    waitpid(pid, NULL, 0);
    fclose(f);

    // main never returns
    return 0;
    }

    The issue is that in this context, ffplay -autoexit never exits (GNU-Linux platform). In a main process, ffplay -autoexit always exits at the end of a media file.
    Is there a pure C workaround without using system, popen or scripting ?
    Is this a feature or a bug of ffplay (I cannot tell) ?