Hi Julien, and welcome to the GraphStream community,For the first part of your question, the FileSinkImages should be added before any modification of your graph. So the first lines of your code could be :
// Video
OutputPolicy outputPolicy = OutputPolicy.BY_STEP;
String prefix = "prefix_";
OutputType type = OutputType.PNG;
Resolution resolution = Resolutions.HD720;
FileSinkImages fsi = new FileSinkImages(prefix, type, resolution, outputPolicy
);
fsi.setQuality(Quality.HIGH);fsi.setStylesheet("url('file:///Users/jp/Desktop/stylesheet')");fsi.setLayoutPolicy(LayoutPolicy.COMPUTED_FULLY_AT_NEW_IMAGE);// Initialisation du graphe
m_Graph = new SingleGraph("test");m_Graph.setStrict(false);m_Graph.addSink(fsi);
PopulateGraph(m_Graph);
fsi.begin(prefix);UpdateGraph(m_Graph);
for (int i = 0; i < 5; i++) {
m_Graph.stepBegins(i); // Création d'une image du graphe modifé
}
fsi.end();I will look for the next part of your question.Regards.Le 22 juillet 2013 00:27, <julienperr AT yahoo.fr> a écrit :
Bonjour,
Peut-on avoir un peu plus de détails et d'explications pour faire des videos ?
J'ai un SingleGraph que j'initialise avec certains Node et Edge ensuite j'ai un
traitement qui boucle et modifie le graphe (add/remove Node, add/Remove Edge).
J'aimerais prendre une photo du graphe à chaque fin de boucle et en faire une
vidéo.
J'utilise un FileSinkImages.
// Initialisation du graphe
m_Graph = new SingleGraph("test");
m_Graph.addAttribute("ui.quality");
m_Graph.addAttribute("ui.antialias");
m_Graph.addAttribute("ui.stylesheet","url('file:///Users/jp/Desktop/stylesheet')");
m_Graph.setStrict(false);
PopulateGraph(m_Graph);
// Video
OutputPolicy outputPolicy = OutputPolicy.BY_STEP;
String prefix = "prefix_";
OutputType type = OutputType.PNG;
Resolution resolution = Resolutions.HD720;
FileSinkImages fsi = new FileSinkImages(prefix, type, resolution, outputPolicy
);
fsi.setLayoutPolicy(LayoutPolicy.COMPUTED_FULLY_AT_NEW_IMAGE);
m_Graph.SetSink(fsi);
fsi.begin(prefix);
for (int i = 0; i < 5; i++) {
UpdateGraph(m_Graph);
m_Graph.stepBegins(0); // Création d'une image du graphe modifé
}
fsi.end();
Cela ne me sort que des images vides.... :(... mon code est-il correct ?
Ensuite j'ai du mal avec mencoder j'ai copier/coller votre exemple et j'ai :
. mkvideo.sh
MEncoder dev-SVN-r27545-4.0.1 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz (Family: 6, Model: 42, Stepping:
7)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Option lavcopts: Unknown suboption -o
Error parsing option on the command line: -lavcopts
Dans l'attente de votre aide.
merci
--
Guilhelm Savin
PhD Student of Computer ScienceLITIS, University of Le Havre
\/\/\/\/\/\/
Archives gérées par MHonArc 2.6.16.