GoPro_Filenames.

Bulk Rename Utility How-To's

GoPro_Filenames.

Postby Futterbly » Sun Mar 06, 2022 1:37 pm

Hi,

I've been casually using BRU for quite some time but now I'm facing an issue that requires a bit more expertise, if at all possible. But I believe it is.

I don't know who of you is familiar with the GoPro Action cameras. I recently became the owner of the Hero 8 Black. So this camera has many shooting modes, Time Lapse, Photo, Video... each Mode itself has many different settings. Resolution and Framerate being the most important ones for me.

A real downside of the GoPro is that each file, no matter what mode it was shot in, is named the same: GX012334, ascending.

My goal is as follows:

1. Create a subfolder for each mode. (photo, video, burst/timelapse)
2. Put the files in the corresponding subfolder
3. Rename the files so that they contain information about the settings the file was shot in.

I was able to extract the relevant information about Resolution and Framerate by using this in Add Prefix(7):
Code: Select all
<(System.Video.FrameRate)>-<(System.Video.FrameWidth)>x<(System.Video.FrameHeight)>--_

and this to add a date in a custom format:
Code: Select all
%d.%m.%Y_%Hh%M--


I also used Replace(3) to replace frames-second with fps

Now I went from this: GX0101326 to this 01.03.2022_15h19--239.76 fps-1920x1080--_GX010013.MP4
I created the subfolders manually and put the files in, but the whole procedure takes a lot of time and I believe it can be done quicker, I just don't know how exactly.
__

Ok so that's as far as my very limited knowledge can reach.
The question is, how possible is it to achieve the other steps in an automated manner?

I think it could be possible to use RegEx to replace for example 1920x1080 from the file-properties with the Letters FullHD, for example, that would be really handy.

So I guess what I'm asking here is if you think this is the right tool for the job?
Futterbly
 
Posts: 4
Joined: Sun Mar 06, 2022 1:22 pm

Re: GoPro_Filenames.

Postby Luuk » Mon Mar 07, 2022 4:21 am

The bru might conduct everything, but does require the paid version for javascript to conduct this folder-automation.
Otherwise, moving everything should be split up into different renames, like 1st moving video-extensions into "video".
Then using Add(7) with something like <($YourMetadata)Burst\> to move timelapsed-pictures into "***Burst" sub-folders.

Then you could remove *** from all of the "***Burst" folders, then move the other pictures into their "photo" sub-folders.
So if its me, without having the javascript, Im just use the exiftool.exe inside a batch, to conduct everything at once.
Luuk
 
Posts: 771
Joined: Fri Feb 21, 2020 10:58 pm

Re: GoPro_Filenames.

Postby Futterbly » Mon Mar 07, 2022 7:20 am

by exiftool.exe you mean another piece of software? I googled it and found thishttps://exiftool.org/ - I didn't know it.

So if I understand you correctly: Use exiftool.exe instead of BRU as exiftool can achieve all that what I want on its own?

I have to read into that as I don't know that tool at all.
Futterbly
 
Posts: 4
Joined: Sun Mar 06, 2022 1:22 pm

Re: GoPro_Filenames.

Postby Luuk » Mon Mar 07, 2022 2:52 pm

If you have the bru paid-version, then it can automate everything with using the Special(14) javascript.
Without the paid version, it needs several renames to conduct everything, so maybe something starting like...
Add(7) with.... <(System.Video.FrameWidth)Video\><(BurstMetadata)Burst\>

Without javascript to test the (metadata). the above Add(7) needs to have a unique (Metadata) for each sub-folder.
Any videos having (System.Video.FrameWidth) would get settled into sub-folders named something like 1920Video.
And any pictures having (BurstMetadata) would instead get settled into sub-folder names ending like ****Burst.

But then you would still have to rename these sub-folders, to remove their metadata-prefix, when its not to be desired.
With javascript, its easier because it can test (Metadata) and then decide "photo" for pictures without (BurstMetadata).
And also, the javascript does not need to put any of the metadata-prefix before the sub-folder names.

