A Case for Not Obfuscating App Data

In the world of computing, there are some compelling cases to obfuscate data. Maybe you have obligations to protect user data such as credit card information. Maybe you’re a hacker and you don’t want your victims to know what your code is doing on their website. Or maybe you manage a product in a capitalist society and you want to throw a hurdle in the way of your competitors, making it more difficult to transfer data from one competing app to another. It’s that last one that I ran afoul of recently.

EyeTV DVR software for Mac

Way back in 2009 I set up a convoluted (though functional) workflow to turn my Mac into a DVR to get past the storage limitations of the TiVos of the time. With a 12TB storage array it was great to be able to collect a stack of evergreen children’s programming which get a lot of repeat views.

Fast forward to present times and Elgato has EOL’d the software and decided to provide no automated way to export my video library to plain ‘ol video files for viewing in a post-EyeTV world. The problem is that the software doesn’t store files in a sensible way like: /Documents/EyeTV/Show-name/show-name.mpg. Instead, recordings are locked inside macOS “packages” which are not visible using the Finder or many command lines.

If you explore the archive you find the video file you want, but it’s not named anything useful!

So here is the point where I lecture Elgato for their hubris in thinking that their software would last forever when they first created it, for creating a user-hostile system of organizing files, and lastly for not providing buyers of their software a way to migrate to something else when they pulled the plug.

Unlike Apple’s Photos app, they did at least toss us a handhold in the form of the .eyetv folder name. We can use the name of that folder, along with a few tools, to convert a large library like this into a stack of mpg files that open in any video app.

Since I have a vary large library it’s worth the effort to automate this, rather than going into each package and renaming/extracting each file manually. Here is the workflow I put together to accomplish this:

  1. Use A Better Finder Rename to remove .eyetv extension from show packages
  2. Use command-line remove extended attributes, making the packages ordinary folders which are more easily searchable
  3. Use A Better Finder Rename to rename mpg files with the parent folder name
  4. Use command-line to move all mpg files to the desired folder
  5. Remove old EyeTV folder

Use A Better Finder Rename to remove .eyetv from show packages

This one is pretty straightforward, just drag your “EyeTV Archive” folder into the right pane and set a single rule to remove all instances of .eyetv. This could probably also be done with the command line.

Use command-line to remove extended attributes

Simply removing the .eyetv extension will not make these directories navigable. If you right-click and ‘get info’ you’ll see the file is still a “package” and if you ‘ls’ using the command line you’ll see the extended “@” attribute. To remedy this:

cd ~/Documents/"EyeTV Archive"
xattr -c *

Use A Better Finder Rename to rename mpg files with the parent folder name

This is a multi-part recipe which is built from the following steps in the app:

  1. Find files in the directory that have the .mpg extension
  2. Truncate entire filename (sans-extension) to 0 characters
  3. Add parent folder name to filename

Step 1:

Step 2:

Step 3:

Here is a preview of what will change. Our targeted script will ignore all non-mpg files. In my case, matching on 912 of 7,284 files.

Perl certainly isn’t quick, though!

Use command-line to move all mpg files to the desired folder

cd ~/Documents/"EyeTV Archive"
find . -name '*.mpg' -exec mv {} /Volumes/Files/Movies/Shows/ \;

Remove old EyeTV folder

cd ~/Documents
rm -rf "EyeTV Archive"

You should now have a nice, clean list of .mpg files in alphabetical order

Phew!

Leave a Comment