GoPro Filenames

GoPro Filenames

I have a GoPro Hero4 Session. This little camera was amazing when it came out. I still think it’s still pretty amazing today. (Aside from one annoyance: I can’t get Quik to connect to it from my Android phone because it insists that there’s a PIN set on it.) It does what I want it to do. Takes half decent action videos in 1080p at 50Hz and wide-angled quite average stills. In good light the photos are pretty usable as happy snaps. It’s waterproof without needing a case. And it comes with all manner of mounts. It’s currently being used on the front of my bike to capture any excitement that might happen as I ride around the place.

But where it falls over completely is file naming convention. Videos start off with a perfectly fine “GOPR6014.mp4” format. The 6,014th photo or video shot on the camera. Perfect. But then, when that video gets to the filesize limit, it creates a second file with the name GP016014.mp4. And the next file it creates is GP026014.mp4.

This means that when you sort the files by name, you get a list of all of the second files for the videos, then third files for the videos, then fourth, etc., until you get to a list of all the base files.

It’s horrible and makes a mess of any storyboarding file editing software you can imagine. (Unless there are ones out there that will accept this horrid GoPro standard that I’ve not yet found).

Some part of the Star of Greece taken with said GoPro

Anyway – Python and regex to the rescue.

import os
import re

# Get all files in the current directory and skip directories
for filename in os.listdir('.'):
    if not os.path.isfile(filename):
        continue

    name, ext = os.path.splitext(filename)

    # Rename GOPR files: GOPR6014.mp4 → 6014-00.mp4
    if name.startswith("GOPR"):
        new_name = name[4:] + "-00" + ext
        os.rename(filename, new_name)
        print(f"Renamed {filename} → {new_name}")

    # Rename GP files: GP016015.mp4 → 6015-01.mp4
    elif name.startswith("GP"):
        match = re.match(r"GP(\d{2})(\d+)", name)
        if match:
            suffix = match.group(1)
            main_number = match.group(2)
            new_name = f"{main_number}-{suffix}{ext}"
            os.rename(filename, new_name)
            print(f"Renamed {filename} → {new_name}")

This takes all the files in the directory that you launch the script from and renames them into a more sensible structure.

GOPR6014.mp4 becomes 6014-00.mp4.
GP016014.mp4 becomes 6014-01.mp4.
GP026014.mp4 becomes 6014-02.mp4.
and so on.

This now sorts properly, and makes life much easier.

Enjoy.

Test this before you use it on something important.

.

.

Street Portrait Cards

Street Portrait Cards

With the Fringe starting in Adelaide again, I decided to try my hand at some Street Portraits. I approach a random stranger, and ask if I can take their portrait. Simple, really.

I’ve written a bit about it over on my other blog here.

I decided I wanted a way for people to be able to find their photos, so designed this little TLR and Instagram business card, matching the type of camera I use for the portraits.

The cards turned up today, and I’m so pleased with them!

A photograph – mine.

A photograph – mine.

Sellicks Beach

While we were away on our mini-breakette we took many walks along the beach. It was windy, and gorgeous. This is from Normanville.

Shot with Olympus OM-1 with a red filter (25A), on Ilford FP4+ 125, developed in Ilford DD-X at 22°C for 8 minutes. Which is the standard method, just 2°C warmer than normal.

If you would like to flick through my film photographs, they have an album on Flickr.

.

.

A movement!

A movement!

That might be a bit dramatic. It’s definitely an exaggeration. But look! It looks like I’m about to get one back!

I’ve created a map of all the destinations that I’ve sent #tardigram postcards to. Looks like I might have to create one for where I’ve got them from, too.

Lovely!

To reiterate, if you would like to receive a photograph, lovingly photographed, developed, and wet-printed in the post, get to me your postal address and I shall make it so!

.

.

Project #tardigram

Project #tardigram

I had a feeling it would be fun. I had a feeling it would fit right in with my current attempts at slowing down.

So far I have printed 14 postcards. I’ve sent three cards overseas: One has gone to Anchorage, Alaska in the USA, one to a village near Nagano in Japan, and another to Malmö in Sweden. Some are for old friends. Some for new ones. None to random people. Yet. I’m looking forward to my first postcard to someone completely random. I have a few more to print, but that will have to be a job for this weekend.

Screen-snip of message from friend holding the card I had sent.

Above is the response from a friend (an old one, whom I see far too infrequently). I have to say that this response is exactly what I wanted from this little project. A bit of joy in somone’s mailbox. Something different in amongst the bills…that’s not an expiation notice. I look forward to getting more snaps from people when they receive their tardigram.

If people start sending me random photographs in the mail that would be even better. Wink wink, nudge nudge.

Let me know if you want one. Somehow. Try @techoglot on Twitter or @TechnicalKO@aus.social.

PS.
Karloskar
PO Box 23
KENSINGTON PARK SA 5068

.

.