About

 

The original unhacked Panasonic GH1 had some potential as a shutterless timelapse camera – video mode shutter speeds can be dialled down as low as 1/2 second, though only in 720p resolution.

My initial experiments with timelapse in video modes were unremarkable.  I do have an intervalometer for timelapse and I continued to use it, but with 64,000+ exposures I decided to look in to video mode timelapse again before I broke the thing. Panasonic haven’t released any information about the expected life of the G series shutter and although it doesn’t have a heavy mirror like traditional DSLRs, 100,000 is probably at the higher end of expected life.  Traditional timelapse techniques will always have their place, but with video modes on practically every DSLR/EVIL camera out there, I couldn’t understand why there wasn’t a shutterless timelapse solution.  Now there is!  Sort of…

On the GH1, it’s possible to record timelapse in AVCHD mode, down to 2fps. But even though the sensor only grabs two frames per second, the video codec still records at the full 25/30/50/60 frames per second, duplicating the same image information over and over again.  At some non-standard shutter speeds I experienced intermittent codec breakup. Yuk.

Aside from the reliability problems you get mediocre quality for the few frames you want to keep and huge files full of wasted data so total record time is vastly reduced – limiting the usefulness as a timelapse camera. I wrote a batch script to extract frames from AVCHD recordings at various intervals to speed up the video, and there’s ways to improve the results in video editing programs, but even with the increased bitrate of the GH13 hack, I wasn’t that impressed with the results.  It is possible to record a timelapse using FHD 1080p mode, but you’re limited to a maximum shutter of 1/30 second, so smooth timelapse motion is impossible.

When the GH13 hack first came out, I was excited by the MJPEG option: 720p30 -> 720pXfps. It seemed to accept any integer frame rate.  I gleefully entered a frame rate of 1fps in conjunction with the MJPEG 1080p patch and installed the firmware – but the camera froze every time I tried to record. I tried 5fps, the camera froze again. Nuts! I quickly forgot about using MJPEG for timelapse.

I decided to revisit the MJPEG hack recently wondering if a newer version might fix the problem and discovered that 1fps and 5fps are two of the settings that plain don’t work, but others seem to be 100% reliable, including 2fps.   MJPEG  can also be set to record at full 1080p resolution and though it’s a little soft compared to AVCHD FHD mode, it does seem to be an improvement over MJPEG 720p. The good news is that with MJPEG set to 2fps, the camera will dutifully record exactly two JPEG frames per second – no wasted storage, great quality and long recording times.   Because you’re only recording two JPEG frames per second instead of 30, this means you can push the quality up practically as as high as you want – 1080p at the 400/4table setting yields jpeg frames around the 98 quality level, according to JPEGsnoop.   This is almost indistinguishable from a lossless image format.  You’ll get somewhere around 15-20 minutes at this quality level

I’ve found the best balance is MJPEG 1080p with E1 quality set to 160/table 4.  This will give you close to an hour of recording before you hit the 2GB limit.  Dialling back to 720p should yield close to 2 hours of recording time.

Still, in timelapse terms you’re limited by a maximum interval of 1/2 second and a maximum exposure of 1/2 second. Until now!  With GH13 Timelapser you can set the interval and exposure as long as you want! Well, sort of…

The GH13 MJPEG files straight out of the camera play back at 2fps, so I adapted my AVCHD script to stream-copy the jpeg frames to a folder and then reassemble them in a container that would play back at 25fps. It worked – the results were great.  As I finished tweaking the script I started thinking of more features to add. First I decided to add an interval option that would discard frames and keep one frame every second, or two seconds, or five seconds, or whatever you want the interval to be – just like with an intervalometer. But the shutter speed was stuck at a maximum of 1/2 second, so if you wanted to set a nice long interval, you couldn’t achieve the nice smooth motion you get from a long exposure.

Then I came upon the idea of blending frames together to achieve a longer shutter time – I used imagemagick to generate the mean-average of several frames between each interval. This worked perfectly – better than I imagined as averaging the frames also cleans up most of the noise and artifacts that are seen in underexposed areas. Then I thought it might be handy to be able to extract the audio – it’s crappy quality but you never know… Frame blending can be slow on very long timelapses, so I thought it would be good to be able to run a test render of a few seconds to check the results before processing the whole file. Ooh and automatic looped playback on completion. And logic to calculate output file length, handle file overwriting, menu navigation, easily-editable default settings… You get the idea. What started as a short script turned in to a 1200+ lines of jumbled batch file.   It’s ugly, it’s thoroughly unoptimised, it probably breaks every programming rule in the book, but it works! (Your mileage may vary)

