Index: conf.c
===================================================================
--- conf.c	(revision 351)
+++ conf.c	(working copy)
@@ -140,6 +140,8 @@
 	text_left:             NULL,
 	text_right:            DEF_TIMESTAMP,
 	text_event:            DEF_EVENTSTAMP,
+	text_cameraname:       "Camera 1",
+	text_user:             NULL,
 	text_double:           0,
 	despeckle_filter:      NULL,
 	area_detect:           NULL,
@@ -729,6 +731,8 @@
 	"# %i and %J = width and height of motion area,\n"
 	"# %K and %L = X and Y coordinates of motion center\n"
 	"# %C = value defined by text_event - do not use with text_event!\n"
+	"# %e = value defined by text_cameraname\n"
+	"# %g = value defined by text_user\n"
 	"# You can put quotation marks around the text to allow\n"
 	"# leading spaces\n"
 	"############################################################\n\n"
@@ -771,6 +775,26 @@
 	print_bool
 	},
 	{
+	"text_cameraname",
+        "# This option defines the value of the special event conversion specifier %e\n"
+        "# Default: Camera 1\n"
+        "# The idea is that %e can be used as part of the filename to identify a camera\n",
+	0,
+	CONF_OFFSET(text_cameraname),
+	copy_string,
+	print_string
+	},
+	{
+	"text_user",
+        "# This option defines the value of the special event conversion specifier %g\n"
+        "# Default: ''"
+        "# The idea is that %g can be set to anything the user wants and used elsewhere\n",
+	0,
+	CONF_OFFSET(text_user),
+	copy_string,
+	print_string
+	},
+	{
 	"text_event",
 	"# This option defines the value of the special event conversion specifier %C\n"
 	"# You can use any conversion specifier in this option except %C. Date and time\n"
@@ -804,6 +828,8 @@
 	"# %i and %J = width and height of motion area,\n"
 	"# %K and %L = X and Y coordinates of motion center\n"
 	"# %C = value defined by text_event\n"
+	"# %e = value defined by text_cameraname\n"
+	"# %g = value defined by text_user\n"
 	"# Quotation marks round string are allowed.\n"
 	"############################################################\n\n"
 	"# Target base directory for pictures and films\n"
@@ -1084,6 +1110,8 @@
 	"# %i and %J = width and height of motion area,\n"
 	"# %K and %L = X and Y coordinates of motion center\n"
 	"# %C = value defined by text_event\n"
+	"# %e = value defined by text_cameraname\n"
+	"# %g = value defined by text_user\n"
 	"# %f = filename with full path\n"
 	"# %n = number indicating filetype\n"
 	"# Both %f and %n are only defined for on_picture_save,\n"
Index: conf.h
===================================================================
--- conf.h	(revision 351)
+++ conf.h	(working copy)
@@ -113,6 +113,8 @@
 	const char *text_left;
 	const char *text_right;
 	const char *text_event;
+	const char *text_cameraname;
+	const char *text_user;
 	int text_double;
 	const char *despeckle_filter;
 	const char *area_detect;
Index: motion.1
===================================================================
--- motion.1	(revision 351)
+++ motion.1	(working copy)
@@ -440,6 +440,16 @@
 .br
 This option defines the value of the speciel event conversion specifier %C. You can use any conversion specifier in this option except %C. Date and time values are from the timestamp of the first image in the current event.
 .TP
+.B text_cameraname string
+Values: Max 4095 characters / Default: Camera 1
+.br
+This option defines the value of the speciel event conversion specifier %e. This is used to specify a name for the camera.
+.TP
+.B text_user string
+Values: Max 4095 characters / Default: Not defined
+.br
+This option defines the value of the speciel event conversion specifier %g. This is used to specify a user defined value.
+.TP
 .B text_left string
 Values: Max 4095 characters / Default: Not defined
 .br
@@ -681,6 +691,12 @@
 .B %C
 Text defined by the text_event feature
 .TP
+.B %e
+Text defined by the text_cameraname feature
+.TP
+.B %g
+Text defined by the text_user feature
+.TP
 .B %d
 The day of the month as a decimal number (range 01 to 31).
 .TP
Index: motion.c
===================================================================
--- motion.c	(revision 351)
+++ motion.c	(working copy)
@@ -2668,10 +2668,23 @@
 				case 'Q': // number of labels
 					sprintf(tempstr, "%d", cnt->current_image->total_labels);
 					break;
+
 				case 't': // thread number
 					sprintf(tempstr, "%d",(int)(unsigned long)
 							pthread_getspecific(tls_key_threadnr));
 					break;
+				case 'e': // text_cameraname
+					if (cnt->conf.text_cameraname && cnt->conf.text_cameraname[0])
+						snprintf(tempstr, PATH_MAX, "%s", cnt->conf.text_cameraname);
+					else
+						++pos_userformat;
+					break;
+				case 'g': // text_user
+					if (cnt->conf.text_user && cnt->conf.text_user[0])
+						snprintf(tempstr, PATH_MAX, "%s", cnt->conf.text_user);
+					else
+						++pos_userformat;
+					break;
 				case 'C': // text_event
 					if (cnt->text_event_string && cnt->text_event_string[0])
 						snprintf(tempstr, PATH_MAX, "%s", cnt->text_event_string);
Index: motion-dist.conf.in
===================================================================
--- motion-dist.conf.in	(revision 351)
+++ motion-dist.conf.in	(working copy)
@@ -301,6 +301,8 @@
 # %i and %J = width and height of motion area,
 # %K and %L = X and Y coordinates of motion center
 # %C = value defined by text_event - do not use with text_event!
+# %e = value defined by text_cameraname
+# %g = value defined by text_user
 # You can put quotation marks around the text to allow
 # leading spaces
 ############################################################
@@ -333,6 +335,20 @@
 # a unique identifier for each event.
 text_event %Y%m%d%H%M%S
 
+# This option defines the value of the special event conversion specifier %e
+# You can use any conversion specifier in this option except %e. 
+# Default: Camera %t
+# The idea is that %e can be used filenames and text_left/right for creating
+# a unique identifier for each camera.
+text_cameraname Camera %t
+
+# This option defines the value of the special event conversion specifier %g
+# You can use any conversion specifier in this option except %g. 
+# The idea is that %g can be used as a blank variable for the user to
+# use for whatever they like. e.g. specifying an audio device for
+# on_movie_start.
+; text_user value 
+
 # Draw characters at twice normal size on images. (default: off)
 text_double off
 
Index: thread1.conf.in
===================================================================
--- thread1.conf.in	(revision 351)
+++ thread1.conf.in	(working copy)
@@ -16,10 +16,17 @@
 # Should normally be set to 1 for video/TV cards, and 8 for USB cameras 
 input 8
 
+# This option defines the value of the special event conversion specifier %e
+# You can use any conversion specifier in this option except %e.
+# Default: Camera %t
+# The idea is that %e can be used filenames and text_left/right for creating
+# a unique identifier for each camera.
+text_cameraname Camera %t
+
 # Draw a user defined text on the images using same options as C function strftime(3)
 # Default: Not defined = no text
 # Text is placed in lower left corner
-text_left CAMERA 1
+text_left %e
 
 
 ############################################################
Index: thread2.conf.in
===================================================================
--- thread2.conf.in	(revision 351)
+++ thread2.conf.in	(working copy)
@@ -16,10 +16,17 @@
 # Should normally be set to 1 for video/TV cards, and 8 for USB cameras 
 input 1
 
+# This option defines the value of the special event conversion specifier %e
+# You can use any conversion specifier in this option except %e.
+# Default: Camera %t
+# The idea is that %e can be used filenames and text_left/right for creating
+# a unique identifier for each camera.
+text_cameraname Camera %t
+
 # Draw a user defined text on the images using same options as C function strftime(3)
 # Default: Not defined = no text
 # Text is placed in lower left corner
-text_left CAMERA 2
+text_left %e
 
 
 ############################################################
Index: thread3.conf.in
===================================================================
--- thread3.conf.in	(revision 351)
+++ thread3.conf.in	(working copy)
@@ -16,10 +16,17 @@
 # Should normally be set to 1 for video/TV cards, and 8 for USB cameras 
 input 8
 
+# This option defines the value of the special event conversion specifier %e
+# You can use any conversion specifier in this option except %e.
+# Default: Camera %t
+# The idea is that %e can be used filenames and text_left/right for creating
+# a unique identifier for each camera.
+text_cameraname Camera %t
+
 # Draw a user defined text on the images using same options as C function strftime(3)
 # Default: Not defined = no text
 # Text is placed in lower left corner
-text_left CAMERA 3
+text_left %e
 
 
 ############################################################
Index: thread4.conf.in
===================================================================
--- thread4.conf.in	(revision 351)
+++ thread4.conf.in	(working copy)
@@ -23,10 +23,17 @@
 # Should normally be set to 1 for video/TV cards, and 8 for USB cameras 
 input 1
 
+# This option defines the value of the special event conversion specifier %e
+# You can use any conversion specifier in this option except %e.
+# Default: Camera %t
+# The idea is that %e can be used filenames and text_left/right for creating
+# a unique identifier for each camera.
+text_cameraname Camera %t
+
 # Draw a user defined text on the images using same options as C function strftime(3)
 # Default: Not defined = no text
 # Text is placed in lower left corner
-text_left CAMERA 4
+text_left %e
 
 
 ############################################################
