Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (40)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (7858)

  • ffmpeg produces bad output when called from execve in c++

    31 mai 2016, par Arheisel

    im writing a c++ program that involves ffmpeg being called from a c++ program. a couple of days ago i got it working using std::system

    std::system("ffmpeg -threads auto -y -r 1.74659 -i /mnt/ev_ramdsk/1/%05d-capture.jpg -px_fmt yuv420p -preset ultrafast -r 10 /mnt/ev_ramdsk/1/video.mp4");

    but this only worked once now this produces .mp4 videos of 8MB or so that cannot be played anywhere.. so because of a suggestion in a previous question i moved to execve.

    Here is my code

    child_pid = fork();
           if(child_pid < 0){
               syslog(LOG_ERR, "ERROR: ffmpeg forking failed");
               return false;
           }
           else if(child_pid > 0){
               syslog(LOG_DEBUG, "DEBUG: forking succeeded, pid: %d", child_pid);
           }
           else if(child_pid == 0){
               char *newargv[16];
               for(int i=0; i < 15; i++) newargv[i] = (char *)malloc(sizeof(char) * 60); //allocate the array in memory
               strcpy(newargv[0], "/usr/bin/ffmpeg");
               strcpy(newargv[1], "-threads");
               strcpy(newargv[2], "auto");
               strcpy(newargv[3], "-y");
               strcpy(newargv[4], "-framerate");
               tempSS << fps;
               strcpy(newargv[5], tempSS.str().c_str());
               tempSS.str(std::string());
               strcpy(newargv[6], "-i");
               strcpy(newargv[7], std::string(conf->dir_ram + dest + "%05d-capture.jpg").c_str());
               strcpy(newargv[8], "-pix_fmt");
               strcpy(newargv[9], "yuv420p");
               strcpy(newargv[10], "-preset");
               strcpy(newargv[11], "ultrafast");
               strcpy(newargv[12], "-r");
               strcpy(newargv[13], "25");
               strcpy(newargv[14], std::string(conf->dir_ram + dest + "video.mp4").c_str());
               newargv[15] = NULL;

               for(int i=0; i < 15; i++){
                   tempSS << "newargv[" << i << "] = \"" << newargv[i] << "\", ";
               }
               syslog(LOG_DEBUG, "DEBUG:newargv: %s", tempSS.str().c_str());
               tempSS.str(std::string());

               char *newenviron[] = { NULL };

               if(execve(newargv[0], newargv, newenviron) == -1){
                   syslog(LOG_ERR, "ERROR: execve returned -1");
                   exit(EXIT_SUCCESS);
               }
           }

           wpid = wait(&status);
           syslog(LOG_DEBUG, "DEBUG: ffmpeg child terminated, pid: %d, status: %d", wpid, status);

    the output of syslog is :

    May 28 00:25:03 SERVER dt_ev_maker[10471]: DEBUG: forking succeeded, pid: 10658
    May 28 00:25:03 SERVER dt_ev_maker[10658]: DEBUG:newargv:
    newargv[0] = "/usr/bin/ffmpeg",
    newargv[1] = "-threads",
    newargv[2] = "auto",
    newargv[3] = "-y",
    newargv[4] = "-framerate",
    newargv[5] = "1.45097",
    newargv[6] = "-i",
    newargv[7] = "/mnt/ev_ramdsk/1/%05d-capture.jpg",
    newargv[8] = "-pix_fmt",
    newargv[9] = "yuv420p",
    newargv[10] = "-preset",
    newargv[11] = "ultrafast",
    newargv[12] = "-r",
    newargv[13] = "25",
    newargv[14] = "/mnt/ev_ramdsk/1/video.mp4",
    May 28 00:25:03 SERVER dt_ev_maker[10471]: DEBUG: ffmpeg child terminated, pid: 10658, status: 256

    in this case the video has about 90B size and is also corrupted.

    NOTE : if i run the same command from the command line the video can be played normally.

    what am i doing wrong ?

    Thanks in advance !

    EDIT

    Thanks to ouroborus (changes submitted above) i got it to make 18MB videos, but i cant play them.

  • Anomalie #2273 : Choisir la largeur d’affichage des visuels

    27 septembre 2016, par b b

    Voir #3582 et #3449 qui propose d’intégrer le comportement du plugin medoc dans le core, ce qui semble répondre à la demande. Si oui, on pourrait fermer ce ticket et continuer la discussion sur #3582 ?

  • Elegant early exit from a spawned ffmpeg process in C

    21 octobre 2016, par jackson80

    I have a program where I build an ffmpeg command string to capture videos with options input through a gtk3 gui. Once I have all my options selected, I spawn a process with the ffmpeg command string. And I add a child watch to tell me when the process has completed.

     // Spawn child process
     ret = g_spawn_async (NULL, argin, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid1, NULL);
     if ( !ret )
     {
       g_error ("SPAWN FAILED");
       return;
     }

    /* Add watch function to catch termination of the process.  This function
      * will clean any remnants of process */
     g_child_watch_add (pid1, (GChildWatchFunc)cb_child_watch, widget );

    Executing ffmpeg from a terminal using a command line, the program will give an option to input a "q" at the terminal to end the ffmpeg process early.
    Is there any way to send a "q" to that spawned process to elegantly end the ffmpeg ? I’m fairly sure I could kill the process using the process id, but I would rather stop it using a mechanism that allows ffmpeg to gracefully exit..
    This is running Centos 7, kernel 4.7.5, ffmpeg version 3.0.2.
    Since I can still access the terminal where the ffmpeg output is displayed, I’ve tried typing a "q", but it has no effect on the process.