Recherche avancée

Médias (0)

Mot : - Tags -/api

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

Autres articles (18)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (6624)

  • Emulate an IP Camera

    23 décembre 2013, par Goro

    I am using software (DVR) that is meant to talk directly to an IP camera. I am trying to pass a h264 stream directly into it, but it does not work if I just throw a stream onto it.

    Can you recommend any "spoofing" software to emulate an IP camera ? For the sake of argument, we can say that the camera we want to emulate is Axis P3301.

    Given that a lot of software out there can talk to IP cameras, is there a way to use something like vlc/ffmpeg to look like its an IP camera ?

    Thanks.

  • A Better Process Runner

    1er janvier 2011, par Multimedia Mike — Python

    I was recently processing a huge corpus of data. It went like this : For each file in a large set, run 'cmdline-tool <file>', capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python that I’m starting to notice a pattern.

    Every time I start writing such a program, I always begin with using Python’s commands module because it’s the easiest thing to do. Then I always have to abandon the module when I remember the hard way that whatever ’cmdline-tool’ is, it might run errant and try to execute forever. That’s when I import (rather, copy over) my process runner from FATE, the one that is able to kill a process after it has been running too long. I have used this module enough times that I wonder if I should spin it off into a new Python module.

    Or maybe I’m going about this the wrong way. Perhaps when the data set reaches a certain size, I’m really supposed to throw it on some kind of distributed cluster rather than task it to a Python script (a multithreaded one, to be sure, but one that runs on a single machine). Running the job on a distributed architecture wouldn’t obviate the need for such early termination. But hopefully, such architectures already have that functionality built in. It’s something to research in the new year.

    I guess there are also process limits, enforced by the shell. I don’t think I have ever gotten those to work correctly, though.

  • Pass a process to a subclass

    16 décembre 2014, par Brett

    I would like to pass a process to a subclass so I may kill it but I can’t figure out how to pass the process. I’m unsure how to store it so I can return it to the form and be able to call the subclass method to kill it. here are my classes

    package my.mashformcnts;
    import java.io.IOException;
    import java.util.Scanner;
    import java.util.regex.Pattern;


    /**
    *
    * @author brett
    */
    public class MashRocks {

       public static Process startThread(MashFormCnts mashFormCnts) throws IOException {
           ProcessBuilder pb = new ProcessBuilder("ffmpeg", "-i", "C:\\Users\\brett\\Documents\\Telegraph_Road.mp4", "C:\\Users\\brett\\Documents\\out.mp4");

           //Here is where i would like to name and store the Process


           final Process p = pb.start();
           // create a new thread to get progress from ffmpeg command , override  
           // it's run method, and start it!  
           Thread t = new Thread() {
               @Override
               public void run() {
                   Scanner sc = new Scanner(p.getErrorStream());
                   // Find duration  
                   Pattern durPattern = Pattern.compile("(?<=Duration: )[^,]*");
                   String dur = sc.findWithinHorizon(durPattern, 0);
                   if (dur == null) {
                       throw new RuntimeException("Could not parse duration.");
                   }
                   String[] hms = dur.split(":");
                   double totalSecs = Integer.parseInt(hms[0]) * 3600 + Integer.parseInt(hms[1]) * 60 + Double.parseDouble(hms[2]);
                   System.out.println("Total duration: " + totalSecs + " seconds.");
                   // Find time as long as possible.  
                   Pattern timePattern = Pattern.compile("(?<=time=)[\\d:.]*");
                   String match;
                   String[] matchSplit;
                   //MashForm pgbar = new MashForm();
                   while (null != (match = sc.findWithinHorizon(timePattern, 0))) {
                       matchSplit = match.split(":");
                       double progress = (Integer.parseInt(matchSplit[0]) * 3600 + Integer.parseInt(matchSplit[1]) * 60 + Double.parseDouble(matchSplit[2])) / totalSecs;
                       int prog = (int) (progress * 100);
                       mashFormCunts.setbar(prog);
                   }
               }
           };
          t.start();
          return p;
       }
      public synchronized static void stop(Thread t) throws IOException{
              Runtime.getRuntime().exec("taskkill /F /IM ffmpeg.exe");  
               t = null;
             //t.interrupt();



      }
    }
      class killMash extends MashRocks{
       public static void Kfpeg(Process p){

         p.destroyForcibly();
       }
    }

    So those are my classes. I’m very new.

    Next there is the event Listener on the form, so when I click this I want to kill the ffmpeg proecess with the Thread t :

     private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
           // TODO add your handling code here:
           Thread n = Thread.currentThread();
           System.out.print(n);
           try {
               //MashRocks.stop(n);
                //This isnt working but i think its closer
                killMash.Kfpeg(MashRocks.startThread(this));
    //Not Sure what to do here
     //here is where i want to pass the process sorry for the typo
     killMash.kfpeg(p);
               } catch (IOException ex) {
                   Logger.getLogger(MashFormCunts.class.getName()).log(Level.SEVERE, null, ex);
               }

           }  

    Any help is awesome cheers