Aegisub
Aegisub copied to clipboard
Option to store Aegisub's project garbage separately from the script file
Currently Aegisub injects a header into the .ass files containing information such as associated audio and video files, the last edited line, and the video position. This leads to difficulties when collaborating using version control systems such as git: As this information will be inevitably be changed every time anyone touches the script, this results in more or less guaranteed conflicts any time you need to merge your changes with someone else's.
While there are ways to alleviate the issues to some extent, such as using git filters to automatically remove the header, these come with their own caveats, such as difficulty to define them easily in a cross-platform manner, sub-par client support, and other subtleties.
To some extent, there is also the question of privacy, as if the user is not careful, their computer username might end up in the script file without their knowing, if absolute paths are used for the audio file and video file locations.
It would be good if it was instead possible to store this information externally, somewhere separately from the main .ass file. This does beg a number of questions:
- How should the settings be stored?
- Should all files be remembered?
- How should file renames be handled?
For the first one, one might consider a simple human readable ini-like; more or less simply a centralized collection of project garbage headers. Note that synchronization may be an issue if multiple Aegisub instances are running simultaneously.
For the second issue, perhaps a LIFO system could be considered, where a user-defined amount of files are remembered at most by Aegisub. When the limit is exceeded, the file that hasn't been opened for the longest amount of time is purged. Though on the other hand, this may not be an issue in practice, as even thousands of headers will not require a considerable amount of space on disk.
The third issue comes up when collaborating e.g. via FTP, and the file is renamed after each new iteration. In this case it is still desirable to remember settings from the previous iteration of the file, especially the associated audio and video files. One idea is to have Aegisub generate a script ID once which is added to the file header, and then used to track the script across renames.
I have an idea for a workaround for both the first issue and the third.
Currently, commit c41e97cec159cf2521bf4a55b77cb8a3b5793ec2 already removed the Aeigsub Project Garbage when exporting the file using File > Export Subtitles... but the default Save still has them.
Instead of Save saving the file as .ass with the garbage, it could save it in the same way as the export function. Then, under export could be an option to export the file as an .ass, but named an Aegisub Project file or something along those lines.
Or there could be another Save as... option similar to this:
where the project version would include the project garbage, both still sharing the same extension.
With the name, "Aegisub Project Garbage", it seems like this was an unrealized feature for the original team.
I think you underestimate how useful the extradata is. The default save should really retain it imo, though I agree that some of the project settings should be stored elsewhere on the machine and am still thinking on how best to implement that. Dropping the info entirely by default isn't acceptable, as it's pretty useful despite the name.
To give a bit of an update on this issue, it's worth noting that the git collaboration issue can also be alleviated using a custom merge driver such as assdiff3.