[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203

Stephane Popinet popinet at users.sf.net
Fri May 15 02:53:26 UTC 2009


The following commit has been merged in the upstream branch:
commit 89fc8e2c093ad228b14bef10908d594bfb9557c7
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Wed Feb 14 12:18:07 2007 +1100

    New ppm2mpeg helper script (uses ffmpeg)
    
    ffmpeg is better than mjpegtools and simpler to install (debian packages are
    readily available).
    
    darcs-hash:20070214011807-d4795-326c9238f92aaf992feeffef38d36806c5c5e95b.gz

diff --git a/debian/control.sh b/debian/control.sh
index c34dab4..bfdb677 100644
--- a/debian/control.sh
+++ b/debian/control.sh
@@ -15,7 +15,7 @@ Architecture: any
 Depends: libgts-snapshot-dev (>= $GTS_VERSION), pkg-config, gcc, sed, gawk
 Conflicts: gerris
 Replaces: gerris
-Suggests: gfsview-snapshot
+Suggests: gfsview-snapshot, imagemagick, ffmpeg, gawk
 Description: Gerris Flow Solver (development snapshot)
  Gerris is a system for the solution of the partial differential
  equations describing fluid flow.
diff --git a/doc/examples/boussinesq/boussinesq.gfs b/doc/examples/boussinesq/boussinesq.gfs
index ad681a2..e021104 100644
--- a/doc/examples/boussinesq/boussinesq.gfs
+++ b/doc/examples/boussinesq/boussinesq.gfs
@@ -24,7 +24,7 @@
 # \end{figure}
 #
 # Author: St\'ephane Popinet
-# Command: gerris2D boussinesq.gfs | gfsview2D boussinesq.gfv | ppmtoy4m -F 24:1 -v 0 | mpeg2enc -v 0 -o t.mpg
+# Command: gerris2D boussinesq.gfs | gfsview2D boussinesq.gfv | ppm2mpeg > t.mpg
 # Version: 0.6.4
 # Required files: cylinder.gts boussinesq.gfv
 # Running time: 60 minutes
diff --git a/doc/examples/cylinder/cylinder.gfs b/doc/examples/cylinder/cylinder.gfs
index 2615dc5..3f55c19 100644
--- a/doc/examples/cylinder/cylinder.gfs
+++ b/doc/examples/cylinder/cylinder.gfs
@@ -84,14 +84,14 @@
   # Pipes a bitmap PPM image representation of the vorticity field at every other timestep
   # into a MJPegTools conversion pipeline to create a MPEG movie called vort.mpg
   # Sets the minimum used for colormapping to -10 and the maximum to 10
-  OutputPPM { istep = 2 } { ppmtoy4m -F 24:1 -v 0 | mpeg2enc -v 0 -o vort.mpg } {
+  OutputPPM { istep = 2 } { ppm2mpeg > vort.mpg } {
     min = -10 max = 10 v = Vorticity 
   }
 
   # Pipes a bitmap PPM image representation of the T field at every other timestep
   # into a MJPEGTools conversion pipeline to create a MPEG movie called t.mpg
   # Sets the minimum used for colormapping to 0 and the maximum to 1
-  OutputPPM { istep = 2 } { ppmtoy4m -F 24:1 -v 0 | mpeg2enc -v 0 -o t.mpg } {
+  OutputPPM { istep = 2 } { ppm2mpeg > t.mpg } {
     min = 0 max = 1 v = T
   }
 
diff --git a/doc/examples/cylinder/heated/heated.gfs b/doc/examples/cylinder/heated/heated.gfs
index 4a9b611..8b6ab25 100644
--- a/doc/examples/cylinder/heated/heated.gfs
+++ b/doc/examples/cylinder/heated/heated.gfs
@@ -75,7 +75,7 @@
   # Pipes a bitmap PPM image representation of the T field at every other timestep
   # into a MJPEGTools conversion pipeline to create a MPEG movie called t.mpg
   # Sets the minimum used for colormapping to 0 and the maximum to 0.4
-  OutputPPM { istep = 2 } { ppmtoy4m -F 24:1 -v 0 | mpeg2enc -v 0 -o t.mpg } {
+  OutputPPM { istep = 2 } { ppm2mpeg > t.mpg } {
     min = 0 max = 0.4 v = T
   }
 
diff --git a/doc/examples/rt/rt.gfs b/doc/examples/rt/rt.gfs
index 75c6c8d..4b03630 100644
--- a/doc/examples/rt/rt.gfs
+++ b/doc/examples/rt/rt.gfs
@@ -72,10 +72,10 @@
   OutputBalance { istep = 10 } stderr
   OutputProjectionStats { istep = 10 } stderr
   OutputDiffusionStats { istep = 10 } stderr
-  OutputPPM { istep = 2 } { ppmtoy4m -F 24:1 -v 0 | mpeg2enc -v 0 -o vort.mpg } {
+  OutputPPM { istep = 2 } { ppm2mpeg > vort.mpg} {
     min = -30 max = 30 v = Vorticity 
   }
-  OutputPPM { istep = 2 } { ppmtoy4m -F 24:1 -v 0 | mpeg2enc -v 0 -o t.mpg } {
+  OutputPPM { istep = 2 } { ppm2mpeg > t.mpg } {
     min = 0 max = 1 v = T
   }
   OutputPPM { start = end } { convert -colors 256 ppm:- vort.eps } {
diff --git a/doc/examples/tangaroa/tangaroa.gfs b/doc/examples/tangaroa/tangaroa.gfs
index 8370133..375fe42 100644
--- a/doc/examples/tangaroa/tangaroa.gfs
+++ b/doc/examples/tangaroa/tangaroa.gfs
@@ -15,7 +15,7 @@
 # \end{figure}
 #
 # Author: St\'ephane Popinet
-# Command: gerris3D tangaroa.gfs | gfsview3D sections.gfv | ppmtoy4m -F 24:1 -v 0 | yuvscaler -M BICUBIC -O SIZE\_640x480 -v 0 | mpeg2enc -f 9 -v 0 -o sections.mpg
+# Command: gerris3D tangaroa.gfs | gfsview3D sections.gfv | ppm2mpeg -s 640x480 > sections.mpg
 # Version: 0.9.2
 # Required files: tangaroa.gts sections.gfv
 # Running time: 7 hours
diff --git a/doc/tmpl/output.sgml b/doc/tmpl/output.sgml
index 6ed8b04..1f3f512 100644
--- a/doc/tmpl/output.sgml
+++ b/doc/tmpl/output.sgml
@@ -50,10 +50,10 @@ If the simulation does not start at time zero the existing files are appended ot
 The "pipe" feature of GfsOutput can for example be used to do on-the-flight post-processing of the data stream, as in the following example:
 <informalexample>
 <programlisting>
-  GfsOutputPPM { istep = 1 } { ppmtoy4m -v 0 -F 24:1 | mpeg2enc -v 0 -o vorticity.mpg } { v = Vorticity }
+  GfsOutputPPM { istep = 1 } { ppm2mpeg > vorticity.mpg } { v = Vorticity }
 </programlisting>
 </informalexample>
-which will convert the PPM stream generated by #GfsOutputPPM directly to MPEG using the MJPEG tools collection.
+which will convert the PPM stream generated by #GfsOutputPPM directly to MPEG using ffmpeg.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 5c39380..9daacfa 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -16,7 +16,8 @@ bin_PROGRAMS = \
 
 bin_SCRIPTS = \
 	darcs2dist \
-	bat2gts
+	bat2gts \
+	ppm2mpeg
 
 EXTRA_DIST = $(bin_SCRIPTS)
 
diff --git a/tools/ppm2mpeg b/tools/ppm2mpeg
new file mode 100755
index 0000000..a27ce27
--- /dev/null
+++ b/tools/ppm2mpeg
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+command="ffmpeg -f image2pipe -vcodec ppm -i - -vcodec mpeg1video -b 1800 -f mpeg1video"
+while test $# -gt 0; do
+    command="$command $1"
+    shift
+done
+$command - 2> /dev/null

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list