Monday, November 27, 2017

"Pause" t-shirts redux

It's the design that keep on giving!  The t-shirt design I co-created for a youth ministry Disciple Now event back in 2011 and was re-used by another ministry in 2012 seems to have a life of its own.

Back in September of this year, I was approached online by John Copeland, a youth pastor from Georgia, who had stumbled across the blog post I wrote about those "Pause" t-shirts.  As it turns out, his youth group was in need of a similar event tee, so he reached out to request permission to use the design.  As I've demonstrated before, this is perfectly acceptable (and appreciated) request to make!  So, naturally, I was happy to see the design used yet again by someone else.

When it was all said and done, I was even able to connect John with the fine folks at Contagious Graphics, who still had the design artwork on file from the first time they printed up the shirts.  All I asked in return from John was that he send me a photo of his youth group wearing the shirts, and I was so pleased this morning to see that he had made good on his promise!


Thursday, November 2, 2017

Custom countdown video generation (the ... complicated way)

At Providence Baptist Church, where I serve on staff as Worship Leader and Technology Coordinator, we occasionally employ countdown videos ahead of our worship service start times.  Now, a countdown video is little more than a video clip that shows a "minutes:seconds" countdown, usually overlaying some subtle motion graphic loop or still image.  You can buy these things from media sites (such as Worship House Media) for a nominal fee, often as part of a collection of videos which bear a common visual theme — a countdown video, a few motion loop videos without any overlaid text, etc.  But sometimes I want a countdown video that I can't purchase, perhaps because I don't like the font, font size, positioning, or background motion loop of what is available for purchase.

Now, I'm sure that expensive video editing software can generate these things willy-nilly with full customization.  But I'm not really an expensive-video-editing-software kind of guy.  I'm familiar with a handful of less-expensive (or free) options, though, and many of these offer the promise of a workaround for my itch to design custom countdown loops.  So tonight, I decided to see what I could work out using my current favorite of these editors, VideoPad.

Like many other timeline-based video editors, VideoPad allows you to create text objects which can overlay another video track.  I figured that if I could create a VideoPad project with a whole track full of 1-second text objects, each of which showed the countdown text I wanted ("4:59", "4:58", "4:57", and so on), I could use this as a template for various specific countdown timers in the future.  I'd simply swap out the still frame or motion loop video that served as the background, and re-render as needed.  But it only took me a few minutes to realize that I really didn't want to manually create and sequence 300 of these frames (5 minutes x 60 seconds per minute).

So I took a slight detour.  What if I could reverse-engineer the VideoPad project file format?  Was that possible?  It only took a few minutes to realize that VideoPad project files are simple text files with Unix line endings and URI-query-encoded lines of data.  Unfortunately, while I could make sense of much of what I saw in my sample project file, I failed to successfully edit it to affect a simple change — the addition of one more countdown text object properly sequenced.

I was about to give up hope, when I remembered that VideoPad also supported the use of PNG image overlays — with full alpha-channel support!  If I could generate 300 PNGs, each one a transparent rectangle with the countdown timer text rendered in the frame, then VideoPad would let me import those as an image sequence (much like the "create a slideshow" feature of other editors) and then I could layer that whole sequence atop the background still/video of my choosing!  Finally, I was in familiar territory.

After about a half-hour of hacking around with Python and Pillow (née the Python Imaging Library), I had something that worked for my purposes!  I quickly generated the 300 image files, successfully imported them into VideoPad, shoved another motion loop video underneath them, and rendered my first custom countdown video!  And since my wife and kids were away from home, I then spent another hour polishing up my script a bit more, allowing it to be driven with various options (controlling the size of the generated frames, the font specifications of the countdown text, and the rough positioning of the text), adding some error-checking and documentation, and published the result to Github as gen-countdown-frames.

To those with oddball interests and similar needs:  you're welcome!

Thursday, August 3, 2017

Parenting by the Sixes

I suspect that at some point every Christian parenting seminar, magazine, or discussion eventually finds a way to bring up the opening verses of Ephesians 6:
Children, obey your parents in the Lord, for this is right. “Honor your father and mother” (this is the first commandment with a promise), “that it may go well with you and that you may live long in the land.” Fathers, do not provoke your children to anger, but bring them up in the discipline and instruction of the Lord.
[Ephesians 6:1-4 ESV]
And to be sure, this is not a bad thing.  The author and apostle Paul does a good — if concise — job here of addressing both "sides" of the oft-opposed factions within a household.

But I was surprised and enlightened this morning when I found conviction and instruction for the parent as I read the opening of not Ephesians 6, but Galatians 6:
Brothers, if anyone is caught in any transgression, you who are spiritual should restore him in a spirit of gentleness. Keep watch on yourself, lest you too be tempted. Bear one another's burdens, and so fulfill the law of Christ. For if anyone thinks he is something, when he is nothing, he deceives himself.  [Galatians 6:1-3 ESV]
I can't tell you how many times I've admonished my children for some behavioral shortcoming only to find myself succumbing a similar (or identical!) issue shortly thereafter.  So while Paul may not in this second passage be addressing parents and children specifically, I think the prescription applies nonetheless.  As a father, my supreme aim for my children is that they increase in holiness.  But I need to offer guidance to that effect in love, with gentleness, and in all humility as I openly confess my own failures, my insufficiency, and my outright dependency on the grace of God as He works out holiness in me.