Hello, I would like to generate a movie of a series of plots using PLPlot and mencoder on Linux without using intermediate JPG-files. I have made a FIFO-file "file.mjpeg" using mkfifo. The following commands works to generate a movie file if I start with a set of JPG-files.
mencoder file.mjpeg -demuxer lavf -lavfdopts format=mjpeg \ -ovc lavc -o test.avi and then cat *.jpg > file.mjpeg So the question is if it is possible to make plplot behave exactly as "cat *.jpg > file.mjpeg"? I have tried some different methods, using pgbop(), pgeop(), pgclear() and pgadv(0), but seem to end up with a movie consisting of only one frame. Is it possible to make plplot write individual JPG-files to the file.mjpeg FIFO one after the other, just as the command "cat *.jpg > file.mjpeg"? I tried using pleop(), plsfnam() and plbop() for each iteration of the ploting, with the same filename every time, but then I got a segmentation fault. Here is one of the possibilities I tried (I ran it with the -np option): #include <plplot/plplot.h> #include <cmath> using namespace std; int main(int argc, char *argv[]) { double x[2], y[2]; // Coordinates to plot x[0] = 0; y[0] = 0; // These are fixed x[1] = 1; y[1] = 0; // Starting position plparseopts(&argc, argv, PL_PARSE_FULL); plsdev("jpeg"); plsfnam("file.mjpeg"); plinit(); plenv(-1, 1, -1, 1, 1, -2); plbox("bcinst", 0, 0, "bcinst", 0, 0); plline(2, x, y); for(int i = 1; i != 25; ++i) { x[1] = cos(double(i)/25); y[1] = sin(double(i)/25); pladv(0); plbox("bcinst", 0, 0, "bcinst", 0, 0); plline(2, x, y); } plend(); return(0); } Thanks, Torquil Sørensen ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Plplot-general mailing list Plplot-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-general