Recherche avancée

Médias (0)

Mot : - Tags -/serveur

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

Autres articles (98)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (6142)

  • ffmpeg - cuda encode - OpenEncodeSessionEx failed : out of memory

    31 janvier 2020, par VelDev

    I'm having a problem with ffmpeg video encoding using GPU (CUDA).

    



    I have 2x nVidia GTX 1050 Ti

    



    The problem comes when i try to do multiple parallel encodings. More than 2 processes and ffmpeg dies like this :

    



    [h264_nvenc @ 0xcc1cc0] OpenEncodeSessionEx failed: out of memory (10)


    



    The problem is nvidia-smi shows there are a lot of resources available on the gpu :

    



    +-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.66                 Driver Version: 384.66                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  Off  | 00000000:41:00.0 Off |                  N/A |
| 40%   37C    P0    42W /  75W |    177MiB /  4038MiB |     30%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 105...  Off  | 00000000:42:00.0 Off |                  N/A |
| 40%   21C    P8    35W /  75W |     10MiB /  4038MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+


    



    the second GPU doesn't seem to be used at all, and there's more than enough memory left on the first one, to support the 3rd file.

    



    Any ideas would be extremely helpful !

    


  • Running ffmpeg with multiple pipes

    13 août 2017, par baci

    Is there a way to let ffmpeg read from multiple buffers or multiple named pipes ?

    Basically I want to output the first loop to different pipes instead of .jpg files, and run the video filter command using those pipes as input. Right now enormous disk IO is needed to create and read jpg tiles.

    // heic -> tiles -> jpeg tiles
    #pragma omp parallel for
       for(uint i = 0; i < data.tiles.size(); ++i) {
           char buff[100];
           snprintf(buff, sizeof(buff), "./tmp/%03d.jpg", data.tiles[i].idx);
           std::string cmdStr = "ffmpeg -i - -loglevel warning -frames:v 1 -vsync vfr -an -q:v 1 " + std::string(buff);
           FILE * pipe_in;
           if(pipe_in = popen(cmdStr.c_str(), "w")) {
               fwrite((char*)&data.tiles[i].data[0], 1, data.tiles[i].data.size(), pipe_in);
               fflush(pipe_in);
               fclose(pipe_in);
           }
       }

    ... some processing

    // jpeg tiles -> big jpeg
    std::string inputStr = "./tmp/%03d.jpg";
    std::string cmdStr = "ffmpeg -i " + inputStr +
           " -loglevel warning -threads 4 -q:v 1 -vf \"tile=" + std::to_string(data.cols) + "x" + std::to_string(data.rows) +
           ",crop=" + std::to_string(data.width) + ":" + std::to_string(data.height) + ":0:0" +
           transStr + "\" -y " + outputStr;
    ret = std::system(cmdStr.c_str());
  • FFMpeg process created from Java on CentOS doesn't exit

    21 juin 2017, par Donz

    I need to convert a lot of wave files simultaneously. About 300 files in parallel. And new files come constantly. I use ffmpeg process call from my Java 1.8 app, which is running on CentOS. I know that I have to read error and input streams for making created process from Java possible to exit.

    My code after several expirements :

       private void ffmpegconverter(String fileIn, String fileOut){
       String[] comand = new String[]{"ffmpeg", "-v", "-8", "-i", fileIn, "-acodec", "pcm_s16le", fileOut};

       Process process = null;
       BufferedReader reader = null;
       try {
           ProcessBuilder pb = new ProcessBuilder(comand);
           pb.redirectErrorStream(true);
           process = pb.start();

           //Reading from error and standard output console buffer of process. Or it could halts because of nobody
           //reads its buffer
           reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
           String s;
           //noinspection StatementWithEmptyBody
           while ((s = reader.readLine()) != null) {
               log.info(Thread.currentThread().getName() + " with fileIn " + fileIn + " and fileOut " + fileOut + " writes " + s);
               //Ignored as we just need to empty the output buffer from process
           }
           log.info(Thread.currentThread().getName() + " ffmpeg process will be waited for");
           if (process.waitFor( 10, TimeUnit.SECONDS )) {
               log.info(Thread.currentThread().getName() + " ffmpeg process exited normally");
           } else {
               log.info(Thread.currentThread().getName() + " ffmpeg process timed out and will be killed");
           }

       } catch (IOException | InterruptedException e) {
           log.error(Thread.currentThread().getName() + "Error during ffmpeg process executing", e);
       } finally {
           if (process != null) {
               if (reader != null) {
                   try {
                       reader.close();
                   } catch (IOException e) {
                       log.error("Error during closing the process streams reader", e);
                   }
               }
               try {
                   process.getOutputStream().close();
               } catch (IOException e) {
                   log.error("Error during closing the process output stream", e);
               }
               process.destroyForcibly();
               log.info(Thread.currentThread().getName() + " ffmpeg process " + process + " must be dead now");
           }
       }
    }

    If I run separate test with this code it goes normally. But in my app I have hundreds of RUNNING deamon threads "process reaper" which are waiting for ffmpeg process finish. In my real app ffpmeg is started from timer thread. Also I have another activity in separate threads, but I don’t think that this is the problem. Max CPU consume is about 10%.

    Here is that I usual see in thread dump :

    "process reaper" #454 daemon prio=10 os_prio=0 tid=0x00007f641c007000 nid=0x5247 runnable [0x00007f63ec063000]
      java.lang.Thread.State: RUNNABLE
       at java.lang.UNIXProcess.waitForProcessExit(Native Method)
       at java.lang.UNIXProcess.lambda$initStreams$3(UNIXProcess.java:289)
       at java.lang.UNIXProcess$$Lambda$32/2113551491.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at java.lang.Thread.run(Thread.java:745)

    What am I doing wrong ?

    UPD :
    My app accepts a lot of connects with voice traffic. So I have about 300-500 another "good" threads in every moment. Could it be the reason ? Deamon threads have low priority. But I don’t beleive that they really can’t do their jobs in one hour. Ususally it takes some tens of millis.

    UPD2 :
    My synthetic test that runs fine. I tried with new threads option and without it just with straigt calling of run method.

    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStreamReader;

    public class FFmpegConvert {

       public static void main(String[] args) throws Exception {

           FFmpegConvert f = new FFmpegConvert();
           f.processDir(args[0], args[1], args.length > 2);
       }

       private void processDir(String dirPath, String dirOutPath, boolean isNewThread) {
           File dir = new File(dirPath);
           File dirOut = new File(dirOutPath);
           if(!dirOut.exists()){
               dirOut.mkdir();
           }
           for (int i = 0; i < 1000; i++) {
               for (File f : dir.listFiles()) {
                   try {
                       System.out.println(f.getName());
                       FFmpegRunner fFmpegRunner = new FFmpegRunner(f.getAbsolutePath(), dirOut.getAbsolutePath() + "/" + System.currentTimeMillis() + f.getName());
                       if (isNewThread) {
                           new Thread(fFmpegRunner).start();
                       } else {
                           fFmpegRunner.run();
                       }
                   } catch (Exception e) {
                       e.printStackTrace();
                   }
               }
           }
       }

       class FFmpegRunner implements Runnable {
           private String fileIn;
           private String fileOut;

           FFmpegRunner(String fileIn, String fileOut) {
               this.fileIn = fileIn;
               this.fileOut = fileOut;
           }

           @Override
           public void run() {
               try {
                   ffmpegconverter(fileIn, fileOut);
               } catch (Exception e) {
                   e.printStackTrace();
               }
           }

           private void ffmpegconverter(String fileIn, String fileOut) throws Exception{
               String[] comand = new String[]{"ffmpeg", "-i", fileIn, "-acodec", "pcm_s16le", fileOut};

               Process process = null;
               try {
                   ProcessBuilder pb = new ProcessBuilder(comand);
                   pb.redirectErrorStream(true);
                   process = pb.start();

                   //Reading from error and standard output console buffer of process. Or it could halts because of nobody
                   //reads its buffer
                   BufferedReader reader =
                           new BufferedReader(new InputStreamReader(process.getInputStream()));
                   String line;
                   //noinspection StatementWithEmptyBody
                   while ((line = reader.readLine()) != null) {
                       System.out.println(line);
                       //Ignored as we just need to empty the output buffer from process
                   }

                   process.waitFor();
               } catch (IOException | InterruptedException e) {
                   throw e;
               } finally {
                   if (process != null)
                       process.destroy();
               }
           }

       }

    }

    UPD3 :
    Sorry, I forgot to notice that I see the work of all these process - they created new converted files but anyway don’t exit.