Monday, October 23, 2017

A Super-Duper Primer of Astrophotography Part 11 - Timelapse Photography

Along with the many other things you can do with astrophotography without a telescope (see Part 10 of this series for some ideas), you can make super cool timelapse videos!

One of my favorite side-activities when at a star party or even out at the observatory by myself is timelapse.  You can create videos of the Milky Way rising behind an observatory, activity on the observing field at the star party, your telescope tracking across the sky, planes zipping through the night, clouds appearing and disappearing, a thunderstorm rolling through – all kinds of things.  Timelapse is also my go-to for cloudy nights at the observatory so I can at least get something for my drive out there!  It’s also rather easy to do with a DSLR and a tripod.

This method is also great for imaging meteor showers - you have a much higher chance of catching a meteor if you're imaging continuously, and then you get to make a neat video at the end too.  Two for one deal!

Compose Your Shot

Figure out what you want in your foreground and your background.  Clouds are more interesting to watch than an empty blue daylight sky; the Milky Way rising is always pretty neat, or some other constellation; telescopes moving or people moving around the observing field also make great timelapses.  I did one at the Green Bank Star Quest of me and my minion Miqaela taking down our gear at the end of the weekend with clouds rolling around in the sky at the massive 300-ft telescope moving around (watch it here).  I did another one at the Texas Star Party of the Milky Way rising behind the upper observing field, which was stuffed to the gills with people and telescopes (check that out here).  I’ve also done several of my telescope tracking across the sky and changing targets.  Daytime timelapse is fun too – clouds rolling over hills, thunderstorms, weather fronts, traffic, people, all kinds of stuff.   Again, you are only limited by your imagination!

Focusing

