Sony Mavica File-Naming Complaint/Work-Around

| | Comments (0)

I've had a Sony Mavica MVC-CD300 digital camera for several years now. I love the camera in general. I've taken just over 10,000 photos with the camera in the last four and a half years (many are online.) It's like a good old friend at this point.

It's a 3.3 mega pixel camera, Carl Zeiss lens with 3x optical zoom, writes to 8cm mini-CD/RW discs, a nice all-around camera.

Recently my old friend pulled a new trick on me.

Sony chose to name the photo files on the CD in the form DSC#####.JPG on the discs. My very first picture was DSC00001.JPG and my 9999th picture was DSC09999.JPG. I expected the picture after that would be DSC10000.JPG (since there are 5 digits available.) No, it rolled over and started at DSC00001.JPG again. Since I use the original filenames of my pictures when filing them, this causes a bit of a problem now as I'm potentially trying to store multiple files with the same filenames into my photo repository. Not a very nice implementation, Sony. You've got five digits, why not use them?

As part of my work flow, I load my photos into a 'working' directory and change their owner and permissions (this is in Linux) so they are owned by me and are 'a-w' (actually 0544) on their permissions. This makes it so the file will usually not be overwritten, or at least I'll see a warning message if I try to overwrite or delete the file. I've since added another step to my work flow, I run the following short bash/ksh script on all files in my 'working' directory now that I've passed the 10,000 mark:

for i in `ls -1 DSC0*.JPG`
do
   j=`echo $i | sed 's/SC0/SC1/g'`
   mv -i $i $j
done

It will rename any 'SC0' pattern to 'SC1', effectively renaming all my newer DSC0####.JPG files to DSC1####.JPG, as Sony should have done in the first place. I have listed the Unix 'mv' command with the '-i' interactive switch so you'll have to confirm each rename. Once you are comfortable with the script (try it on ONE file first) you can remove the '-i' script and it will rename all DSC0*.JPG files in the current directory. I'll still have to update my script once every 10,000 photos, but at four and a half years per update, I think I can manage.

Do all Sony Mavica cameras do this? Is this a function of the naming standard (DSC* seems to be vendor-independent)?

I'll post more on my workflow in a separate entry.

[Update: 7/27/2005]
The standard Sony uses for file naming is known as "Camera File System - CP-3461" (.PDF) (or DCF for short) The standards body that published this document is JEITA, the same folks publishing the EXIF standard - CP-3451(and -1) (.PDF). They are quite active in the realm of digital camera standards. Many big Japanese electronics manufacturers are members of JEITA.

DSC=Digital Still Camera
DCIM=Digital Camera Images

So, Sony decided to follow JEITA CP-3461 section 5.2.1 which splits the 8 characters available into 4 "Free" (vendor-assignable) characters and 4 "File numbering" characters. To paraphrase the standard, files are numbered 0001 to 9999, 0000 shall not be used. This effectively limits the consumer to 9,999 unique filenames (per directory.) The standard does have some wording in it about multiple directories, but that assumes the files will only exist in their original directory and will never cross paths with duplicately named files elsewhere. Sony doesn't seem to have implemented these variable directory names in their first- and second-generation Mavica CD cameras (CD1000, CD200, CD300.) So, the blame is off Sony and on JEITA.

JEITA: When facing a similar problem to the one computer network technicians face when addressing networks, why would you tie up half your address space (4 out of 8 character positions) with free text? Why not a minimally small, manufacturer-unique identification code (alpha-numeric), maybe one or two characters? That would at least allow a larger "address space" for the file numbering. Another approach would have been using an alpha-numeric code for the "File numbering" positions, greatly increasing the usable number of pictures before duplication of filenames.

If 5 numeric character places are used for "File numbering" the limit pushes to 99,999, 6 places yields 999,999 unique filenames, a much more reasonable figure. If alpha-numeric characters are used for file numbering (0-9, then A-Z, in order) even the 4-place scheme works better, yielding 1.67 million unique file names before repeating.

Do the Japanese engineers only think consumers will take less than 10,000 pictures with their cameras? Do they know something you don't? Mine (a Sony Mavica CD300 review, review, review) made it to 10,500 and is going strong.
[/Update]

Tags:
- - - - - - - - - -

Leave a comment


About this Entry

This page contains a single entry by speedeep published on July 19, 2005 12:00 AM.

You Can Win Unlimited Napster Downloads! was the previous entry in this blog.

Sunflowers (Gallery) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.