Opened 4 months ago

Last modified 4 months ago

#3851 new defect

r.out.mpeg always fails because the output file name is empty

Reported by: paoloz Owned by: grass-dev@…
Priority: normal Milestone:
Component: Raster Version: svn-trunk
Keywords: mpeg animation Cc: paolo.zatelli@…
CPU: Unspecified Platform: Unspecified

Description

Testing r.out.mpeg using North Carolina data set, smaller subset NC location (nc_basic_spm_grass7)

g.region rast=elevation

r.out.mpeg view1=elevation@PERMANENT,elevation_shade@PERMANENT output=./test.mpg

always fails with

r.out.mpeg view1=elevation@PERMANENT,elevation_shade@PERMANENT output=./test.mpg

Reading raster map <elevation@PERMANENT>...

Reading raster map <elevation_shade@PERMANENT>...

ERROR: Could not open output file!

WARNING: mpeg_encode ERROR

the reason is that the name of the output mpeg fie is not copied in the "outfile" variable, which is used to write the name of the output mpeg in the configuration file for "ppmtompeg"|"mpeg_encode" encoder. Therefore the name of the output mpeg is blank and the encoding always fail with "ERROR: Could not open output file!".

Tested with GRASS: 7.0.0, 7.4 svn (12/01/2018), 7.6.0, 7.6.1. Works in 6.4.6 because the variable is not empty, see lines 442-445 of grass-6.4.6/raster/r.out.mpeg/main.c.

A patch to solve the problem is attached.

Attachments (1)

r_out_mpeg.diff (907 bytes) - added by paoloz 4 months ago.
r.out.mpeg

Download all attachments as: .zip

Change History (3)

Changed 4 months ago by paoloz

Attachment: r_out_mpeg.diff added

r.out.mpeg

comment:1 Changed 4 months ago by neteler

Would you mind to submit your fix as a pull request here? https://github.com/OSGeo/grass/pulls

We recently mirated to GitHub for the code management and we could handle your contribution much easier. Thanks!

comment:2 in reply to:  1 Changed 4 months ago by mmetz

Replying to neteler:

Would you mind to submit your fix as a pull request here? https://github.com/OSGeo/grass/pulls

For the time being; i would regard a patch as a pull request. If people are more comfortable providing a patch, that's fine.

I have applied the patch to master, relbr76, and relbr74:

https://github.com/OSGeo/grass/commit/78e9da1af300035ab1dbe4135ab79d1068aadd58

https://github.com/OSGeo/grass/commit/2340b9dc9612535a6f249557a6175c98128a7451

https://github.com/OSGeo/grass/commit/3ab95ff7a1781317dcca969c13cfe4fc6cb024df

Note: See TracTickets for help on using tickets.