Based on some advice I found [here](http://electron.mit.edu/~gsteele/ffmpeg/), I discovered how to make high quality movies from series of png files using [ffmpeg](http://ffmpeg.mplayerhq.hu/). I use png files because they have a high color depth (unlike 256 for gif), and they are non-lossy (unlike jpg).
First you need to make a sequence of _ordered_ files that have filenames like frame\_001.png, frame\_002.png, etc. For example, in python's matplotlib, you would have a line like:
saveframe('frame_%03d.png' % framenumber)
Then, you need to run ffmpeg on all of these files. The command is quite simple:
ffmpeg -r 10 -sameq -i frame_%03d.png test.mp4
where the -r flag sets the frames per second. Otherwise, the only other key option is the -sameq flag, which keeps the same non-lossy quality of the png files. Pretty easy. Also, you don't need to install xvid or h264 libraries for this to work. The codecs that come with ffmpeg seem to work just fine.
Also, the size of the resulting movie file is quite reasonable. I tested 121 frames at 1000x600 (with considerable non-changing space in the field). The resulting movie was 2.8M big. This is about seven times smaller than simply concatenating all of the images together. Not too bad.
Monday, October 8, 2007
Sunday, October 7, 2007
public access large-scale model data
This may not be new news, but it was a good find. Here is a very extensive archive of publicly available model output. This could be used, for example, for regional model boundary conditions:
[http://apdrc.soest.hawaii.edu/dods/public_data/](http://apdrc.soest.hawaii.edu/dods/public_data/)
An example python script for making a movie of ssh in the Indian ocean from the Navy Layer Ocean Model is found after the fold
[http://apdrc.soest.hawaii.edu/dods/public_data/](http://apdrc.soest.hawaii.edu/dods/public_data/)
An example python script for making a movie of ssh in the Indian ocean from the Navy Layer Ocean Model is found after the fold
Sunday, August 26, 2007
Working with roms projects
Here is a [movie](http://pong.tamu.edu/~rob/movies/roms_project.mov) [~200 Megs] showing how to download ROMS using subversion, and start a project.
Tuesday, August 14, 2007
SAGE for symbolic mathematics
[SAGE](http://www.sagemath.org/) is a symbolic mathematics solver, based in python. I have compiled it, and done some simple test cases, and it seems to work well. This may be a good, free alternative to Mathematica for doing simple analytic solutions.
Universal gfortran
The folks over at R (the statistical programing language) have developed a [universal gfortran](http://r.research.att.com/tools/), installed with a normal Mac installer (unlike the version over at [Mac HPC](http://hpc.sourceforge.net)). It has been used to compile universal binaries for [scipy](http://www.scipy.org) successfully, so this seems like a good option to use.
Wednesday, June 27, 2007
Getting more out of the Terminal in mac os X
I like to have specific terminal settings for my remote machines. Here are the steps I take in getting a nice, easy-to-use window for remote machines:
- First of all, open a new terminal window
- Control-click in the window, and select 'Window Settings'
- Select 'Processes' and click on 'Never' for prompt before closing a window.
- Select 'Color' and change the color you like -- I prefer a unique color for each remote machine, and I try to pick light colors, so that black text shows up well.
- Optionally, set the transparency. I like to use about 90% transparency. That way, I can see through my stack of terminal windows to find what is underneath.
- If you haven't already done so, go to the 'Display' window, and at the very least select 'anti-aliasing' for the fonts. Also, select a nice mono-spaced font. Monaco is fine, but there are other good ones. I usually set the fonts and transparency beforehand and save this as the default for all windows.
Now, you are ready to save this setup. Close the Terminal Inspector, and hit 'Save As..' in the File menu. Pick a name, the name of your machine probably, and then in the dialog below, click on Execute this command, and uncheck 'Execute command in a shell'. The command I use is something like this:
ssh -Y machine.tamu.edu
The -Y flag turns on X11 forwarding. You could also set any other ssh options here, like a cypher, or whatever.
Now you can open this window right away from the Terminal File -> Library menu. Or, even better, you can use quicksiler to open these term files. Just start typing the name of the host, and it will pop up as host.term.
- First of all, open a new terminal window
- Control-click in the window, and select 'Window Settings'
- Select 'Processes' and click on 'Never' for prompt before closing a window.
- Select 'Color' and change the color you like -- I prefer a unique color for each remote machine, and I try to pick light colors, so that black text shows up well.
- Optionally, set the transparency. I like to use about 90% transparency. That way, I can see through my stack of terminal windows to find what is underneath.
- If you haven't already done so, go to the 'Display' window, and at the very least select 'anti-aliasing' for the fonts. Also, select a nice mono-spaced font. Monaco is fine, but there are other good ones. I usually set the fonts and transparency beforehand and save this as the default for all windows.
Now, you are ready to save this setup. Close the Terminal Inspector, and hit 'Save As..' in the File menu. Pick a name, the name of your machine probably, and then in the dialog below, click on Execute this command, and uncheck 'Execute command in a shell'. The command I use is something like this:
ssh -Y machine.tamu.edu
The -Y flag turns on X11 forwarding. You could also set any other ssh options here, like a cypher, or whatever.
Now you can open this window right away from the Terminal File -> Library menu. Or, even better, you can use quicksiler to open these term files. Just start typing the name of the host, and it will pop up as host.term.
Tuesday, June 19, 2007
Subscribe to:
Posts (Atom)