Monday, April 21, 2014

OpenShot :: Transparency and alpha, oh, yeahhh

Yayhoo, Rose-breasted Grosbeaks have migrated back to Talking Rock (Pickens County, Georgia)! While contemplating dropping everything to stop and upload video footage of their return, started pondering the transparency capabilities of jpegs and such yesterday. It suddenly, BAM, hit to wonder about working a combination of a transparent video and alpha background image into the intro(duction) of homemade videos. Sure enough, turns out a close effect is possible via your choice of Inkscape and/or GNU Image Manipulation Program (GIMP) and OpenShot Video Editor..

So what I did was... After first pondering a transparency mashup as a possibility, I next decided I wanted the visual under the title frame to be a transparency of the first frame of the first video clip in the finished product. Printscreen comes to mind but that leaves a lot of room for error. Then I remembered seeing, in fact test driving then ditching, the feature that separates your video clips into single frames. One way to get to that is by:

  • Dropping your target video clip onto a track
  • Right clicking over top of your target video clip
  • Choosing (clicking) "Convert To Image Sequence"

What happens is, at least on my machine, it chugs a little and then you end up sitting there scratching your head because.... the newly created sequence.... might not show up in your primary OpenShot folder. Depends on your CHOICE of how you set up your files and save your projects. LOT of room for error there. I'm STILL getting system complaints when I reopen saved projects. Oy..

If all you need is one frame for something like what I'm doing, you can take an extra step in OpenShot and only create a small sequence. This way you end up with only a couple handful of images rather than generating HUNDREDS of images you might not ever use, not to mention the wear and tear on your poor computer.

Surely several ways to sequence fewer images but easiest for me until OpenShot's completely second nature was to:

  • Add a copy of my first video clip
  • Slice off a TINY sliver from the beginning of the video clip
  • Make an image sequence of just that tiny slice

You can add a temporary new track away from everything else just to do that sequencing. Simply delete that whole extra track as soon as the image sequence has been generated. A tiny slice takes a few seconds versus waiting unnecessarily for a large video to be sequenced. In my case today, OpenShot generated maybe 20 png files. I snagged the very first one and permanently deleted the rest.

Had to abort a search for that sequence earlier then accidentally and finally stumbled on it just now. The sequence for my setup was created in the same folder as the original video clip movie file. I *might* have mentioned in an earlier post that files are symlinked rather than actually drug into our projects. That's what happened, my generated image sequence was deposited in a different (all video) folder way over yonder. Snuggling up to the original movie clip file is actually a common sense *duh* place to look next when the sequence didn't turn up in the OpenShot folder.

For my purposes, I kept that one first frame so now what? I originally just wanted the frame to sit there twiddling its thumbs then pick up the video when that kicked in. In screwing around with it, though, there appeared that word "animation" in the choices.... Oooh. Animate. Overkill. Let's go for it. So my current choice of settings became:

  • Track 1: Soundtrack (Youtube Audio Library's Swamp_Stomp.mp3)
    • Right click over top and choose "Properties" (at bottom)
    • General tab, "Position On Timeline" = "0.00"
    • Length tab, "In" at "0.00", "Out" at "7.00"
    • Audio tab (because it's sound), "Fade Out" with "Fade Length" = "1.00"
    • Everything else I leave at default settings
  • Track 2: My title.svg frame (which it turns out is automatically transparent)
    • Right click over top and choose "Properties" (at bottom)
    • General tab, "Position On Timeline" = "0.00"
    • Length tab, "In" at "0.00", "Out" at "7.00"
    • Video tab (because it's visual), "Fade Out" with "Fade Length" = "1.00"
    • Everything else again at default settings
  • Track 3: The single png (#1) from image sequence I just did
    • Right click over top and choose "Properties" (at bottom)
    • General tab, "Position On Timeline" = "0.00"
    • Length tab, "In" at "0.00", "Out" at "7.00"
    • Layout tab, "Height" and "Width" = "15"; "X" and "Y" = "-15"; "Alpha" = "5" "0"
    • Everything else is default because I want png to seamlessly transition into the video

Note :: Almost ready to upload to Youtube and watched the video just one more time locally. Noticed that, after the video was exported (created), you could just barely see the transparent video sitting at the ready in the background. Didn't see it while I was only working in OpenShot. Tried setting the Properties > Layout tab > Alpha to "0". MUCH better. Clip starts out invisible but immediately becomes visible as it grows. Keep testing, always testing those settings.

Annnd another Note :: THIS is how cool OpenShot is. I'm getting ready to upload a video that is ~17.8MB in size. That is with all the alterings I've added PLUS the entire of the original video clip. That original video clip? It was.... ~73.4MB. I'm on dialup. That size difference alone is a huge, HUGE usability factor when it comes to being able to participate in video creation and uploading alongside everyone else. :)

So where were we? Settings. Right. Ok, those above should work. Those "-15" X/Y layout settings** for Track 3 bring the transparent png from the top left corner and drop it onto the screen as it "grows". Playing around with those numbers will bring it in at different sizes from different places.

My target, featured video clip snippet for now is on Track 2 with a "Position On Timeline" of "7.00" (Properties > General tab). I tend to let clips have a buffer of 0.01 seconds but there was a nanosecond of a blip unless the video clip bumped right up next to the png file. Another *duh*. I recently started fading my videos in and out (instead of just out). For this new (test) way of introducing titles, I won't fade *in* on the first video clip. That helps it all stay looking like one continuous thing, then.. Cool. :)

Annnd, being one to not leave things alone in software, I tried swapping the clips in Tracks 2 and 3 to see if there was any effect. There was. It looks, ummm... probably more professional. It's a quandary now, that one is. Professional looking versus overkill..... *hm*

** And there you go, messed with the settings again.. And found a few more things whose rationale hasn't gelled in my brain but that are surely calculable moves if you stare at it long enough. Changing "X" and "Y" values to "40" on the Properties > Layout tab brings the Track 3 png in from dead center. The not gelling part is about the number being "40" instead of "50". It must be about positioning a corner point of the clip based on how small you want it to be when it starts out. See, stare at it long enough, something halfway rationale does come to mind.

Changing those same values of "40" to "85" brings the png image in from the bottom right hand corner. Actually could see that one inversely coming after having used "-15" as a value first.

85. Sold. This way the title stays clear and readable the longest. For now. Sure did like that more professional blend when the clips were switched on Tracks 2 and 3, though.... *hm* =)

Happy Safe Surfing out there.. :)

No comments: