Opened 9 months ago

Last modified 2 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: 7.8.3
Component: Raster Version: svn-trunk
Keywords: mpeg animation Cc: paolo.zatelli@…
CPU: Unspecified Platform: Unspecified


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 9 months ago.

Download all attachments as: .zip

Change History (4)

Changed 9 months ago by paoloz

Attachment: r_out_mpeg.diff added


comment:1 Changed 9 months ago by neteler

Would you mind to submit your fix as a pull request here?

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 9 months ago by mmetz

Replying to neteler:

Would you mind to submit your fix as a pull request here?

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:

comment:3 Changed 2 months ago by neteler

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