Some notes on file prefix and extension treatment - General Discussion and Assistance - CHDK Forum supplierdeeply

Some notes on file prefix and extension treatment

  • 0 Replies
  • 7758 Views
*

Offline reyalp

  • ******
  • 14121
Some notes on file prefix and extension treatment
« on: 30 / July / 2008, 20:43:35 »
Advertisements
The stuff I've been doing with raw subtract and capturing multiple raw files in an exposure leads to the question of how to name and organize all the files related to that exposure.

Currently, CHDK lets you name your raw files with any combination of the standard prefixes
IMG_, CRW_, SND_ and extensions .JPG, .CRW, .CR2, THM, WAV

I've found some discussion of the reason for this in other threads, but I haven't seen a description of what the cameras do with various combinations. Much of this is probably already known, but since I spent an inordinate amount of time testing this, I'm posting my notes in hopes of saving someone else the trouble.

The reason for using the standard prefix/suffix, as I understand it are:
- To make the files visible when you connect the camera via USB
- To allow automatic deletion of related files when you delete a JPG using the canon ui
If there are others, I'd like to hear them.

My camera (a540) behaves as follows:
- In general, if a known prefix is used with the same number and more than one known extension, it causes problems with the USB listing. Either the file is shown twice, or not shown at all. It also appears to cause erratic behavior on the camera in some cases (images not being displayed for example)
- Files with unrecognized extensions aren't shown on the USB listing. Certain known extensions (such as MRK and THM) are also hidden.
- There are some cases in both deleting and USB download where files created outside of the canon firmware aren't noticed without a restart. If you delete a .JPG with the file browser, and then go to the canon browser, it shows a nice question mark icon and "unidentified image".
- For deleting, the camera seems to remove anything with a recognized prefix and matching number, regardless of the extension. Even .CR2 files are removed. Unrecognized prefixes are NOT deleted.
- There are some additional prefixes mentioned in the same area of the firmware:
ST[A-Z]_XXXX.JPG is for stitch assist
MVI_XXXX.AVI is used for video.
MRK_  The .MRK  extension seems to be associated with slide shows. Does not appear on USB. MRK_ prefix with other extensions appears to be usable.
SDR_ AUT_ and ETC_  are unknown to me but they appear to be treated like other recognized prefixes.

Folders:
- The misc folder is shown, but I have yet to see anything show up there. From the ROM, it appears to be associated with .MRK files
- If you have more than one CANONXXX folder, all the images are shown together. I haven't tesed putting images with the same name in each.
- subfolders of CANONXXX folders and other folders at the same level are ignored.

Suggestions:
- CRW_ is safe.
- IMG_ should be avoided, since you always get a .JPG with this prefix. Until some finds a way to disable JPG capture.
- ST[A-Z] should be avoided if you have stitch assist and plan to use it.
- MVI_ should be safe to use for still related files, since AVIs share same counter, and so won't end up with a conflicting number and extension.
- SND_ should be avoided if you use the annotation feature, otherwise should be OK
- AUT_ ETC_ MRK_ SDR_ appear to be usable. However, those whose function isn't known might cause unexpected side effects. The risk of this should be limited if you use an extension the camera doesn't use them with.
- The UI should prevent conflicting combinations by default, with an option to override.
- Allowing use of some non-standard prefixes may be worthwhile, for people who specifically want to avoid the auto-delete behavior. These still work over USB if they have a recognized extension.
- Any of the recognized extensions can be used, but it's best to avoid using ones that would be interpreted by the camera for that prefix (e.g. SND_*.WAV for a raw file). Since using more than one extension with the same prefix can cause problem, I see little reason to use anything but .CRW for raw files.
- Unrecognized extensions can be used for files you will never want to transfer over USB.
- Recognized but hidden extensions could also be used, but have more risk of side effects.

Fixing the issue where the canon firmware doesn't recognize some things without a reboot would be nice.

Note:
All my testing of the USB stuff was with the standard XP camera crud.


edit:
relevant standard: Design rule for Camera File system - Wikipedia, the free encyclopedia thanks to dataghost
« Last Edit: 06 / August / 2008, 17:40:36 by reyalp »
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal