Today’s discovery which I’m going to post here because I know I’ll need it again:
$('body').on('shown', '.modal', function() { $('textarea,input', this).filter(':visible:first').focus(); });
Will make sure that when any modal pops up, the first input or textarea field on it will receive focus. If you’re lucky enough to be upgraded to Bootstrap 3, that shown
changes to shown.bs.modal
or something like that.
Category: Revelation
Another boring post about video workflow
Well, it turns out that iMovie does have a chroma-key ability. And it’s pretty easy to use, actually, once you find it. The trick is to drag the two clips on top of each other, just like I do when I’m doing split screen, but on the same menu as split screen, there’s another option called “Green/Blue screen”. So I’ve generated some solid color backgrounds with ffmpeg. Then I bring them into VIRB Edit and overlap the GPS data gauges on them and export that result. Then I bring the resultant exports into iMovie, and I can overlay them on the multiple camera shots. I just have to figure out how to make sure the GPS gauges stay in sync with the camera shots. The easiest way seems to be to do an audio countdown before hitting start on the GPS that’s picked up on the cameras, or look for when I start paddling in the case of a race. But then I’d have to export each full clip with the overlay and bring it back in as a new clip. I’ll have to work on that.
Meanwhile, I’m trying to figure out what color to use for the chroma-key. Green is the standard, but my gauges have green in them. The results aren’t that great. (Note that the video and the GPS track aren’t from the same paddle, it’s just for testing.)
Then I tried red. There’s very little red in the gauges. The results are better, but still not great.
Blue isn’t much different from red, but does save one whole click because you don’t have to click in the red area to tell it which color to key on.
Testing continues.
Another wild thought about video workflow
So in the past, I talked about combining video from two cameras with the VIRB overlay (GPS and heart rate data) and how complex it is. Well, I’m about to throw another complexity into it, because now I have three cameras and I don’t just want to split the screen for the whole duration. This means I’d need to go through VIRB Edit three times to put the overlay on each video (and maybe a couple more times if I want to use split screen for some of them), which is incredibly time consuming.
But then I thought, why do I need to do this? Why don’t I just make a VIRB overlay over a solid color, and then use a Chroma-key (aka “green screen” although it’s not necessarily green) to composite that with each clip as needed in iMovie? Sliding stuff back and forth to match up time lines isn’t that hard in iMovie, and VIRB Edit sucks as a video editor. Hmmm. Even better, I found I can use ffmpeg to generate the “background” solid color clip of the desired resolution and color.
The only problem is that iMovie no longer has Chroma-key. It used to, but then they took it out when they made it “more user friendly”. And I suspect that going back to iMovie 9 for this would mean I could no longer use the current iMovie.
I know you can do Chroma-key in ffmpeg, but I’m not sure how you’d match up the start times since I never start my cameras and the GPS at exactly the same time.
Maybe it’s time to start looking at third party software?
Video camera battery life sucks, and this is what I did about it
Most action cameras I’ve looked at (GoPro, VIRB, etc) all have battery life somewhere between an hour and an hour and a half. Unfortunately, most of my kayak races are somewhere between 1:40 and 2:00 hours long, and plus you have to start the camera before you get in your boat, so you end up either rushing back to shore to start it after your warm-up, or you start it before your warm up and miss the last half hour or more of the race.
This is the Polaroid XS100. It’s a very nice action camera, except just like the others it has lousy battery life. I got one for a present, and was very impressed with the picture quality. It’s not as light as a GoPro, so I didn’t think I’d want to wear it on a headstrap, but mounted on the boat it did well recording some of the shorter races. But the battery ran out on the Canadian Surfski Champs, which is a bit longer race. So I decided to do something about it.
This is the cover on the back.. It covers the back of the camera where the USB charging port and the SD card slot live.
Here is the back without the cover. .
Note the curious bump on the cover that fits into the USB port. I have no idea why they put it there, but it’s kind of handy for my purposes.
The first thing I did was buy a second cover from Polaroid. I wasn’t sure if this was going to work, and I didn’t want a useless camera if it didn’t. The second thing I did was buy some waterproof USB batteries and some Sugru. Sugru is amazing stuff – it’s like plasticine, but it hardens into a waterproof rubber.
The next thing I did was drill out that bump I mentioned, and a bit more, so I could slide a USB charging cable through the hole. I “Sugru-ed” around the hole to seal it up. I did the same with the cap on one of the waterproof batteries..
If I’m really careful, I can wiggle the cap and cover back on without disturbing the Sugru and wrecking the seal. The battery is now semi-permanently zip tied to the side of the camera. The camera is on a Panavise suction cup mount which I can move from boat to boat. I tested it and I get more than 5 hours video with a 32GB microSD card. More than enough for any race I plan to do.
Chuffed is the word
The Canadian Surfski Championships chose to single me out in their Facebook page as a returning non-pro racer. I’m properly chuffed.