Wednesday 28 November, 2018

Fixing Sony DSLR and other cameras repeating file names

Sony A7 and other cameras create MTS or MP4 clips called C001, C002, C003…. And these names repeat every time the card is formatted. So, in a long project one has multiple clips called C001, multiple clips called C002 and so on. And what makes it worse is that these clips also have repeating timecode.
If the project is finished on the editing system then this is less of a problem. But if the project has to be taken to another system for colour correction or effects work, then relinking the AAF or XML or EDL to the original files is a huge problem. 
One way around this, while shooting, is to not format the card in the camera. Instead, in the camera, delete all clips except the last one. The camera will now begin recording from the next number and not go back to C001. So, if the last clip on a card is C028, then you delete C001 to C027 in the camera and start shooting. The camera will automatically shoot clips from C029 onwards. And so on.
But if that’s always possible. In that case, the only way to prevent conflicts is to rename the original Sony files BEFORE beginning the edit. What I do is to highlight the MP4 clips, (on a Mac) right-click on them, and select ‘Rename … items’. 
The folder containing the clips often have other files. The best way to highlight only mp4 files in that folder (on a Mac) is to see the folder in list view, and then click on the 'Kind' column. So that MP4 files get grouped together. You can now highlight just the MP4 files.
Once you highlight the MP4 files in one folder, right-click them and select 'Rename 62 items...' (where 62 is the number of files you've highlighted)
Then in the window that opens, choose to add text before clip name as date. So you type in the box 20180224 - for clips shot on 24 Feb 2018 (for example).
Now your clips will look like this
20180224-C001.mp4 20180224-C002.mp4 20180224-C003.mp4 20180224-C004.mp4
Clips from the next day will be like this 20180225-C001.mp4 20180225-C002.mp4 20180225-C003.mp4 20180225-C004.mp4 And so on.
Date is set for year-month-day so that they all get sorted neatly by date. If you set it as date-month-year then it goes crazy when sorted.
For example, if you have clips shot on 24 Feb, 28 Mar, 16 Aug, 02 Oct, and you name them as date-month-year, as 24022018, 28032018, 16082018, 02102018, then, on the disk they will appear like this. 02102018 16082018 24022018 28032018 So the order will end up being Oct, Aug, Feb, Mar.
Which is why, you name them as year-month-day, so then your clips will get named 20180224 20180328 20180816 20181002
And in the finder they will appear in the right chronological order as.
20180224 20180328 20180816 20181002
Feb, Mar, Aug, Oct. 
If you have multiple cameras shooting simultaneously, then you will end up with multiple clips called 20180224-C001.mp4 20180224-C002.mp4 20180224-C003.mp4 all on the same day.
In this case, you can also add the camera letter or name. So you rename the clips in two steps.
First, rename C001, C002, C003 etc with the date prefixed and then highlight them and add a letter before the name. So, you will get clips called A-20180224-C001.mp4 A-20180224-C002.mp4 A-20180224-C003.mp4 A-20180224-C004.mp4
for all A camera clips, and B-20180224-C001.mp4 B-20180224-C002.mp4 B-20180224-C003.mp4 B-20180224-C004.mp4 for all B camera clips, and so on for the other cameras.
Further, if there are multiple cards on the same day, you may want to add card numbers to the camera letters. So, for all A camera clips on the 24 Feb 2018 from the first card, you rename them as A01-20180224-C001.mp4 A01-20180224-C002.mp4 A01-20180224-C003.mp4 A01-20180224-C004.mp4
And for all A camera clips on the 24 Feb 2018 from the second card, you rename them as
A02-20180224-C001.mp4 A02-20180224-C002.mp4 A02-20180224-C003.mp4 A02-20180224-C004.mp4 and so on.
The basic idea is to ensure that within a project no two clips have the same name. In this method, it does not matter if timecode is repeated, because whatever you do, every 24 hours of time, timecode is repeated anyway. A timecode repeat along with a file name repeat is disaster when an edit needs to be moved from one system to another.