I am quite new in python language and opendrift modelling, so I'm having some difficulties in saving model results. When I try to save plots with the filename argument as .png, images are saved perfectly. But when I try to save animations as .mp4 I get an error I cannot understand:
error:
INFO:opendrift.models.basemodel:Could not save animation: 18:10:13 INFO opendrift.models.basemodel: Command '['ffmpeg', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '792x484', '-pix_fmt', 'rgba', '-r', '20', '-loglevel', 'error', '-i', 'pipe:', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-y', 'figures/testeSpectrum.mp4']' returned non-zero exit status 1.
Another doubt is if there is a limit of 'trajectory duration' to save animations as .gif. I can save gifs normally when the model has only a few days of duration, but if I increase the drift time, I cannot save animation as gif.
I am using ubuntu linux and running opendrift in spyder.
Any help will be much appreciated.
Hello!
I am quite new in python language and opendrift modelling, so I'm having some difficulties in saving model results. When I try to save plots with the filename argument as .png, images are saved perfectly. But when I try to save animations as .mp4 I get an error I cannot understand:
code:
o.animation(fast = True, show_trajectories=True, filename = 'figures/test.mp4' )
error:
INFO:opendrift.models.basemodel:Could not save animation: 18:10:13 INFO opendrift.models.basemodel: Command '['ffmpeg', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '792x484', '-pix_fmt', 'rgba', '-r', '20', '-loglevel', 'error', '-i', 'pipe:', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-y', 'figures/testeSpectrum.mp4']' returned non-zero exit status 1.
Another doubt is if there is a limit of 'trajectory duration' to save animations as .gif. I can save gifs normally when the model has only a few days of duration, but if I increase the drift time, I cannot save animation as gif.
I am using ubuntu linux and running opendrift in spyder. Any help will be much appreciated.