Timestamp Label Format

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Timestamp Label Format

Post by robi »

Hi!

Regarding the timestamp, some questions:

1. Can the date format in the Timestamp Label, changed in a way so that it displays the long date? Like 2007-march-27 instead of 07/03/27.

2. Can the timestamp background made translucent? The text color changed?

3. How about increasing the image height (canvas) with the height of the timestamp and saved like that? Because the picture information behind the timestamp is lost now. And then, eventually resize the image back to the same resolution. A little wide-screen effect would appear, but that wouldn't matter, the contents of the full image would perhaps be more important than the exact aspect ratio.
User avatar
ammaross
Posts: 61
Joined: Mon Mar 12, 2007 8:34 pm
Location: Utah, USA

Post by ammaross »

The timestamp label format follows the *nix 'date' format (see man date). Default is: %%s - %y/%m/%d %H:%M:%S
For a format of 2007-march-27, (with the time of date the same), use:
%%s - %Y-%B-%d %H:%M:%S

Check out the man page if you want to mess with it further, check under subsection FORMAT.

As for transparency and text color, I see no controls for alpha blending nor text color changing, but maybe if you send ZM a box of cookies, he'll add it for you. :wink:

Might be a useful feature to squish the image a bit to fit a timestamp above (or below) the image, to prevent blocking out part of the video. For now, you could play with the timestamp label x/y values to at least move the timestamp to a place in your video that has no importance (like high on a wall or something).
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

Thanks!

Tip/Suggestion: Perhaps filling the time/date/capture info in the jpeg's EXIF tag, would also be a good tip. Also filling the generated mpeg, avi video's tags with the same info. As most image viewers and video players can display this info, either superimposed on the picture or in an additional panel.

This way the user can opt for each image to have or not the info displayed, after capture.
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

ammaross wrote:The timestamp label format follows the *nix 'date' format (see man date). Default is: %%s - %y/%m/%d %H:%M:%S
For a format of 2007-march-27, (with the time of date the same), use:
%%s - %Y-%B-%d %H:%M:%S

Check out the man page if you want to mess with it further, check under subsection FORMAT.
Man says "No manual entry for date". Found it in google anyway.

Question: is it safe to change the system's locale, to have eg. hungarian month names? Would this affect ZM's functionality?
User avatar
ammaross
Posts: 61
Joined: Mon Mar 12, 2007 8:34 pm
Location: Utah, USA

Post by ammaross »

Question: is it safe to change the system's locale, to have eg. hungarian month names? Would this affect ZM's functionality?
It should not affect ZM, since it just asks the system for the date string, rather than trying to formulate its own.
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

ammaross wrote:
Question: is it safe to change the system's locale, to have eg. hungarian month names? Would this affect ZM's functionality?
It should not affect ZM, since it just asks the system for the date string, rather than trying to formulate its own.
Well, that's the problem. If the system returns the date in some sort that ZM doesn't understand, database entries may get messed up...
User avatar
ammaross
Posts: 61
Joined: Mon Mar 12, 2007 8:34 pm
Location: Utah, USA

Post by ammaross »

robi wrote:Well, that's the problem. If the system returns the date in some sort that ZM doesn't understand, database entries may get messed up...
I guess the best way would be to try with a test system. MySQL should be using the same date interpreting call as PHP (and thus ZM) so both should change over when you switch locales, but I've been wrong before. :P
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

In the next version of ZM you can control the colours of the timestamp and it's background, including making it transparent. There are also additional fields you can use including more precise timings. Adding the timings to the jpeg headers is a good idea. If I can figure out how to do it :lol:
Phil
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

zoneminder wrote:Adding the timings to the jpeg headers is a good idea. If I can figure out how to do it :lol:
http://owl.phy.queensu.ca/~phil/exiftool/ 8)
Locked