Joining Clips from Cameras & Recorders

14 Aug 2018
Submitted by jan

Some cameras and external recorders use older versions of filesystems which have file size limitations that are a bit out of data for todays content. To work around that, they split a clip into what is sometimes a huge number of subclips. One that I regularly use is the Odyssey 7Q+ in combination with the Sony FS7 camera in 4K mode. At that resolution it can only store 40s of footage per file before it has to create a new subclip.

The app that comes from Convergent Design has the ability to re-join these clips into a single file during copy. But today's workflows often rely on other data copy apps like ShotPut Pro, Hedge, and others that make exactl replicate of the camera cards and create transfer logs and checksums.

Importing these subclips into the NLE is cumbersome unless the NLE recognizes subclips and virtually joins them. Resolve is not one of them. It has the ability to manually create a compound clip, but then the source timecode is lost, which creates a new set of problems.

For a while I had been using EditReady to join files among other meta data operations. But the latest version has a small race condition that can kill the software if it's run in pass-through mode.

When dealing with another 1.5TB of footage from yesterday's shoot I was determined to find a more efficient solution and so I figured the right settings for ffmpeg out. ffmpeg is quite fast because it also supports the options of passthrough (i.e. not re-encoding the video, but just rewrapping it in a new container). 

The result is the following short python script. It's run in the folder where the clip exists, creates a subclip list and then runs ffmpeg to create a new joined clip at the path indicated by the first argument. On my older MacPro it runs at about 3x speed, or about 300MB/s which is decent enough.

Not a super polished script, still has hardcoded paths and doesn't check commandline argument errors. But you get the gist :-)


import os
import glob
import sys

print "Joining clips in current folder"

filelist = open("files.txt","w")
clips = list(glob.glob(os.path.join('.','*.mov')))
for clip in clips:
  filelist.write("file '%s'\n" % os.path.basename(clip))

cmd = "/Users/janklier/Desktop/AllKlier\ Data/Tools/ffmpeg -f concat -i files.txt -c copy " + sys.argv[1]