How to merge all 1min files into one video

This simple guide is for windows users but should work as easily under linux or mac.

Put all your files and daily folders in /record/ into a folder, example /wizemerge/

Press start key and type “cmd” to open command line.

Go to that folder by typing “cd folder” until you’re into it.

for me that was;
cd desktop
cd wyzemerge

type
dir /s/b *.mp4 > list.txt

This will print a list of all mp4 files in all subdirectory into a file called list.txt

Open that file and make it compatible with FFMPEG by turning

C:\Users\T3\Desktop\wyzemerge\Videos\20230301\00\06.mp4
C:\Users\T3\Desktop\wyzemerge\Videos\20230301\00\07.mp4

into

file ‘C:\Users\T3\Desktop\wyzemerge\Videos\20230301\09\47.mp4’
file ‘C:\Users\T3\Desktop\wyzemerge\Videos\20230301\09\48.mp4’

Open a text editor and use replace tool, CTRL-H

Replace
C:
by
file 'C:

Replace
.mp4
by
.mp4’

Now download a copy of FFMPED and put it into that same folder.

choose ffmpeg-master-latest-win64-gpl.zip

then type the command
ffmpeg.exe -safe 0 -f concat -i list.txt -c copy all.mkv

to create a single video called all.mkv

It should be very fast as there are no re-encoding.

8 Likes

Very nice!

2 Likes

This is fantastic! Thanks for the step by step. This post earns a bookmark!

2 Likes

Not seeing where this is sorted into proper name or date order?

Awesome post

1 Like

Yeah, That was my surprise too, Didn’t expect they’d all be in order.

It’s sorted by folder and given the largest unit is in front, it stay chronological.

Year, Month, Day / Hours / Minutes

Well that’s good to hear but it’s not something I’d count on, especially as the drive gets rewritten. All you’d need to tweak is a sort parameter in your command, e.g., /od or /on.

1 Like