Ask a Question
GoPro Support Hub Ask a question. Share an answer. Find a solution. Stay stoked.
Announcements
Is your GoPro gear up to date? Check to see If it is on our Update page.
Cameras
Reply
Hiker
Posts: 8

Can the Hero5 file naming convention be altered?

This file naming convention is kind of odd. When you copy the files using a PC, you lose the timestamp so you can't sort the files by the time they were taken. And when you have files that go beyond the 4GB limit and roll into secondary files, you can't sort by file name either.
This is my first day with a gopro. Took an hour or so of footage, then plugged it into my PC and copied the files to end up with:
GOPR0022.MP4
GOPR0023.MP4
GOPR0024.MP4
GOPR0025.MP4
GP010022.MP4
GP010023.MP4
GP010024.MP4
GP010025.MP4
GP020023.MP4


Now, I understand the naming convention as I found the document, but is there a way to have the files named like the following automatically? This file name can be easily sorted.
GOPR0022.MP4
GOPR0022-01.MP4
GOPR0023.MP4
GOPR0023-01.MP4
GOPR0023-02.MP4
GOPR0024.MP4
GOPR0024-01.MP4
GOPR0025.MP4
GOPR0025-01.MP4

This would get pretty unwieldy with a few hours of footage. Would probably be even worse if I was using 4k vs 1080p@120fps as I'm assuming 4k would result in larger files, so they would roll over into sub-files even more.
GoPro
Posts: 9,299

Re: Can the Hero5 file naming convention be altered?

Hello @bryanl141

 

Great insight!  At this time though, there is no way of altering the file naming convention yet. We use the the file naming convention here as guide: https://gopro.com/help/articles/question_answer/GoPro-Camera-File-Naming-Convention. 

We will share your recommendation to the team in charge. Alternatively, you can also share directly here

 

Thanks, 
Marius

Hiker
Posts: 8

Re: Can the Hero5 file naming convention be altered?

I ended up writing a small shell script to rename the files for me. Sure, I could do it by hand, but was easier to do this instead.

 

I just copy all the MP4 files to a folder from the sd card, then go here using cygwin or windows powershell I run this in a script. It determins what is a parent file and child file and renames the child files as I mentioned earlier.

$ cat editGoProNameAll.sh
# GOPR0025
# GP010022
for i in `ls G*.MP4`
do
    echo "Processing: $i"
    fileNameOrig="$i"
    fileNameNoExt=`echo "$fileNameOrig"|cut -d\. -f1`
    fileExt=`echo "$fileNameOrig"|cut -d\. -f2`
    fileNoChar=`echo "$fileNameNoExt"|sed "s/[A-z]//g"`
    #do not use echo for wc as echo includes a new line character
    fileNoCharLen=`printf "$fileNoChar"|wc -m`
    if (( $fileNoCharLen < 5 )) || echo "$fileNameNoExt"|grep "GOPR">/dev/null;then
        #echo "$fileNoChar - charCount: $fileNoCharLen"
        echo ""
        if echo "$fileNameOrig"|grep "-"|grep "GOPR" >/dev/null;then
            echo "File is a renamed child already: $fileNameOrig"
        else
            echo "File is a parent: $fileNameOrig"
        fi
        echo ""
    else
        echo "File is a child: $fileNameOrig"
        #echo "$fileNoChar - charCount: $fileNoCharLen"
        parentNum=`echo "$fileNoChar"|cut -c 3-6`
        childNum=`echo "$fileNoChar"|cut -c 1-2`
        newName="GOPR$parentNum-$childNum.$fileExt"
        echo ""
        echo "Changing name from: "
        echo " $fileNameOrig To: $newName"
        mv -v "$fileNameOrig" "$newName"
        echo ""
    fi
done
GoPro
Posts: 9,299

Re: Can the Hero5 file naming convention be altered?

[ Edited ]

Awesome! Thank you for sharing, @bryanl141!

 

Cheers, 
Marius