Those of you who know me will know I’m quite up for doing seemingly mad things if someone throws them at me and they involve some challenges of a technical nature. Back sometime in April, already planning to go along to BUCK – Europe’s largest brony convention, held in The Bridgewater Hall, Manchester, UK – I asked their staff if they needed any technical people to help out on the day. “No, but we need a technical manager” was the response. How could I say no?
Two weeks from the gig, and things are now settling down to the nitty-gritty of producing content for the live stream. The stream itself is fairly complex – four Sony PMW-200 cameras, two of them with Wevi HD-SDI senders, a Roland V-1600HD vision mixer and a boatload of computers feeding in video. Any decent multicam production needs a little bit of glamour in the form of lower thirds (the things that pop up to say who people are) and some title cards. Of course, this being a quite low-budget production we wanted to do this on a budget. Enter CasparCG, a superb open source playout system designed and developed by our friends at SVT, Sweden’s BBC equivalent. This is a bit of a rushed walkthrough of how I put some of the stuff together.
CasparCG supports dynamic templates by way of Flash. This does rather saddle you with the Adobe stack for content creation but this isn’t a total deal-breaker now that Adobe have adopted a more sensible pricing model with Creative Cloud. The CasparCG guys tell me they’re working on making things easier but the Adobe toolset is incredibly capable anyway, so it’s not a total pain.
So what do we need to do to produce our template? Let’s examine a finished product:
The above video was made using the x264 disk consumer in CasparCG on a heavily loaded machine, hence a few late frames. We’ve got two graphical elements and two lines of text, and we’d like to animate the graphical elements and have the text changeable so we don’t have to pre-render one of these movies for every person who might come up on the stream!
So here’s the workflow I came up with.
First up, let’s just actually lay this all out in Photoshop. I have my bar, logo, and text elements on different layers, laid out as they should be. If you create a new Photoshop document using the Films and TV presets, you get safe area guides for free, so you can avoid areas likely to be hidden by player chrome or cropping. As this stream is HD, we’re doing production in 1920×1080 resolution, so use the appropriate format.
Once this is done and you’ve got it looking like you want, export each layer on its own PNG at full resolution. But ignore the text – we’re not going to rejoin it until later. Just remember the position, font and styles – it’s time to get transitional.
I’m not an After Effects, animation, or film production whiz. So this part will likely get me shouted at – but it’s working! First up, make a new composition. We’re targeting 1080p25 (25 full frames a second; the mixer is actually working at 1080i50 for output but we’re using DVI inputs so this doesn’t matter) so set the composition up appropriately. Next, drag in the assets and layer them as you want. The text isn’t there and we won’t be adding this in AE, so make sure you don’t obscure the area you will put the text on or it’ll look odd.
I then applied a couple of effects to be our “transition” effects; a CC Grid Wipe for the bar, and a CC Light Wipe for the logo. Tweak the effects as you please, and then use keyframes on the completion parameter to set them up to start as soon as the clip does and end a couple of seconds in. You can preview this and tweak it in AE as much as you like until it looks perfect. Bear in mind the constraints of your keyer if appropriate – if you’re doing split key/fill on a synchronized pair of SDI outputs, then fantastic, but as we’re using DVI we’ll be using a luma keyer in the mixer.
While you’re tweaking your keyframes, bear in mind you don’t need to export the full length movie with a pause – we’ll add that later. Make sure you’ve got half a second or so in the middle where nothing is happening and we’ll mark that as our outro pause.
Add the composition to the render queue, export it as FLV with Alpha, and fire up Flash.
Flash is doing the magic here. As a browser plugin it may be awful but it is rather handy for this. For the purposes of this guide you need to have the CasparCG Flash templates and Template Generator extension installed. If you’re on Flash CC you need this package, which has a ZXP version of the extension (you can make this yourself in Extension Manager CS6): CasparCG Template Generator 2.0.1b1
In Flash we’re going to make a new document using the CasparCG 1080_25 template. This sets us up with a few layers to start with.
Next, we want to import the movie as an embedded movie (not as a playback widget). This is done in the File -> Import menu. You can then drag it into your stage, and you’ll get asked to expand the sequence to support it. Accept its offer and you should be able to hit Enter and see your animation play.
You can now drop in your text objects. Make sure they’re set as Dynamic Text in the properties – you can write what you like in them for now. Give them instance names (f0, f1, etc is CasparCG Client’s default). Don’t forget to embed the fonts you’ll be using if they’re non-standard!
I find it helpful to group together similar objects – grab both your text lines and make a new clip from these. You can now shuffle them around, make a keyframe, add an Alpha colour effect set to 0%. Now right click the timeline after your keyframe, add motion tween, move 25 or so frames along and set alpha to 100%. You’ve now got a nice fade in! Repeat on the other end by simply changing the values on the right frames. I’ve chucked a green background in here too, just to make sure my edges are nice and clear for chroma keying. You’ll note I’ve made a few mistakes with timing (namely my clip is too long – this is just a minor operational gripe, though).
Last but not least let’s make this stop when the intro is done, so we can hold it as long as we like before dismissing it with the outtro. We also want to stop it looping. To do this, simply make a new keyframe on the actions layer, right click it and click Action. Type “stop();” (without quotes) into the text box that appears. This makes playback stop – in CasparCG Client you can hit Next to resume playback. Add a keyframe at the end with the same and you’re good to export.
Edit: But wait! If you’re using this in a capacity where you want transparency, you may run into issues. Flash doesn’t do alpha very well and can end up rendering a black box around your content. To fix this just deselect everything on your stage so you’re seeing the document properties window, and then go to Actions. Enter: “this.cacheAsBitmap=true;” without the quotes.
Exporting to a Flash Template is done via the Template Generator. Set your name and email address, and hit the button. You’ll get a .ft file generated which you can drop in CasparCG Server’s templates folder.
Fire up the server and client, find your newly created template, assign your variables and away you go! Hit play to play it, and next to step through to the outro.