I'm doing a time lapse video using an IPCAM. I take photos every 15/20secs from dusk to dawn. Each folder is labelled with a date each and every day etc etc.
I make a timelapse video using all the files for each day using lots of files, currently 3750.
I also would like to make 3 separate time lapse videos using a set number of images.
equations are
(total files) / (25 fps) / (3 seconds long) = how many files to skip
example
3750 / 25 / 3 = 50 files to skip
So i'm using this code at the moment
mkdir "3"
@echo off
set Counter=0
for %%f in (*.jpg) do call :p "%%f"
goto :p
:p
set /a Counter+=1
set /a X=Counter %% "50"
if %X%==0 copy %1 "3"
goto :eof
This creates the directory "3" and copies every 50th file to the folder. Then i can make the timelapse video using the files in folder.
I then have to do edit the batch file for 10 seconds and also for 30 images and run then each separately.
how can i add all the lines into one batch file so i only have to edit one file each time ?
mkdir "10"
@echo off
set Counter=0
for %%f in (*.jpg) do call :p "%%f"
goto :p
:p
set /a Counter+=1
set /a X=Counter %% "15"
if %X%==0 copy %1 "10"
goto :eof
&
mkdir "30"
@echo off
set Counter=0
for %%f in (*.jpg) do call :p "%%f"
goto :p
:p
set /a Counter+=1
set /a X=Counter %% "125"
if %X%==0 copy %1 "30"
goto :eof
Hope thats makes some sort of sense.