What software to glue and compress a long video file?

There are 26 files mkv at 700Mb is the result of the export of the recorded segment for video surveillance system. Need these files to stick together in the right order and then glued the file to compress as much as possible without quality loss in format avi, mp4 does not matter. At the same time, you want to load the CPU in full, to use all the resources to do the work, and not to see one core loaded task, and the rest idle. The solution is sought free or opensource, OS - Windows. The first thing that comes to mind is ffmpeg, but how, with what keys to use for my task?
March 20th 20 at 11:27
2 answers
March 20th 20 at 11:29
Virtualdub
March 20th 20 at 11:31
https://trac.ffmpeg.org/wiki/Concatenate
mylist.txt
# this is a comment
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

ffmpeg -f concat -safe 0 -i mylist.txt -c copy output


https://trac.ffmpeg.org/wiki/Encode/H.264

ffmpeg -i input_from_concat -c:v libx264 -preset slow-crf 22-c:a copy output.mkv


ffmpeg always tries to gobble up all the cores and take care of free disk space
In addition, if there is no time and no urgency, offer a substitute for libx264 libx265. CRF, in turn, can be raised to 25. -c:a from sin to put-c:a aac-b:a 128k, and you never know what's up with the sound... - Henderson_Met commented on March 20th 20 at 11:34
@tressa.Hauck, x265 - if the hardware supports decoding on a hardware level

All settings should portunity under him or leave the default

I personally prefer aac, and vorbis, but as I understand it, sound there may not be - buddy79 commented on March 20th 20 at 11:37
@Jack_Daugherty,
x265 - if the hardware supports decoding on a hardware level
I think that for the purposes of the archive is not necessarily the person you need to minimize file size and he doesn't mind the time. In this case, when the archive will need it in a pinch to unclench in something simple for a few (tens of) minutes, if hardware playback is not supported, or to find a phone\laptop\etc with support for H265. But the place should Economics.
I personally prefer aac, and vorbis, but as I understand it, sweca there may not be
Yes, the sound may not be, I hadn't thought of that. But like vorbis does not fit in one container H265, or am I wrong? - Henderson_Met commented on March 20th 20 at 11:40
@Jack_Daugherty, @tressa.Hauck, no sound, only video. - carlie commented on March 20th 20 at 11:43
@Karli_Swi, then instead of-c:a copy of the message @Jack_Daugherty use -an
Try x265 if the speed arrange, then use it, and if not, then move on to x264. - Henderson_Met commented on March 20th 20 at 11:46
@tressa.Hauck,
Yes, the sound may not be, I hadn't thought of that. But like vorbis does not fit in one container H265, or am I wrong?
vorbis + any video codec = mkv - buddy79 commented on March 20th 20 at 11:49
@Jack_Daugherty, Yes, exactly, this mp4 doesn't accept vorbis. - Henderson_Met commented on March 20th 20 at 11:52

Find more questions by tags VideoFFmpegVideo surveillanceMKV