[Feature] Automatic compression/decompression
Is your feature request related to a problem? Please describe. Compressing/decompressing games is easy but takes time. Plus certain tools like chdman can lead to issues if not used properly (e.g. createcd on a DVD).
Describe the solution you'd like RomM could automate all these processes. I'd like to set a behavior for each platform or group of platform (i.e. cartridges and disks) so I can give the server a bunch of files and it compresses/decompresses them in the format the user prefers. Some examples include:
- Decompressing .zip/.7z archives
- Compressing cartridge based roms into .zip/.7z archives
- Compressing NGC/Wii disks into RVZ
- Compressing disk based images into the correct CHD format (using Romm's metadata is especially interesting for PS2 games which use CDs and DVDs)
- Recompressing already compressed games, either if they have been compressed suboptimally or if a tool update offers new options
The minimal settings needed per platform (or group or platforms) would be the destination format (i.e. 7z, plain rom file) and its compression (i.e. max, compatible with X). Then Romm would automatically process the files when it recognizes them, for example: pspgame.zip => pspgame.cso => pspgame.iso => pspgame.chd
Regarding more complex formats like CHD, it should:
- provide sensible and compatible defaults because understanding this tool can be hard and there are many, many conflicting opinions on how to best use its options on a lot of forums
- allow advanced users to specify which command they want to use for CDs and DVDs
Describe alternatives you've considered I'm already doing that by hand on my desktop, I'd love my server to take care of these tasks.
Related requests https://github.com/rommapp/romm/issues/1719 https://github.com/rommapp/romm/issues/929
On the fly conversion to formats like .chd / .rvz is certainly interesting. It's definitely is going to need some giant warning before someone chokes there low-powered arm processor (or similar) though.
Indeed, but it's super interesting to have it run on a server. So maybe a scheduler to run during less busy time or something that limits how much processing power it is allowed to use might be useful too.
This is an interesting thought, since I used RomVault for this explicit purpose before loading my library into Romm. I've never really thought of Romm as the same sort of ROM manager as RomVault, but rather as a showcase more akin to LaunchBox or EmulationStation. It would have been handy to be able to take care of everything at once within Romm.
It definitely would need to be restricted by a schedule, as well as a maximum runtime, considering most people probably aren't running Romm on enterprise-class server hardware and a large collection would take literally days to complete processing, even if they were.
I think it also would have to offer more concrete feedback on progress, via a progress bar, percentage, or something to that effect, in order for an individual to judge whether it's even feasible on their hardware, in line with Spinnich's statement. A Raspberry Pi would probably go up in flames compressing a couple hundred ISOs. Lots of additional UI would need to be made, in general, the growing complexity of which starts to make me question whether it's worthwhile adding all this in when tools like Igir probably do a much better job.
I didn't know about RomVault nor Igir! These are very cool projects, but they don't quite match with what I'm looking for (applying to one, the other or both: lack of automation, no GUI, no support for all formats...).
However, I found a lot of very interesting info in their documentation. RomVault's supported archive writing formats Igir's supported archive reading formats Igir's archive writing formats which is limited to zip and adheres to the TorrentZip and RVZSTD specifications for reproducibility and compatibility.
I might be mistaken, but these zip formats might be able to be compressed by a server, at least for small cartridge based roms. ISOs take a while to be processed on my desktop so yeah, I expect them to be looong on a server. But this is actually what I'd like for those: slow and relaxed computing. I'm not in a hurry so I'm willing to trade "having to monitor a long task on my desktop" for "a few weeks of background computing on my server".
RomM already handles hashing, which is time and resource intensive for larger files. Is there already a scheduling and/or UI that can be reused for compression/decompression?
How does RomM manages hashing of archive files? Is the hash already in the archive metadata or does it have to be extracted? If so, there is already a mechanism for automatic extraction that is already handled by a server. It would "just" need to be made available to the user for users who prefer their roms full-sized, and would be half of the work for those who prefer to compress them in another format (with exclusion options and necessary guardrails to avoid loops like "I get a zip, it gets decompressed, I make a better zip, it gets decompressed AGAIN").
Igir uses hashes to organize a rom collection into folders (including a RomM preset). Since RomM already computes hashes, could it move rom files into the correct platform folder when some are misplaced? (I reckon that is a somewhat different issue, if it seems feasible it might deserve its own feature request)
this would be one of those features that elevates romm to the ultimate game management tool