This an example of how the exiftool can rename and move videos, using the metadata in your examples...
Code: Select all
exiftool -m -r -ext mp4 -if "$filepath !~ /\/Video\/[^\/]+$$/i" -directory=Video -filename"<${CreateDate;DateFmt('%d.%m.%Y_%Hh%M')}--$VideoFrameRate fps-${ImageSize;s/$/--/;s/1920x1080/FullHD/;}$filename" "C:/Your/FolderPath"
This to conduct .mp4's not yet settled inside of 'video' folders, and it only converts 1920x1080==>FullHD, because Im not know the others?
It also does not convert GX0101326 ==> GX010013, because there is no explanations given for this conversion?
If to put any of this inside of a batch, must first remember to double all of the %==>%%.

You could also then just add 2-lines into the batch for moving images, but it depends on the $metadata used by your camera.
First you just find the $metadata (and maybe its value) that does say the image is part of a burst-mode series of images.
Then its very easy adding 2-lines to move images into 'photo' or 'burst', and also rename, if images should be renamed??
Luuk
 
Posts: 771
Joined: Fri Feb 21, 2020 10:58 pm

Re: GoPro_Filenames.

Postby Futterbly » Tue Mar 08, 2022 7:53 pm

Thanks! I don't understand half of that but I can use it as a basis for further research - this conversion is a typo on my end "GX0101326 ==> GX010013, because there is no explanations given for this conversion?" GX... is just the original filename that I wanted to preserve. Also the Burst Images are named "G0010068.JPG", ascending, and the regular camera images are named GOPR0... ascending, so that's fairly easy to distinguish. also I don't think I need to add any more information to that filename other than the date which is really easy.

The time lapse videos now get saved as an mp4 file with 30 fps, instead of a series of images like they used to.
There are many resolutions available, and it is important for me to see it at a glance (in the filename) because I can work in different sequences without always having to resize in Premiere Pro
5k
4K_4:3
4k
2.7k_4:3
2.7k
1440_4:3
1080

but the resolution in the metadata is not as easy to read, for example: 2704x1520 and the framerate is also not 60... I believe it's because it is in NTSC format which is 59.94 Hz...
Futterbly
 
Posts: 4
Joined: Sun Mar 06, 2022 1:22 pm

Re: GoPro_Filenames.

Postby Luuk » Wed Mar 09, 2022 6:46 am

You would need to give example new-names, because there is still much confusion about how everything should be renamed?
The example only renames .mp4s like the bolded-text inside of the first post, then moves them into a "video" sub-folder.
Except that it also converts 1920x1080==>FullHD, but Im still no ideas for anything else should also be converted?

Is "5k" something else to be found inside of the $metadata, that should also go into the video filenames?
Whatever it is that you want, both the javascript and exiftool should easily conduct the rename and moving.
Also, if burst-images are G0010068, and regular camera-images are GOPR0..., what are the GX0101326 images???

The first post does say...
A real downside of the GoPro is that each file, no matter what mode it was shot in, is named the same: GX012334, ascending.
So this does have me very confused, about which filenames are certainly to be the burst-mode images, and which ones are not?

For myself, I would prefer to depend on the $metadata telling which images is part of a burst-mode.
But if the filename format is always to be dependable, then this could be much faster anyways.
Luuk
 
Posts: 771
Joined: Fri Feb 21, 2020 10:58 pm

Re: GoPro_Filenames.

Postby Futterbly » Fri Mar 11, 2022 7:27 am

Ok, sorry for the confusion, I'll clear things up:

I don't need to convert the images, I only need to attach a date to them. The reason is because I import single photos to Lightroom. I can easily detect burst images by their filname.

For the renaming task, I only need to focus on the video. The video files are the ones with an X, these are the ones that need to be renamed based on framerate and dimension.
so whith the above code, for example I get this filename:
GX010327.MP4 ---> 10.03.2022_11h46--59.94 frames-second-3840x2160--_GX010327.MP4
Now the next step would be to, using regex or simple replace, convert "59.94 frames-second" to "60 fps" and "3840x2160" to "4K".

GX020415.MP4 10.03.2022_11h49--59.94 frames-second-2704x1520--_GX020415.MP4
this one would also be "60 fps" and "2.7K"

4000x3000 would be "4K 4by3" - because we cannot use the : character in a filename in Windows.

Then this is the desired directory-structure:
Image
Futterbly
 
Posts: 4
Joined: Sun Mar 06, 2022 1:22 pm


Return to How-To