[GRASS5] Re: [GRASS-CVS] hamish: grass/html/html r.out.mpeg.html,1.4,1.5

Hamish,

On Wed, Oct 20, 2004 at 09:56:58AM +0200, grass@intevation.de wrote:

Author: hamish

Update of /grassrepository/grass/html/html
In directory doto:/tmp/cvs-serv16952

Modified Files:
  r.out.mpeg.html
Log Message:
update broken Berkeley ftp link and add link to netpbm's ppmtompeg
which is the same thing as mpeg_encode

Just curious:
Does it work better than the old Berkeley software (which gives terrible
errors here)?

If so, what about using 'ppmtompeg' with -c flag and mpeg_encode without?
Currently it's hardcoded:

grep mpeg_encode *
main.c: sprintf(cmd, "mpeg_encode %s 2> /dev/null > /dev/null",
main.c: sprintf(cmd, "mpeg_encode %s", mpfilename);
main.c: fprintf(stderr,"mpeg_encode ERROR\n");
main.c: sprintf(cmd, "mpeg_encode %s 2> /dev/null > /dev/null",
main.c: sprintf(cmd, "mpeg_encode %s", mpfilename);
main.c: fprintf(stderr,"mpeg_encode ERROR\n");

Markus

Just curious:
Does it work better than the old Berkeley software (which gives
terrible errors here)?

I'm just finishing main.c right now. Results are *very* nice so far.
(it checks for both mpeg_encode and ppmtompeg then sets the encoder)

If so, what about using 'ppmtompeg' with -c flag and mpeg_encode
without? Currently it's hardcoded:

grep mpeg_encode *
main.c: sprintf(cmd, "mpeg_encode %s 2> /dev/null > /dev/null",
main.c: sprintf(cmd, "mpeg_encode %s", mpfilename);
main.c: fprintf(stderr,"mpeg_encode ERROR\n");
main.c: sprintf(cmd, "mpeg_encode %s 2> /dev/null > /dev/null",
main.c: sprintf(cmd, "mpeg_encode %s", mpfilename);
main.c: fprintf(stderr,"mpeg_encode ERROR\n");

[fixed]

Re. -c, more trials first. I don't have UCB's mpeg_encode compiled to
test it with (but have the source); running it with ppmtompeg right now,
and that's pretty much installed by default on most distributions
(standard netpbm).

Hamish

> 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?).

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.

Next: figure out how to get d.nviz to automatically generate MPEGs.
(but not by me right now)

Hamish

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

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

Note you shouldn't need `g.mlist`, r.out.mpeg knows about ('quoted')
wildcards.

Also note that before two days ago g.mlist mixed filename order.

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).

I'm not sure.
I'll try and build mpeg_encode 1.5b, maybe the bug is there?.

Hamish

On Tue, Jun 13, 2006 at 02:50:59AM +1200, Hamish wrote:

http://grass.itc.it/grass61/manuals/html61_user/

nviz link is broken?

Yes. This means that the compilation of the Linux snapshot failed.
Verification:
http://grass.itc.it/grass61/binary/linux/snapshot/error.log
-> apparently there are/were compilation issues.

I can try to investigate.

http://grass.itc.it/nviz/

"NVIZ Tutorial"

.. nope.

Sure, the second page is a static Web page in the GRASS
Web server (also maintained in CVS).

Markus

On Mon, Jun 12, 2006 at 05:44:02PM +0200, Markus Neteler wrote:

On Tue, Jun 13, 2006 at 02:50:59AM +1200, Hamish wrote:
> http://grass.itc.it/grass61/manuals/html61_user/
>
> nviz link is broken?

Yes. This means that the compilation of the Linux snapshot failed.
Verification:
http://grass.itc.it/grass61/binary/linux/snapshot/error.log
-> apparently there are/were compilation issues.

I can try to investigate.

Done:

make[3]: Entering directory `/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/visualization/nviz/src'
gcc -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include -O2 -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include -I/usr/local/include -DUSE_X11= -DPACKAGE=\""grassmods"\" -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include \
        -o OBJ.x86_64-unknown-linux-gnu/nvizAppInit.o -c nvizAppInit.c
In file included from togl.h:16,
                 from nvizAppInit.c:8:
togl_ws.h:5:12: #if with no expression
In file included from nvizAppInit.c:8:
togl.h:51:27: OpenGL/gl.h: No such file or directory
In file included from nvizAppInit.c:8:
togl.h:165: error: syntax error before "Togl_LoadBitmapFont"
togl.h:165: warning: data definition has no type or storage class
togl.h:166: error: syntax error before "GLuint"
togl.h:215: error: syntax error before "left"
make[3]: *** [OBJ.x86_64-unknown-linux-gnu/nvizAppInit.o] Error 1
make[3]: Leaving directory `/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/visualization/nviz/src'

This cannot work since the gl.h file is here:
/usr/include/GL/gl.h

rpm -qf /usr/include/GL/gl.h
xorg-x11-devel-6.8.2-1.EL.13.25

I guess I missed the related discussion recently.
According to the ChangeLog it is related to Glynn's TOGL
update.

The machine is based on Redhat Enterprise 4.

Markus

Markus Neteler wrote:

> > http://grass.itc.it/grass61/manuals/html61_user/
> >
> > nviz link is broken?
>
> Yes. This means that the compilation of the Linux snapshot failed.
> Verification:
> http://grass.itc.it/grass61/binary/linux/snapshot/error.log
> -> apparently there are/were compilation issues.
>
> I can try to investigate.

Done:

make[3]: Entering directory `/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/visualization/nviz/src'
gcc -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include -O2 -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include -I/usr/local/include -DUSE_X11= -DPACKAGE=\""grassmods"\" -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include \
        -o OBJ.x86_64-unknown-linux-gnu/nvizAppInit.o -c nvizAppInit.c

Note: -DUSE_X11=

This should be -DUSE_X11=1 if configure detected X.

In file included from togl.h:16,
                 from nvizAppInit.c:8:
togl_ws.h:5:12: #if with no expression

Hmm. I'll need to change the Makefile for that. USE_X11 is either 1 or
empty, which isn't easy to test for in a #if directive.

In file included from nvizAppInit.c:8:
togl.h:51:27: OpenGL/gl.h: No such file or directory

Due to the USE_X11 test failing, Togl thinks it's being compiled for a
Mac.

I guess I missed the related discussion recently.
According to the ChangeLog it is related to Glynn's TOGL
update.

It is. However, the fact that USE_X11 isn't getting set is the root of
the problem.

--
Glynn Clements <glynn@gclements.plus.com>

Glynn Clements wrote on 06/13/2006 01:55 AM:

Markus Neteler wrote:

http://grass.itc.it/grass61/manuals/html61_user/

nviz link is broken?
       

Yes. This means that the compilation of the Linux snapshot failed.
Verification:
http://grass.itc.it/grass61/binary/linux/snapshot/error.log
-> apparently there are/were compilation issues.

I can try to investigate.
     

Done:

make[3]: Entering directory `/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/visualization/nviz/src'
gcc -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include -O2 -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include -I/usr/local/include -DUSE_X11= -DPACKAGE=\""grassmods"\" -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include \
       -o OBJ.x86_64-unknown-linux-gnu/nvizAppInit.o -c nvizAppInit.c
   
Note: -DUSE_X11=

This should be -DUSE_X11=1 if configure detected X.

In file included from togl.h:16,
                from nvizAppInit.c:8:
togl_ws.h:5:12: #if with no expression
   
Hmm. I'll need to change the Makefile for that. USE_X11 is either 1 or
empty, which isn't easy to test for in a #if directive.

Thanks, now it reports:

gcc
-I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include
-O2
-I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include
-I/usr/local/include -DUSE_X11=0 -DPACKAGE=\""grassmods"\"
-I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include
\
        -o OBJ.x86_64-unknown-linux-gnu/nvizAppInit.o -c nvizAppInit.c
In file included from nvizAppInit.c:8:
togl.h:51:27: OpenGL/gl.h: No such file or directory
...

-> -DUSE_X11=0
which is at least easier to test.

In file included from nvizAppInit.c:8:
togl.h:51:27: OpenGL/gl.h: No such file or directory
   
Due to the USE_X11 test failing, Togl thinks it's being compiled for a
Mac.

I guess I missed the related discussion recently.
According to the ChangeLog it is related to Glynn's TOGL
update.
   
It is. However, the fact that USE_X11 isn't getting set is the root of
the problem.

checking whether setpgrp takes no argument... yes
checking for W11... no
checking for X... no
checking whether to use Curses... yes
checking for curses.h... yes

HA! I'll check if X is installed, apparently only partially on the new
server...

rpm -qa | grep xorg
xorg-x11-Mesa-libGLU-6.8.2-1.EL.13.25
xorg-x11-deprecated-libs-devel-6.8.2-1.EL.13.25
xorg-x11-libs-6.8.2-1.EL.13.25
xorg-x11-devel-6.8.2-1.EL.13.25
xorg-x11-Mesa-libGL-6.8.2-1.EL.13.25
xorg-x11-deprecated-libs-6.8.2-1.EL.13.25
xorg-x11-xauth-6.8.2-1.EL.13.25.1

I'll check.

Markus

Markus Neteler wrote on 06/13/2006 10:03 AM:

Glynn Clements wrote on 06/13/2006 01:55 AM:

Markus Neteler wrote:

http://grass.itc.it/grass61/manuals/html61_user/

nviz link is broken?
      

Yes. This means that the compilation of the Linux snapshot failed.
Verification:
http://grass.itc.it/grass61/binary/linux/snapshot/error.log
-> apparently there are/were compilation issues.

I can try to investigate.
    

Done:

make[3]: Entering directory `/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/visualization/nviz/src'
gcc -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include -O2 -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include -I/usr/local/include -DUSE_X11= -DPACKAGE=\""grassmods"\" -I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include \
      -o OBJ.x86_64-unknown-linux-gnu/nvizAppInit.o -c nvizAppInit.c
  

Note: -DUSE_X11=

This should be -DUSE_X11=1 if configure detected X.

In file included from togl.h:16,
               from nvizAppInit.c:8:
togl_ws.h:5:12: #if with no expression
  

Hmm. I'll need to change the Makefile for that. USE_X11 is either 1 or
empty, which isn't easy to test for in a #if directive.

Thanks, now it reports:

gcc
-I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include
-O2
-I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include
-I/usr/local/include -DUSE_X11=0 -DPACKAGE=\""grassmods"\"
-I/hardmnt/krokus0/neteler/grass61binarybuild/grass6/grass6/dist.x86_64-unknown-linux-gnu/include
\
       -o OBJ.x86_64-unknown-linux-gnu/nvizAppInit.o -c nvizAppInit.c
In file included from nvizAppInit.c:8:
togl.h:51:27: OpenGL/gl.h: No such file or directory
...

-> -DUSE_X11=0
which is at least easier to test.

In file included from nvizAppInit.c:8:
togl.h:51:27: OpenGL/gl.h: No such file or directory
  

Due to the USE_X11 test failing, Togl thinks it's being compiled for a
Mac.

I guess I missed the related discussion recently.
According to the ChangeLog it is related to Glynn's TOGL
update.
  

It is. However, the fact that USE_X11 isn't getting set is the root of
the problem.

checking whether setpgrp takes no argument... yes
checking for W11... no
checking for X... no
checking whether to use Curses... yes
checking for curses.h... yes

HA! I'll check if X is installed, apparently only partially on the new
server...

rpm -qa | grep xorg
xorg-x11-Mesa-libGLU-6.8.2-1.EL.13.25
xorg-x11-deprecated-libs-devel-6.8.2-1.EL.13.25
xorg-x11-libs-6.8.2-1.EL.13.25
xorg-x11-devel-6.8.2-1.EL.13.25
xorg-x11-Mesa-libGL-6.8.2-1.EL.13.25
xorg-x11-deprecated-libs-6.8.2-1.EL.13.25
xorg-x11-xauth-6.8.2-1.EL.13.25.1

I'll check.

Problem solved:
The PATH definition in the cronjob was lacking /usr/X11R6/bin
since xmkmf is needed for the test. Unfortunately configure isn't very
chatty to indicate that xmkmf wasn't found. Anyway, now it works:

Finally
http://grass.itc.it/grass61/manuals/html61_user/nviz.html
is back. Thanks, Hamish for pointing out and Glynn for fixing the
test (maybe unrelated) and indicating the problem.

Markus