![]() |
fellow geeks (esp. linux users) - i need help
OK, so we've been building a new building here at work, and I wanted to do a stop motion movie of it. I've done it before, looks way cool, oohs and aaahs at the opening ceremonies.
This time I forgot to not take pictures at night, so approximately half my movie is boring nothingness. :( So now I've got not quite 100,000 jpegs, each taken 5 minutes apart, and with sequential file names (2000000001.jpeg, 2000000002.jpeg, etc) I need to get rid of the boring night stuff. I've tried making my movie and using a NLE (premier on a winxp box) to remove the night stuff, but my skills are weak in that area, and it took forever to just do a few days worth of it, and it would take me weeks to finish it that way. I'm thinking I'd need to loop thru all the files and check the creation date and then get rid of whatever happened from 7pm to 6am, then re-loop thru them again and rename them so I'm back to consecutive file names (berkeley's mjpeg encoder doesn't like to skip anything in a sequence of names). Any creative ideas on this? |
Perl, baby! Regex that shizz!
|
Yeah, I'll need to use some regexes (maybe)... I can get a long listing of the files that will include the date/time they were taken. Some fancy work with grep and cut could give me the names of the files I want to keep, or vice versa and give me the names of what I want to delete. I'm just trying to figure out the best/easiest way, since if I make a copy of the images it changes the ctime/mtime/atime to now, so I've basically only got one shot ...
|
Use perl readdir structure to loop thru the files, for each file grab the fstat (File::stat) structure to get the timestamp, then copy the new file using a new index counter.
hacked-out psuedocode off the top of my head Code:
use File::copy; |
All times are GMT -8. The time now is 02:48 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Copyright 2025 Pelican Parts, LLC - Posts may be archived for display on the Pelican Parts Website