Focusing in daytime is easy - use auto-focus, and then switch it to manual focus during the timelapse sequence (and don't touch the focuser.  At night, however, it's a little trickier, since your auto-focus won't work.  See Part 10 of this series for a section on focusing at night.

Taking Images

Take several test photos to decide on your ISO, shutter speed, and focal ratio.  If you are imaging during sunset or twilight, you may want to start out bright so that your images don’t get too dark too quickly.  Once you have decided, run your camera in manual mode, turn off everything auto, including D-lighting, set your white balance on something other than auto, and set your focus to manual.  My intervalometer only goes up to 399, and my camera’s interval timer goes up to 999.  Depending on your shutter speed, this may or may not be enough.  During the day, when I’m using short exposures, 399 will only get me 16 seconds of video at 24 fps, and any interruptions in your sequence, like restarting your interval timer, will show up as a jump in your final video.  999 frames will get me 41 seconds at 24 fps, and I’ve found that spending 30 seconds to a minute on a given scene in a video seems to be a good length of time.  For longer timelapses, I’ll usually use digiCamControl on my tablet to take an arbitrary number of photos (usually I’ll set it for like 3 hours and then just stop it when I need to).  For long exposures at night, it depends on how long your exposure is.  The longest I can do without getting star trails is about 15 seconds at 18mm of focal length, but with timelapse, you can get away with 30 seconds, since the images will be blurred together anyway.  However, the longer your exposure time, the fewer images you’ll be getting, so your final video will be shorter.  I imaged the Milky Way rising over the upper observing field at the Texas Star Party for about an hour and a half, and I only got 180 images, which is only 18 seconds at 10 fps.  But, I had a nice bright Milky Way.

Also, you can go ahead and take these in JPG instead of raw.

Problems You Might Run Into

Battery life is probably the number one inhibitor of timelapse.  My stock Nikon batteries only last about two hours in my D3100 that has a non-closing screen, and about four hours in my D5300 that has a closing screen.  I’ll plug into AC power when I can, but this limits where I can image.  So what I usually end up doing is when my battery dies, I’ll move to a different spot and take another timelapse, since I don’t like jumpy gaps in my timelapse videos.

Dew is also an issue, at least at night.  In the case of humid nights, I’ll station my camera near my telescope, and run my 2-inch dew heater strap over to the camera (I got an extension cord, but it’s a little too long, so it’s very lossy, which means I have to crank the current up quite a bit), and wrap it around the lens. I have a dew heater controller from Thousand Oaks that can run four heater straps – one for my 11-inch, one for my guide scope, and one for my timelapse camera.  I can’t use a blow dryer on it because you will see it in your timelapse.  I can’t even check for dew because that will show up too.  So the dew heater is a good solution.  

Another option that astrophotographer Brent Maynard told me about at the Green Bank Star Quest that I think is very clever is to use those chemical foot warmers you can get at the grocery store or the gas station.  The foot warmers are sticky on one side so they’ll attach to your socks – they’ll also attach to the side of your lens!  He even uses them on his reflector, spacing them out around the ring, and using a stretchy band or extra tape to hold them on.  They work great.  I've also used hand warmers attached to the lens with rubber bands - you only need one since they get quite hot.  Cheap and simple solution!

Creating the Video

I mentioned the app VirtualDub in my post about planetary astrophotography as a way to convert .MOVs or .AVIs to a format of AVI that RegiStax likes.  You can also use it to make videos and animated GIFs.  There is a little pre-processing you’ll need to do to your images first, though.

First, get all of your images in time-order. Nikon does this annoying thing where it rolls over after 999 images, and then starts numbering again, from 001.  This means that when you put them all together in the same folder, you’ll have your first 001, and then 001 (1) from when it rolls over, and then 001 (2) when it rolls over again…so basically putting them in name order does not put them in time order.  You can do this by going to the View tab in the folder, choosing Details, and then clicking on the “Date modified” column twice so that it’s in ascending order.  Windows, unfortunately, is very slow at re-ordering large numbers of files, so be patient. 

Once they are in time-order, click on the first image, and then hit Ctrl + A for Select All. Then, either press your F2 key, or right-click on the first image and click “rename.”  Rename it whatever you want, and then hit Enter.  This will name all of the photos the same thing, but with a (1), (2), etc after it.  This is necessary for VirtualDub to be able to pull them all in to make a video.  The numbers have to be sequential – if there is a gap, VirtualDub will only pull in images up to the gap, and then stop.  The first image has to be (1).  So if you delete some photos from the sequence later, you will need to repeat this step to re-number all the photos.  Again, Windows is slow at this, so give it a few seconds, especially if you have over 500 or so images.

Open VirtualDub, and click File -> Open Video File, and then go to the folder where your images are saved.  Make sure the “Files of Type” box says either “All types” or “Image sequence.”  Click on only the first photo in the list, which should be your (1) photo.  Click Open. This will load in all of the sequentially-numbered images in that folder.

Next, go to Video -> Frame Rate.  Here you have some flexibility – 24 fps is about what the minimum is for motion to appear smooth for the human eye, although I’ve found as low as 10 fps looks pretty nice too, at least for timelapse. You can certainly go faster, but it depends on how fast the things in your images are moving, and how long you want a particular sequence to last for when the video is all compiled.  Click the “Change frame rate to” radio button, and enter what fps you want. Click OK.

Next, go to Video -> Filters.  Click the “Add…” button.  Now, your DSLR takes some pretty large frames.  Mine are 6000x4000, which is greater than 4k video.  HD video is 1920x1080.  The larger your image frames are, the larger your final video file will be – like, dozens of gigabytes.  These take forever to upload to YouTube.  So, I reduce the frame size by clicking the “2:1 Reduction” filter, and clicking OK.  Later, I’ll compress it further.  Another option is to use a batch resizing program beforehand to bring them down to a smaller size.  I don’t use any of the other filters (besides MSU Deflicker - see below), although you are welcome to give them a try (and let me know if you get any helpful or cool results).  Click OK.

Now, go to File -> Save as AVI.  Choose where you want the video saved at, and then click OK.  A small window will appear showing progress.  Uncheck the “Show input video” and “show output video” boxes, which should make it run a little faster.  Then sit and wait.  Once it’s done, check out your video!

A word of caution here.  My homebuilt rig has a NVIDIA GTX 1070 card in it, 16 GB of RAM, and an Intel i7 processor, and it cannot play the giant video files that come out of VirtualDub smoothly.  It’s glitchy and slow.  So, your next order of business will be to reduce the file size by compressing the video.  I use an app called Any Video Free Converter to do it.  Simply drag the file in, set all of the video and audio settings to “Original” or something reasonable, and then click Convert.  Even if you set everything to Original, I think it changes it to a different AVI format or applies some other compression algorithm, and the file size comes out like one tenth of what it was – something like a few GB down to even hundreds of MB.  Not only will this play on your computer better, but it will upload to YouTube in an amount of time shorter than the age of the Universe.  I’ve found there not to be much degradation in quality after the conversion process, particularly since my computer screen is only 1920x1080.  

Adding Audio

Your timelapse video will be even more interesting with some flowy space music or epic sci-fi anthems in the background.  First, figure out how long your video is going to be.  This is easy – just take the number of frames, and divide by the fps you’re using – for instance, 1000 frames at 24 frames per second is a 41.7-second video.  Second, find a song you want to use.  I’ve got a spacey playlist I use at public outreach events that I draw from, and there is a lot of that kind of music out there, especially for sci-fi video games.  Then, I use the free software Audacity to cut the song and have it fade out.  Just import the song, cut it at the length of your video, select about the last 5 seconds of the song clip, and then to go Filters -> Fade Out.  Then go to File -> Export to export the song as mp3.

In VirtualDub, with your image files still open, go to Audio -> Audio from another file, and select your song clip.  I usually select the option of auto-detect bit rate, and it seems to work well.  Then do the same as before – File -> Save as AVI to create your video. The audio will also be glitchy until you compress the video.

Flickering

Sometimes, your timelapse will see to flicker.  This is usually due to leaving some auto-setting on, like white balance or active D-lighting.  Don’t fret, your hard work isn’t toast – there’s a great little plugin for VirtualDub called MSU DeFlicker.  It does some averaging between frames to virtually eliminate this effect.  You can just take its default settings, or play with it some if the flickering isn’t resolved with the defaults.  

Conclusion

And there you have it!  It takes a bit of legwork, but nothing too technically complicated, to make some kick-ass timelapse videos of the sky.  Enjoy!

1 comment: