Several folks have commented about Lostify’s unfortunate propensity for making copies of the video files you try to tag, especially when tagging files inside of iTunes. When you’re dealing with large files, sometimes over 1GB each, this can really take some time (not to mention disk space). And unfortunately, this is kind of a technical problem. Nevertheless, I’ll explain it here. Maybe the ensuing discussion will give rise to a better solution.
What you’re seeing here is a confluence of several factors:
- Lostify tries to play things safe: because AtomicParsley (the command-line utility Lostify uses to actually modify MP4 files, hereinafter referred to as AP) is still in beta testing, Lostify doesn’t necessarily trust that it will not produce a corrupt video file. Such corruptions are rare, but they have been known to happen. To avoid this, Lostify has several different means of providing safety: it can (a) instruct AP to produce a separate tagged copy of the file, leaving the original alone; (b) instruct AP produce a separate tagged copy, then (if it appears to have been successful) trash the original and rename the copy same as the original; or (c) make a backup copy of the original, then instruct AP to overwrite the original file with a tagged version, and (if successful) trash the backup. Or there’s choice (d), which is to throw caution to the wind and just instruct AP to overwrite the original.
- Options (a) and (b) above are straightforward — as far as AtomicParsley is concerned, the output is a new file. But whenever you tell AP to overwrite the original file [see options (c) and (d) above], two different things can happen. In a few cases, the existing metadata/tags are “just right,” and the file can be overwritten in place. But in most cases, AP must rewrite the entire contents of the file into a temporary file in the same directory as the original, and then it replaces the original with this temp file.
- iTunes uses aliases rather than simple file paths to keep tabs on its tracks. This means that if you take a file in iTunes (while iTunes is running), move it to the trash, and replace it with a newly-tagged version in the same location and with the same name as the original… iTunes still goes ahead happily referring to the one in the trash. You have to quit iTunes and restart it before it will recognize the new file. (If anybody knows some clean and reliable ways around this, I’m all ears.)
As a consequence of #3, Lostify works differently when you are tagging files from within iTunes. If you have normally selected methods (a) or (b) for safety, Lostify substitutes method (c). This explains the extra copy operation you see — in fact much of the time, first Lostify makes its backup copy, then AtomicParsley makes another whole tagged copy as it works, then AP replaces the original with its tagged copy, then (assuming the new copy looks good) Lostify trashes its backup. Yeah, I know it’s wasteful, but at least it’s safe.
There are some cases when you might not care so much about the safety aspects. One would be if you already have the videos backed up somewhere — either in the same format, or (if you don’t mind transcoding again, in the rare case of corruption) in a different or original format. In cases like this, you’re much better off just choosing option (d), which will operate as fast as possible and won’t leave anything filling up your trash can.
Another case where you might consider “safely” choosing option (d) is if all your MP4 files come from a particular version of a particular encoder, and Lostify has already proven itself in producing reliable results with those files. For example, if you always encode your MP4s using QuickTime, and they always go through Lostify correctly, then you can be fairly certain that other MP4s encoded with the same version of QuickTime will also encode correctly. But if you update to a new version of QuickTime, you’d be wise to temporarily switch back to a safer method for Lostify to produce its output, until you’ve verified that things still work smoothly. The same goes for ffmpeg, iSquint, VisualHub, or whatever you use to encode your MP4 files.
Having said all that, I’m certain there’s a better way to be doing this. Maybe there’s a way for Lostify to tell iTunes (via AppleScript) that it should not worry about the old copy in the trash, but to look at the path instead to get the new version. Maybe I can work with the AtomicParsley folks to get it to be more “careful”, so the odds of overwriting a good original with a corrupt tagged version are drastically reduced (or eliminated). Or maybe someone reading this will have another bright idea to solve these troubles. I’d love to hear your comments.