/[escript]/trunk/tools/vizTools/make_movie.py
ViewVC logotype

Diff of /trunk/tools/vizTools/make_movie.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 370 by jgs, Wed Nov 9 02:02:19 2005 UTC revision 371 by cochrane, Fri Dec 16 00:57:13 2005 UTC
# Line 10  import os, sys, re Line 10  import os, sys, re
10  import getopt  import getopt
11    
12  (opts, args) = getopt.getopt(sys.argv[1:],  (opts, args) = getopt.getopt(sys.argv[1:],
13      "s:d:o:f:p:h",      "s:d:o:f:p:t:h",
14      ["framestem=", "dirname=", "output=", "format=", "pad=", "help"],      ["framestem=", "dirname=", "output=", "format=", "pad=", "pattern=",
15        "help"],
16      )      )
17    
18  def usage():  def usage():
# Line 23  def usage(): Line 24  def usage():
24      print "    -o/--output: Output mpeg filename (optional)"      print "    -o/--output: Output mpeg filename (optional)"
25      print "    -f/--format: Input frame image format (optional)"      print "    -f/--format: Input frame image format (optional)"
26      print "    -p/--pad: How many frames to pad the movie (optional)"      print "    -p/--pad: How many frames to pad the movie (optional)"
27        print "    -h/--help: Display this information (optional)"
28    
29  dirname = "./"  dirname = "./"
30  mpegName = None  mpegName = None
31  fnameStem = None  fnameStem = None
32  format = "pnm"  # if format not specified assume pnm  format = "pnm"  # if format not specified assume pnm
33  pad = 1  pad = 1
34    pattern = "IBBPBBPBB"
35    
36  for option, arg in opts:  for option, arg in opts:
37      if option in ('-s', '--stem'):      if option in ('-s', '--stem'):
# Line 41  for option, arg in opts: Line 44  for option, arg in opts:
44      format = arg      format = arg
45      elif option in ('-p', '--pad'):      elif option in ('-p', '--pad'):
46      pad = int(arg)      pad = int(arg)
47        elif option in ('-t', '--pattern'):
48        pattern = arg
49      elif option in ('-h', '--help'):      elif option in ('-h', '--help'):
50      usage()      usage()
51      sys.exit(0)      sys.exit(0)
# Line 92  print "Generating params file..." Line 97  print "Generating params file..."
97  paramsFileString = """REFERENCE_FRAME DECODED  paramsFileString = """REFERENCE_FRAME DECODED
98  FRAME_RATE 24  FRAME_RATE 24
99  OUTPUT %s  OUTPUT %s
100  PATTERN IBBPBBPBB  PATTERN %s
101  FORCE_ENCODE_LAST_FRAME  FORCE_ENCODE_LAST_FRAME
102  GOP_SIZE 20  GOP_SIZE 20
103  BSEARCH_ALG CROSS2  BSEARCH_ALG CROSS2
# Line 106  BASE_FILE_FORMAT PNM Line 111  BASE_FILE_FORMAT PNM
111  INPUT_DIR .  INPUT_DIR .
112  INPUT_CONVERT *  INPUT_CONVERT *
113  INPUT  INPUT
114  """ % (mpegName)  """ % (mpegName, pattern)
115    
116  # need to determine the first number and last number of the list of files  # need to determine the first number and last number of the list of files
117  # sort the files first just in case  # sort the files first just in case

Legend:
Removed from v.370  
changed lines
  Added in v.371

  ViewVC Help
Powered by ViewVC 1.1.26