Last update: November 12, 2010
This page describes a tool written to edit the "TAG" files used by the Netgear 8000 and 91xx Digital Entertainer (DE) series of home entertainment media servers. These files enhance the display selection pages by providing still image clips and synopsis information while browsing and playing the available media selections. The new tool iscalled TagEdit. It came into being due to terminal frustration with far too many aspects of the Netgear provided tool called "Digital Entertainer for Windows" (DEW). This utility, provided with the hardware, can be used to create and associate a "TAG" (ID3) file with individual video file types such as 'avi', 'mkv', 'divx', 'mp4', etc (and 'iso', but they don't tell you that, nor include them in the filtered file selector dialog). The association is achieved by writing the ID3 frames to a file with the extension "TAG" and same primary file name as the media file—capitalization assumed significant as the underlying DE OS is an embedded Linux.
The Netscape TAG files use version 4 of the ID3 specification. More information on the ID3 format is available at http://id3.org.
TAG file creation
While TagEdit can be used to create TAG files by cloning, or from scratch, automated creation in batch really speeds things up. Tom Briden provided the EVA community with an excellent Linux command-line utility called tagtool which does singleton or batch creation of TAG files from a wildcard list of media files. Tom's tool will try to extract data directly from the Internet Movie Database (IMDb) or the Online TV database (TheTVDB), as appropriate, using their HTTP APIs. You can then use TagEdit to inspect all, or a sample of the TAG files to add/change the images as required, or enhance the description, title, etc. Tom's tagtool script is available here: TagTool.zip.
The author has made significant changes and enhancements to the Briden tool so it can be wrappered in a GUI or command line interface to run under Linux/Unix, all modern flavors of Microsoft Windows, and perhaps Mac OS-X (untested at this time). Downloads and more information on this are available on the TagMaker page.
Rationale and Features
My editor was never intended as a feature for feature replacement of the Netgear utility. The DEW provides some capability for searching Internet databases for movie data and Amazon dot com for images. I found these features less efficient than simply opening a browser to locate data, then using cut and paste, plus image right-click "save as" capability. This works well, so coding up poor equivalents seems too much like wasted effort!
Some of the advantages I see of my TagEdit over DEW are:
- Just edits TAG files—nothing more—with a simple, standard editor style interface.
- Does not immediately start scanning your discs for media files on loading (you know where they are and a background scan just consumes CPU cycles to no good return)
- Has a "Save As..." feature so you can quickly and easily clone a TAG file for multi-episode media files.
- Has a mode which does a very good job of reading corrupt TAG files.
- Remembers the last directory you were in (even if the load operation failed) and retains this memory across restarts. Treats the directories from which TAG files and images where loaded as distinct.
- Fully GUI based, but runs on MS windows, Linux, Unix, and Mac OSX platforms (with ActiveState Perl)
- Import and export images (jpg, png, even bmp if you must).
- Correctly displays and saves non-English character set fields
- Handles non-English character sets correctly. Many TVDB entries are available in German, French, Spanish, Italian, and Portugese. TagMaker can be told to create TAG files using an available language—Internationalization comes to EVA!
OperationThe editor was written in Perl with Tk for the GUI components. As well as being architecturally compatible with tagtool, this enables it to run on any host. It has been un-extensively tested under Linux (fc9 and 13), and Windows XP (SP3). Running under OSX looks feasible, but so far, I've decided that time is too precious and life too short to install the X system and drivers required by Tk to test in this environment.
PrerequisitsThe program can be run using a Perl interpreter, or the "compiled" Windows executable (see Downloads). For Linux/Unix, Perl should be at 5.10.x, or later. Under Windows, you must use the 5.10.x version of ActiveState Perl. This is because ActiveState have dropped their Tk module in the 5.12 and later releases, apparently due to the death of the package author. It is replaced by 'Tkx', but that is somewhat ActiveState proprietary and I'm after ease of portability!
As well as Perl, you will need some Perl modules that are not included as part of a standard distribution. If not present, the Perl interpreter will complain about the first one not found in the perl @INC path setting. They are easily and quickly installed using the appropriate package managers, cpan on Linux/Unix, ppm for ActiveState on Win32. Consult the README for the latest details and instructions. Note that the CPAN utility will do a build and test and it in the case of Tk, it is likely some of the tests that exercise Xwin features will fail. If too many fail, the package will not be installed, but you can "force" the install by including the word "force" before "install". This has not been seen to have any ill effects, so far.
The editor has batch and interactive modes. The batch mode will "dump" an ID3 file to STDOUT in human readable form. See the source for details, or run with the "--help" (-h) option for a usage message. The dump capability was done mostly as a development aid. Normally, you just fire it up into interactive mode in the usual ways:
perl tagedit.pl (or just 'tagedit' if you place the exe file on your PATH)
The editor should be intuitive to use. All fields except the "Last Update" may be changed (this will be updated automatically when the file is saved). If the file has an embedded image, it will be displayed in the lower right. An option allows the image to be scaled from full size if it is a monster, as some are. From the File menu, you can perform the usual New, Open, Close, Save, and Save As... operations. The Open and Save As... dialogs will 'remember' the last path used, even after a shutdown (one of my pet peeves with DEW). The checkbox at the bottom allows you to decide whether to include the embedded image in the saved file. The Options|Image menu allows you to export the embedded image to a named file, or import a different image to be saved with the TAG file. The Image Import/Export dialog also remembers the path used which can be different to the Open/Save As... path.
Damaged TAG File Repair
It's not uncommon to encounter damaged ID3 files. The cause is generally a bad frame length value and normally, such files are simply not loaded. The Options|Permissive check box will try to load as much of the damaged file as possible by ignoring the frame length values and scanning for all valid frame identifiers. Once loaded, the damaged file can be saved, fixing whatever was wrong with it. If the image data was corrupt you will be notified and the image blanked. You can save without the image, or add a good image using Options|Image|Import.
TagEdit can automatically build or update a list of "genre" types used in your TAG files. The EVA uses these to build its Browse by genre list. If you edit and save a TAG file which has an unknown genre type, you will be prompted to add it to the list. If it was a mistake, you can cancel and correct it. The Genre field of the editor is now a drop-down select list, so no excuse for getting the spelling or capitalization of a category wrong (The EVA sees SciFi and scifi as two distinct categories). The genre list used in the drop down is saved automatically on exit as a flat file allowing it to be manually edited, if you wish..
Lastly, to manage and refine your media collection, TagEdit can generate a cross-referenced display showing the Genres and the files that reference them. TAG files with no genre set are listed in a special a group. Orphan TAG files with no corresponding media file (it happens...) are also listed, as are media files with no TAG files. The list is shown in a separate window. You can triple-click a line (unusual, but you get used to it) to select the line, then press Edit to bring up that file in the editor making this a total Genre management solution.
DownloadsThe first link below provides the tool compiled for execution under Microsoft Windows XP SP3, with full source code, sample ID3 tag files, and Release Notes in .zip format. The second, smaller download excludes the Windows executable, providing all the rest as a tar.gz for Linux/Unix users.
- TagSuite executables (4), source, sample files, and release notes
- TagSuite source, sample files, and release notes only
- View Latest Release Notes
These links will always link to the latest version (see the Release Notes).
ActiveState Perl for MS Windows for those who want to run the code inside an interpreter and experiment with the source is available for free download from ActiveState.
Tagedit is provided as-is under a Creative Commons, Attribution-Noncommercial-Share Alike 3.0 License (See http://creativecommons.org/licenses/by-nc-sa/3.0). That is, you can do what you like with it except ask money for it, or any modified form of it, and must acknowledge the original author. If you need to contact me, see my UQ ITEE Home Page for contact details. Finally and naturally, I don't suggest nor imply that the program is good for anything at all.