Feature Request: Unique Camera Identifier

Description

There are Modifiers for THREAD numbers, but I consider that threads are numbered not in the order they appear in motion.conf. Between restarts, you never can tell whether thread 1 really picks up cam 1 and so on.
Therefor it would be great to have a camera identifier in the thread confs which is unique and can be used as modifier in filenames.
This has been posted once by an unlucky guy which obviously never get back to his postings, therefor I repeat this request.

Follow up

Comments

The new %t conversion specifier numbers each thread in the order the thread options are found in motion.conf.

The thread may take more or less time to start up and report themselves alive depending on how fast the camera responds but the %t specifier is counting correctly.

The FeatureRequest2005x08x07x134844 was not very clear. He wrote "A new conversion specifier to indicate which camera has detected motion in a multi-cam setup would be useful for defining per camera behaviour/alert lists." and this still does not make sense to me.

The %t specifier does not really add any feature you could not do before. The only new is that you can specify an option such as

text_left CAMERA %t

in motion.conf without having to repeat it in each thread file.

When you boot a machine you may not always know which camera device gets which video device number. No options and conversion specifier inside Motion can solve that issue.

Video capture cards using bttv are predictable. They load in an order given by the PCI bus.

The Philips Web Cam (PWC) driver has a dev_hint option which is very useful for loading video devices in a controlled way. Example from my /etc/modprobe.conf

This ensures that my Logitechs and Philips camera load in a predictable order and always at device numbers higher then 8. My bttv based 8 input card then loads from video0 to video7 and since it is PCI bus based this order is predictable too. So I always get my cameras in the right sequence after a boot.

And my new %t specifier works great with my 9 cameras and always shows the same number on the same camera given by the order of the thread options in motion.conf.