I am using LAMMPS-GUI on Windows. The slideshow window has a button to create a movie from images. On clicking that button, a window opens for entering the name and directory of the new movie file, but on entering that information and clicking “Save”, the window closes and nothing happens. The program “ffmpeg” is installed and has been added to the path. A movie can be created by using ffmpeg from the command line, but it would be much easier if it could be done from the slideshow window.
Possible causes of this problem are:
Perhaps LAMMPS-GUI requires the other movie option, which is to have “imageMagick” installed.
To use ffmpeg, the documentation says that “LAMMPS has to be compiled with -DLAMMPS_FFMPEG“; perhaps LAMMPS-GUI was not built with that option.
Which version exactly and downloaded / installed from where?
Did you install it yourself or are you using the version that is bundled with the LAMMPS-GUI installer package?
Nope. LAMMPS-GUI will fall back to use ImageMagick only if FFMpeg is not available. Since it is available, FFMpeg will be used.
This would a) refer to the LAMMPS documentation and not LAMMPS-GUI and b) the LAMMPS documentation explains that this compilation option applies to using FFMpeg
with the dump movie command. This has no connection to LAMMPS-GUI. LAMMPS-GUI “collects” the images created by dump image and displays them interactively and then launches FFMpeg (or ImageMagick) by itself on those images to create the movie. There is no compile time option and no mention of that in the LAMMPS-GUI documentation.
The most likely explanation is that there is some kind of error happening but that error is not captured and displayed. You have to understand that a) Windows is not my primary platform and I basically only launch it (from a virtual machine) occasionally to do some minimal checking if the Windows packages still install and run. Building is done on Linux with a cross-compiler (MSVC++ and Visual Studio or compiling from the command line work, but doing the build process on Windows is significantly more complex and some of the LAMMPS packages cannot be built on Windows, LAMMPS-GUI itself is fully portable). And b) the second point is that LAMMPS-GUI has recently undergone a massive rewrite and refactor which made the code much cleaner and easier to maintain, but it is always expected that there are some rough edges. For issues on Windows and macOS, I am relying on users reporting problems and I will look into them at the next opportunity.
As it happens, I am getting a new version of LAMMPS-GUI (3.0.4) ready for release, where I have revised the movie creation to create more portable movies (by default when converting from images, FFMpeg uses a color encoding that is ejected by web browses like Firefox or Safari) and where it will check for and report errors (which is one detail that got lost in the refactoring process).
We just found the color encoding issue out after switching over the LAMMPS home page to a new design and recreating a whole bunch of the movies that it serves.
Bottom line, before uploading new binaries, I will test movie creation on Windows and check if I need to update the bundled FFMpeg executable. I will post a message in the forum, when it is done (will take a few more days, I have to complete some work related to the tutorials interface).
FYI, I have tracked down the cause for the failed movie encode: the temporary file path that Qt was creating on Windows turned out to be unusable with FFMpeg, so I need to implement a Windows-only workaround.
It has a portable solution for creating the temporary concatenation files for movie creation and will now also present a dialog with error messages if the conversion failed for some reason.
This has a few additional improvements:
It is flagged as a pure GUI application and thus will no longer spawn a (useless) console window
It is cryptographically signed so the file integrity can be checked. For that you have to install the root key, though, since it is using a self-signed certificate. Instructions are in the documentation: 1. Installation — LAMMPS-GUI Documentation
Please let me know if there are any remaining Windows specific problems or annoyances.
Wow. Removing the terminal window sure improves the workspace. And for the first time I was able to create a movie within LAMMPS-GUI! I sure appreciate your work.
Yesterday I discovered that code-signing certificates for open-source software are available for free. One source is https://signpath.org/. This morning I entered “OSS code signing certificates for windows” in duckduckgo (my default search engine), and found others.
You have to look at the fine print. Yes, you can sign for free, but a) you can only do it with an automated workflow and b) they are not signed with my identity but that of the provider of the service. Both are compromises that I am currently not willing to make. Yes, having to manually install a certificate is a nuisance and on top of that we still have the problem that the built-in anti-virus software in Windows is extremely trigger happy for code like LAMMPS-GUI that dynamically load some components:
If you ever produce something worth bragging about, let us know.
We have a bunch of examples posted on the LAMMPS home page: Gallery · LAMMPS
I am currently recreating some of the really old ones and adding some new ones using recently added graphics features in LAMMPS.