File saving

Questions? Suggestions? Need help? Talk about anything related to Yawcam...
Post Reply
Whitey
Posts: 10
Joined: Mon Mar 07, 2011 4:57 pm

File saving

Post by Whitey »

Hello just started using your software not to long ago so far so good. For some reason even though I have it take a snapshot ever second it does it every 6 so not sure what is lagging if it's the camera or laptop or software. Anyways my question is, is it possible to have it save files to separate folders for each day automatically? Would make going through pictures easier. I had to go through a bunch the other day as I had the camera catch someone stealing my car. Also if someone is good at maybe image enhancing that would be great too. Thx's for any help.
Whitey
Posts: 10
Joined: Mon Mar 07, 2011 4:57 pm

Post by Whitey »

Not sure if anyone can help still waiting on some help with this one if it's possible.
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

I'd say there might be a problem saving the pictures which would explain why you would only get one every 6 seconds, or maybe the filenames turn out to be the same so the file is just overwritten?
Whitey
Posts: 10
Joined: Mon Mar 07, 2011 4:57 pm

Post by Whitey »

z3r0c00l12 wrote:I'd say there might be a problem saving the pictures which would explain why you would only get one every 6 seconds, or maybe the filenames turn out to be the same so the file is just overwritten?
It's not overwritten I have thousands of files, just seems even if I set it to take a snapshot ever second I only get it every 6 seconds. My main question though was is it possible to have it set up to save to a new folder for each new day automatic? That way I don't have to go through thousands and thousands of pictures all in the same folder if it's on a certain day?
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

the way I do it is i make it save using the various variables, I dont remember which ones exactly, but I can tell you my files are saved similar to:
2011-03-13_01.43.27_826.jpg

I use scripts I made myself in a language called AutoIt3 which sorts them out by day, which is pretty simple to do with this language.

If you need help making such a script, let me know and include as many details as possible, ex. Sort by day, Location of the files, where to sort them.

Like Yawcam folder : C:\Yawcam\File\
Folder where to sort them : C:\Yawcam\Sorted\2011\03\13\01.43.27_826.jpg
Also, the name of the files you use.
Henrryronald
Posts: 1
Joined: Wed Mar 16, 2011 7:45 am

Post by Henrryronald »

Thank you for your post.It is useful to all visitors. :lol:
Whitey
Posts: 10
Joined: Mon Mar 07, 2011 4:57 pm

Post by Whitey »

Sorry for the long delay been busy with life and work :) Anyways I would still like a little help on actually sorting these if at all possible. Right now I just have them all going into one main folder which is located at E:\Video so no days are split up or nothing. I would like to keep that as the main folder and if at all possible have it make a new folder in that for each day and ofc have all the usual stuff on the images such as time, date and blah blah. Thx's for any help appreciate it.
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

For the script to work, you'll need to make sure you use this as your file saving variable in Yawcam. You can use either one of these:

E:\Video\{date}_{tstamp}_{tstampMS}.jpg
E:\Video\{date}_{tstamp}.jpg

If You install AutoIt3 v3.3.6.1 and compile this script, it should sort your files on a daily basis at the end of the day. The code is commented so you can test out different things with it.

Code: Select all

#Include <File.au3>

Global $Yesterday = ""
Global $CurrentDay = @YEAR & "-" & @MON & "-" & @MDAY
Global $Folder = "E:\Video\" 
;{date}_{tstamp}_{tstampMS}.jpg = 2011-03-16_19.31.50_796.jpg

While 1 ;Always Loop
	_Sort()
	Sleep(60 * 1000) ;Wait 60 seconds before looping
Wend

Func _Sort()
	Local $FileArray = "", $Move = 0 ;Declaring variables
	If $CurrentDay <> @YEAR & "-" & @MON & "-" & @MDAY Then ;If It's a new day
		$Yesterday = $CurrentDay ;Yesterday's date
		$CurrentDay = @YEAR & "-" & @MON & "-" & @MDAY ;Today's date
		DirCreate($Folder & $Yesterday) ;Create folder for Yesterday
		$FileArray = _FileListToArray($Folder, $Yesterday & "*.jpg", 1) ;Find all files in E:\Video that are Yesterday and .jpg
		If IsArray($FileArray) AND $FileArray[0] > 0 Then ;Checking if there was an error producing the Array
			For $x = 1 To $FileArray[0] ;Loop through the list of files for Yesterday
				$Move = FileMove($Folder & $FileArray[$x], $Folder & $Yesterday & "\", 9) ;Move the file to Yesterday's folder
				If $Move = 0 Then MsgBox(0x10,"Yawcam File Move","Unable to move file " & $FileArray[$x])
				;If there's an error, it will popup a Msgbox and wait until someone closes it
			Next
		EndIf
	EndIf
EndFunc
memoric
Posts: 184
Joined: Wed Feb 23, 2011 1:37 pm

Post by memoric »

z3r0c00l12 is like me, he likes the "hard" way! ;)
There is a simpler way though to achieve daily & even hourly categorization.
In the settings, where you define the path for the images to be saved, enter:
X:\SomeFolder\{dateD}{dateM}{dateY}\{tstampH}\File_{dateD}{dateM}{dateY}_{tstampH}{tstampM}{tstampS}.jpg
X=the drive you want them to be saved,
SomeFolder=Some subfolder (obviously :P),
the rest is the format I like, you can "play" with it & adjust it the way you like.
E.g. you can use:
{month} {dayShort} {dateD} {dateY}\{tstampH}-{tstampM}-{tstampS}.jpg
which outputs a folder named "April Sat 23 2011" & files named "14-56-42.jpg".
(You can't use semicolons, e.g. {tstampH}:{tstampM}:{tstampS}.jpg)
Press the "info" button under the path to see the available formats.
Btw, the 1st setting I mention outputs a folder named "23042011" (the date), inside that
a folder named "15" (the hour) & inside that files named "File_23042011_150340.jpg"
(date & hour).
Well, I hope all that made sense! :D
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

Memoric, Which version of Yawcam are you running? and What output? (File Output or Motion Detection File Output?)

I haven't seen Yawcam being able to create subfolders before, it is although a suggestion that is being worked on so if it's already implemented I'd like to know.
Whitey
Posts: 10
Joined: Mon Mar 07, 2011 4:57 pm

Post by Whitey »

Thank you very much got it all going and working :)
memoric
Posts: 184
Joined: Wed Feb 23, 2011 1:37 pm

Post by memoric »

I still use the previous version (0.3.5), didn't have time to set up the new
one.
The settings I mentioned in the previous post work fine for both File Output
& Motion Detection. & I've tested them in Win XP & 7 (& in Vista some time
ago, but I'm not sure if it was the same yawcam version).
I haven't seen the subfolders' creation mentioned before either, but I really
needed that daily/hourly categorization too, & it just crossed my mind. I tried
it & it worked!
8)
Post Reply