App to join all the recorded videos automatically from 1 folder

I misread the post, I thought this was a script to concatenate all videos from one day period, into 1 large MP4 file, in time order. But it’s to get a timelapse.

Is there anyone that can help with a script that can spit out 1 MP4 for the whole day just recursing through subfolders?

Thanks

This is what I use. It’s clunky but it does work. I copy the directory off the SD card to a storage folder and at the root of that folder I have ffmpeg.exe and these 4 bat files. I know there’s a more elegant way to do this but I just copy these files, paste them into each hour-folder and run the bat I need from within that folder.

There’s four versions. The first concat.bat creates a list of the mp4 files in the directory then concatenates them into a single video file. Occasionally there is a corrupt audio track on one of the files and the concatenate fails. It’s possible to go into each individual minute-file and repair the audio or replace the audio track with a null file. Once that’s done there is no need to create the file list again, so there is a version that just concatenates called just_concat.bat. And, Because my power is really spotty and power to my cams die a lot and corrupt my audio a lot, and I don’t really need the audio, I wrote up another two versions that just discard the audio.

Yes, I know this isn’t a slick app but the ffmpeg docs and videos are confusing and this is what I had when I was finally done trying to figure them out. I flat cut and pasted from tutorials wherever it would work, and added very little but it did take some tweaking to make it work. Copy these files and ffmpeg.exe into your hour-directory and run concat.bat or concat_no_sound.bat and it works.

Batchfile filenames are bolded, cut and paste the text that follows it.

concat.bat
:: Create File List
for %%i in (*.mp4) do echo file ‘%%i’>> mylist.txt

pause

:: Concatenate Files
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

pause

just_concat.bat
Echo Just Concatenating Files
pause

:: Concatenate Files
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

pause

concat_no_sound.bat
:: Create File List
for %%i in (*.mp4) do echo file ‘%%i’>> mylist.txt

pause

:: Concatenate Files
ffmpeg -f concat -safe 0 -i mylist.txt -c copy -an output.mp4

pause

just_concat_no_sound.bat
Echo Just Concatenating Files
pause

:: Concatenate Files
ffmpeg -f concat -safe 0 -i mylist.txt -c copy -an output.mp4

pause

After loading up RTSP FW, I’m now using BI to record what I need to record, to one or a handful of files, only clips with motion. Having it all on the SD card is great, but hugely cumbersome to create any kind concatenated file. Similar, the lack of being able to access the SD card remotely to pull off files, is impractical. Once I put on RTSP and implemented BI, I never looked back. This may not work for everyone, but it’s perfect for me.