On Wed, Oct 20, 2004 at 11:56:44PM +1300, Hamish wrote:
> > update broken Berkeley ftp link and add link to netpbm's ppmtompeg
> > which is the same thing as mpeg_encode
r.out.mpeg is now updated to use 'ppmtompeg' if it exists. This means
the module will work out of the box on any system with netpbm installed.
(ie most unix; Cygwin & OSX with a download)
Note this is MPEG-1, old and inefficient but Free Software.
Might add a flag in future to dump PPM frames somewhere to let the user
use a newer non-free encoder. (Xvid? Ogg Theora? the new BBC wavelet one?)
Maybe a script using g.mlist + r.out.ppm in a loop is a simpler solution.
> Just curious:
> Does it work better than the old Berkeley software (which gives
> terrible errors here)?
Which version of mpeg_encode? The latest is 1.5c (circa 1995?).
yes, that old one (maybe 1.5b).
I'd very much expect the netpbm version to be better maintained and give
better results, but that's just a guess. I haven't tried mpeg_encode[*].
[*] someone who does have mpeg_encode: can you test the module please?
Specifically to see if the exit-code test works.
> If so, what about using 'ppmtompeg' with -c flag and mpeg_encode
> without?
The -c flag makes the current region settings for columns and rows
become the size for the animation. This should probably have some sort
of error &/or override flag if you try to make a 2000x4000 pixel movie..
Without the -c flag, a 365 frame movie took about 200mb disk space in
$MAPSET/.tmp during runtime .. I'm not too worried about that these days.
No shock, but Mplayer does a much better job on playback than UCB
mpeg_play. But mpeg_play lets you step frame by frame which is handy.
Without '-c' it works well, writing a MPEG file (playable with Mplayer).
But (same command line, only -c inserted):
GRASS 5.7.cvs:/tmp > r.out.mpeg -c view1=`g.mlist type=rast pat="modis_lst1km2004*.LST_Day_1km.filt" sep=,` out=gmovie_with_c.mpg
MPEG ENCODER STATS (1.5b)
------------------------
TIME STARTED: Wed Oct 20 17:42:43 2004
MACHINE: unknown
FIRST FILE: in=/modis_lst1km20040101.LST_Day_1km.filt
LAST FILE: in=/modis_lst1km20040727.LST_Day_1km.filt
PATTERN: ibbpbb
GOP_SIZE: 30
SLICES PER FRAME: 1
RANGE: +/-8
PIXEL SEARCH: HALF
PSEARCH: TWOLEVEL
BSEARCH: CROSS2
QSCALE: 7 12 16
REFERENCE FRAME: DECODED
ERROR: Couldn't execute input conversion command:
r.out.ppm -q in=/modis_lst1km20040101.LST_Day_1km.filt out=-
errno = 22
SLAVE EXITING!!!
WARNING: mpeg_encode ERROR
The slash is wrong (today I have no time to search for it in the code).
Markus