Update 2009-03-15: See update below.
AtomicParsley is a very cool little program that will allow you to apply metadata to video files on the commandline.
However, it appears that you only get one shot at applying metadata with it, or else the file will be left without video.
Here is what I mean and how to re-create this (apparent) bug:
How To Recreate
Create an .m4v using HandBrake. Let’s call it “File1.m4v” for clarity.
Apply some tags to File1.m4v using AtomicParsley which will create a new file, let’s call that File2.m4v.
Apply some different tags to File2.m4v using AtomicParsley which will create a new file, let’s call that File3.m4v
Warning
AtomicParsley is used in several other GUI programs such as Lostify. If you use AtomicParsley as on File1.m4v and then use Lostify on File2.m4vm the resulting file will lose its video as well.
The same thing will happen if you use Lostify on File1.m4v and then on File2.m4v.
Note
a. This has been how the bug has bitten me. It may affect other formats created in other ways, but I am trying to be as specific as I can in the hopes of getting others to confirm this bug (or not confirm it).
b. This has happened to me on both my iMac and my MacBook, both of which are running 10.5.6.
I do not know if this bug shows up in the GUI programs, but it seems likely that it would, so be careful using those as well.
Result
For me, the result is that File3.m4v always loses its video.
QuickTime and iTunes show the video with a black screen.
VLC doesn’t show any video at all.
How to Work-Around
The key to avoiding this bug? Don’t apply tags with AtomicParsley (or programs that use it) more than once. Which is to say, you’d better keep your “File1.m4v” around until you are absolutely sure that you have all the tags that you want to apply.
Q: “What Do I Do If I Did Not Keep my File1.m4v?”
You can still edit the tags using iTunes. At least that worked for me in (limited) testing.
Final Notes
There may be something that I am doing (or not doing) which is causing this, meaning that it is not a bug in AtomicParsley. But I am skeptical.
I posted on the SourceForge forum for AtomicParsley and it was suggested that I try the “-4” flag to AtomicParsley. That flag had no noticeable effect. It appears that someone else may be running into the same problem.
I also posted about being unable to compile from source on the same forum.
It appears that the existence of AtomicParsley has meant that no other commandline programs for tagging video files has been created.
Sadly, AtomicParsley has not been updated since 2006-09-16 and will not even compile on my Mac OS X 10.5.6 machine:
$ ./build
Compiling AP_commons.cpp ...
Compiling AtomicParsley_genres.cpp ...
Compiling AP_iconv.cpp ...
Compiling AP_NSFile_utils.mm ...
Compiling AP_NSImage.mm ...
AP_NSImage.mm: In function ‘bool ResizeGivenImage(const char*, PicPrefs, char*)’:
AP_NSImage.mm:204: error: ‘_NSBitmapImageFileType’ was not declared in this scope
AP_NSImage.mm:204: error: expected `;' before ‘filetype’
AP_NSImage.mm:208: error: ‘filetype’ was not declared in this scope
AP_NSImage.mm:212: error: ‘filetype’ was not declared in this scope
AP_NSImage.mm:216: error: ‘filetype’ was not declared in this scope
Compiling AtomicParsley.cpp ...
Compiling AP_AtomExtracts.cpp ...
Compiling APar_sha1.cpp ...
Compiling APar_uuid.cpp ...
Compiling main.cpp ...
Linking AtomicParsley...
i686-apple-darwin9-g++-4.0.1: obj_files/AP_NSImage.o: No such file or directory
strip: can't open file: AtomicParsley (No such file or directory)
[1] 38645 exit 1 ./build
However it is not clear to me that it would even matter if I could compile my own version.
All I am saying is that if you were in the market to develop a program for tagging video files on the commandline, don’t assume that the existence of AtomicParsley means that the market is full. Obviously, if you could build on the code which already exists, that would be excellent. AtomicParsley was released under a GNU license. Sadly, I am no programmer, so I can’t do much by the way of improving it.
Update: 2009-03-15
@schuetzdj suggested that the “Large File” flag may have something to do with it. That would make sense as all my files were done with the AppleTV preset which turns on Large File support, even though these files are less than 4GB in size.
To test this theory, I converted a file (MPEG sequence, v2, program multiplex) using HandBrake and the “AppleTV” preset twice: the first time I did it as the default, with “Large File Size” enabled; the second time I did used the AppleTV preset but turned off the “Large File Size” (LFS).
Then I used a shell script which I wrote which converts a file twice using AtomicParsley.
The results? The LFS file does not show video at all after processing with AtomicParsley. The Non-LFS file shows video even after two conversions with AtomicParsley.
Tentative conclusion: **AtomicParsley cannot handle the “Large File Size” flag that HandBrake sets, even if the file is less than 4GB **
If you would like to attempt to duplicate this bug, here is what I ask you to do:
1) Take a file from any source, and convert it twice: a) for AppleTV + LFS and b) for AppleTV without LFS.
2) Run the script above on both files.
3) Let me know which of the files show video, and which do not (either QuickTime Player or VLC)
The script was written for Mac OS X but ought to work on any Unix system where ‘AtomicParsley’ is installed.
Please leave comments below if you have results you would like to share.