Opened 6 years ago

Last modified 5 years 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: 7.8.3
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 6 years ago.
r.out.mpeg

Download all attachments as: .zip

Change History (4)

by paoloz, 6 years ago

Attachment: r_out_mpeg.diff added

r.out.mpeg

comment:1 by neteler, 6 years ago

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!

in reply to:  1 comment:2 by mmetz, 6 years ago

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

comment:3 by neteler, 5 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.