Here’s how it works. Right click on a 2fps .MOV file from your Panasonic G, click “Send To” or “Open With” and “GH13Timelapser”

By default GH13 Timelapser will prompt you for interval, shutter and blend quality levels – if applicable.  You can jump to any menu or toggle settings on and off by entering the appropriate letter in the top right corner.  If you change the interval setting, the “Output length” field will be updated so you can see how long the resulting timelapse will be.

The output filename will be: <source-file>-tl-iWsX[-qY][-testZ].avi

W – interval setting
X – shutter setting
Y – quality (if applicable – only if frame blending is used)

Z – test length (if applicable)

In the above example, the output file would be P1640231-tl-i4s2-q95-test1.avi.  Having the settings encoded in the file name allows you to try various settings without overwriting previous runs – and to quickly identify settings used when you go back to a timelapse file later

Option c will open up a configuration file in notepad.  Edit and save the file and GH13 Timelapser will prompt you to import the new settings.  The settings you choose here will become the default settings:

IntervalForce=0    - Don't prompt for interval setting
IntervalDefault=4  - Default interval setting
ShutterForce=0     - Don't prompt for shutter setting
ShutterDefault=2   - Default shutter setting
QualityForce=0     - Don't prompt for quality setting
QualityDefault=95  - Default quality (used with frame blending only)
AudioDefault=1     - Enable audio saving to MP3 by default
TestDefault=0      - Enable test output of TestDuration seconds by default
TestDuration=3     - Number of seconds to generate test renders
ContainerType=avi  - Output format - valid formats are avi and mov
PlayDefault=0      - Play the result full screen and looped when finished
ForceOverwrite=1   - Don't prompt when overwriting temp/output files.
Debug=0            - Pause before end of process to preserve jpegs/logs for inspection/debugging.

How do I set this up?

You’ll need a Panasonic DMC-GH1 (or other G series) capable of using the GH13 firmware hack (ptool)

You can learn more about/download it here

The exact settings you use are up to you, as long as you set the MJPEG frame rate to 2fps

MJPEG Movie Mode | MJPEG FPS | 720p30 -> 720pXfps:  2

By default MJPEG format records in 720p, but you can change this to 1080p:

MJPEG Movie Mode | MJPEG Size Adjustments | 720p30 -> 1080p30: (tick)

MJPEG quality settings are a tradeoff between image quality and recording duration.  Setting E1 Table: 4 makes a big difference. My understanding is that the E1 Quality/Table setting is used initially and E2/E3/E4 are a fallback if the camera can’t keep up.  As we’re only recording at 2fps this is unlikely to be a problem, but I recommend using settings that descend down from your E1 quality setting.  E1 Quality: 400 will give you super-high quality jpegs, but only about twenty minutes of recording time at 1080p.

E1 Quality 160 looks just fine to me, especially when frames are blended together and will give you a recording time of just under an hour.  If you’re happy with 720p you’ll get closer to two hours.

MJPEG Movie Mode | MJPEG Compression | E1 Quality: 160
                                       E1 Table: 4
                                       E2 Quality: 140
                                       E2 Table: 4
                                       E3 Quality: 120
                                       E3 Table: 4
                                       E4 Quality: 100
                                       E4 Table: 4

I leave ” MJPEG Color” as the standard 4:2:0 which leads to smaller file  sizes and thus longer shooting time.  If you use frame blending, I believe  you’ll  get the benefit of averaged colour/luminosity for each pixel and  GH13 Timelapser will output in 4:2:2 to take advantage of this (please let  me know if I’m mistaken and there is no benefit.)  When shooting your timelapse, you’ll  want to always set your shutter to 1/2 second if you intend to use frame  blending.  1/2 second blended frames will have smoother motion – shorter  shutter speeds will introduce ghosting to fast moving objects.

When shooting your timelapse, you’ll want to always set your shutter to 1/2 second if you intend to use frame blending.  1/2 second blended frames will show smooth motion, shorter shutter speeds will introduce ghosting to fast moving objects.

GH13 Timelapser makes use of the following open source utilities (included in download)

Special thanks to Vitaliy Kiselev for GH13 ptool hack.