
Recherche avancée
Autres articles (39)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (6687)
-
A Better Process Runner
1er janvier 2011, par Multimedia Mike — PythonI 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 BrettI 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
-
How Much H.264 In Each Encoder ?
8 septembre 2010, par Multimedia Mike — GeneralThanks to my recent experiments with code coverage tools, I have a powerful new — admittedly somewhat specious — method of comparing programs. For example, I am certain that I have read on more than one occasion that Apple’s H.264 encoder sucks compared to x264 due, at least in part, to the Apple encoder’s alleged inability to exercise all of H.264′s features. I wonder how to test that claim ?
Experiment
Use code coverage tools to determine which H.264 encoder uses the most features.Assumptions
- Movie trailers hosted by Apple will all be encoded with the same settings using Apple’s encoder.
- Similarly, Yahoo’s movie trailers will be encoded with consistent settings using an unknown encoder.
- Encoding a video using FFmpeg’s libx264-slow setting will necessarily throw a bunch of H.264′s features into the mix (I really don’t think this assumption holds much water, but I also don’t know what “standard” x264 settings are).
Methodology
- Grab a random Apple-hosted 1080p movie trailer and random Yahoo-hosted 1080p movie trailer from Dave’s Trailer Page.
- Use libx264/FFmpeg with the ‘slow’ preset to encode Big Buck Bunny 1080p from raw PNG files.
- Build FFmpeg with code coverage enabled.
- Decode each file to raw YUV, ignore audio decoding, generate code coverage statistics using gcovr, reset stats after each run by deleting *.gcda files.
Results
- x264 1080p video : 9968 / 134203 lines
- Apple 1080p trailer : 9968 / 134203 lines
- Yahoo 1080p trailer : 9914 / 134203 lines
I also ran this old x264-encoded file (ImperishableNightStage6Low.mp4) through the same test. It demonstrated the most code coverage with 10671 / 134203 lines.
Conclusions
Conclusions ? Ha ! Go ahead and jump all over this test. I’m already fairly confident that it’s impossible (or maybe just very difficult) to build a single H.264-encoded video that exercises every feature that FFmpeg’s decoder supports. For example, is it possible for a file to use both CABAC and CAVLC entropy methods ? If it’s possible, does any current encoder do that ?