There’s an app for that

We recently installed two Projectiondesign cineo32 projectors at Hocus Focus, and the lamps in these need to be on for about an hour before the light stabilizes, which means you have to keep them turned on during the night if you’re coming in to start grading first thing in the morning.

When reading the documentation of the projectors, I was surprised to find remote control support over IP, and when I mentioned it to my colleague Shanon, he said the best thing would have been an iPhone app.
I think it was more of a joke from his side, but I took it as a challenge and decided to make it.

Technically, it’s a web app hosted on an in-house web server, which communicates with the projectors via. simple socket connections. It’s not very complex in any ways, but it sure will save hours on the lamps.

I can’t, for obvious reasons give you access to the app, but if you want to do something similar for your own facility, just send me an email. There’s an app for that.

Online Reel Browser (and a couple of nice stacks)


I’ve parsed Mistika reels to web sites before, and on the Hocus Focus intranet, we can read group names and lengths, and notes for any active Mistika project on our SAN.
But how cool wouldn’t it be to see the actual timeline in a browser? I started the ORB (Online Reel Browser) as an experiment, but now that the basic platform is up and running, I realize this could be a great way to share stacks and reels with other people!

There is still some work to be done, and these are probably the main points:

  • Set names and colors of all effects.
  • Test in multiple browsers.
    My primary browser is Opera 11, but it seems to work well in recent versions of Firefox and Chrome as well.
  • Add metadata for each stack.
    Name, uploader, time, description etc. would be nice…
  • There are probably some bugs.

Meanwhile, have a look at the two stacks below and feel free to upload your own as well. And let me know what you think =)

Rolling shutter fix
Big, heavy and time-consuming stack, but if you really need to remove rolling shutter, this is a way. The values (Time-Time) are set in increments to counter the sensor lag. The values are set for my EOS 550D, so you might need to change them for other cameras. Make sure you render each Timewarp individually (at least that was needed in the Mistika version I made it in).

Flicker filter/light leveler
Great for evening out stop-motion or auto-exposed footage. Make sure the lowest feedback is only on the first frame (this will reset when you change the length of the dummy group).

Mistika particle effects

With the holiday season coming up, I know you’ll all need some sparkle and glitter for those Christmas themed films. That’s why I decided to make a tutorial on this trick I came up with a couple of years ago. It involves animating the shape-input of a BrushStroke effect, and if you watch the whole thing you’ll also see it combined with Feedback effects.

PS: On our current workstations (xw8400 with Quadro FX 5500) the BrushStroke does not render in hardware mode, and I have to turn it of i mConfig -> Render options to use the effect. Please let SGO know if you have problems as well, as this bug has been around since Mistika 4.

UPDATE: According to Roman, the bug is now fixed for future releases.

Batch export films with EMP afterscripts

When using auto as render name, all the EMP afterscripts will name files after the first group in the render. “First” in this case means what’s stored first in the .env file, which may or may not be the first in time, so basic usage is simply to make one group for each film.

Mistika .rnd lookup

I just found a way to look up the .rnd file for a selected clip in the timeline. The script will copy the stack for a file to your Mistika clipboard. Download link below the video.

Download rnd_Lookup_100805

This script depends on the EMP package. Get the latest release from here. Put this script in the Tools folder to have it accessible from the EMP launcher.

linkSearch.py – New EMP script

This script lets you search for links pointing to a specific location. It will search EXT_MEDIA, your audio dir and your movies dir. By default, it searches in all projects, but you can also choose to search current project only.

My initial purpose for this was to check if any projects depended on a folder I was cleaning up.

Download linkSearch_100613

This script depends on the EMP package. Get the latest release from here.

EMP traceLinks patch

Todays patch fixes some bugs when handling stills and movie clips with traceLinks.py. This also required a few extra lines in the mistika.py module, so you’ll have to update that as well.

Just extract the archive to your emp directory and overwrite the existing files.

Download patch 100606

EMP release 0.2

As some of you may now, I’ve written quite a few scripts over the last couple of years for making my life with Mistika easier. The tools range from Final Cut to Mistika xml conform, media files consolidating and an audio normalize calculator, to afterscripts for making various compressed movie formats easily. I recently began the process of cleaning those up a putting them into a single package – EMP, or Effcient Mistika Project.

Version 0.2 is now ready, and all you have to do is extract the emp_0-2.tgz to a permanent location and run empSetup.py in the Tools directory. You may have to do that from a terminal (but only as your Mistika user), and as always with these kind of things, I advice you to backup your MISTIKA-ENV folder first. Some scripts have destination variables that needs to be set (see below), and some settings can be set in ~/.emp/emp.py

An EMP-button will be created in your App-panel (or Extras in 5.0) and all afterscripts will be listed in the render panel.

Download EMP 0.2

Here comes a short description of the various files included:

Afterscripts

emp_Move.py

Move’s the rendered MOVIE file to a location specified in the outDir variable

emp_MPEG1_underscanned.py

Makes a 640×360 MPEG1 file using the whole image frame.
Use separate audio when rendering.
Set the outDir variable to specify output directory

emp_QT-MPEG4.py

Makes a quicktime MPEG4 in the current resolution.
Use separate audio when rendering.
Set the outDir variable to specify output directory

emp_QT-MPEG4_640x360.py

Makes a 640×360 QT MPEG4 file.
Use separate audio when rendering.
Set the outDir variable to specify output directory

emp_iPhone.py

Makes a iPhone compatible video file.
Use separate audio when rendering.
Set the outDir variable to specify output directory

Tools

convertForMistika.py

Converts audio or video input and converts it to a Mistika-friendly format.
This can also be used as a droplet. Put a shortcut on your desktop, and you’ll be able to drag media files directly onto it to convert.

empSetup.py

This sets up all files and settings for the emp install

jsClean.py

This will check all .js files for the project against .env files in the projects DATA folder (subfolders are not checked) and move every file not in use to a trash folder. The default path is a folder called trash in your JS folder, but this can be changed in ~/.emp/emp.py

traceLinks.py

Will trace the links for a selected clip in a Mistika timeline step by step. Just test it. Nothing scary about this one.

inOtherProjects.py

Well look for references to this project in all other projects, so you can know if it’s safe to delete this project without screwing up another one.

normalize.py

Will report the peak audio level of a selected clip.

xmlconf.py

This is a very basic Final Cut .xml -> Mistika .env utility. Nowhere near stable, but definitely a time saver.
Just select an xml file and then a source folder. You can add a media source folder each time you click OK, and when all are added, click Cancel to start the actual conform.

Read groups in a Mistika timeline with PHP

Here’s some code to read top-level groups from a Mistika timeline (.env-file). If all films are stored in separate groups with names, this snippet will list all films and their length (in both 25 and 24 frames TC).

Will produce something like this:

  • Test.env
    • Film one 00:00:20:0025 00:00:20:2024
    • Film two 00:00:20:0025 00:00:20:2024
function framesToTC($frames, $framerate) {
	
	
	$hours = floor( $frames / ( $framerate * 60 * 60 ) );
	$framesleft = $frames - ($hours * $framerate * 60 * 60);
	
	$minutes = floor( $framesleft / ( $framerate * 60 ) );
	$framesleft -= ( $minutes * $framerate * 60 );
	
	$seconds = floor( $framesleft / ( $framerate ) );
	$framesleft -= ( $seconds * $framerate );
	
	$tc = sprintf("%02d:%02d:%02d:%02d", $hours, $minutes, $seconds, $framesleft );
	
	return $tc;
}

function groupsInEnv( $envAbsPath ) {
	$groups = array();
	$balance = 0;
	$envH = fopen($envAbsPath, 'r');
	while (!feof($envH)) {
		$line = fgets($envH);
		if ( strpos($line, "Group(") === 0 && $balance === 1 ) {
			$waitForName = 1;
		}
		elseif ( strpos(ltrim($line), "n(") === 0 && $waitForName == 1 ) {
			$groupName = substr(trim($line), 2, -1);
			$waitForName = 0;
			$waitForLength = 1;
		}
		elseif ( $waitForLength == 1 ) {
//                                $groups[$groupName] = substr(trim($line), strpos($line, "W("), strpos($line, ")", strpos($line, "W(")) - 1);
			$expLine = explode(" ", $line);
			$groups[$groupName] = substr($expLine[2], 2, -1);
			$waitForLength = 0;
		}
		$balance += substr_count($line, "(");
		$balance -= substr_count($line, ")");
	}
	fclose($envH);
	if ( count($groups) === 0 ) {
		$groups["Timeline has no groups"] = "N/A";
	}
	return $groups;
}
$project = $_GET['mistika'];
$dataDir = "/PROJECTS/$project/DATA";
$timelines = scandir( $dataDir );
$out = "<ul>";
foreach( $timelines as $timeline){
	if ( substr($timeline, -4) == ".env" ) {
		$out .= "<li>$timeline<ul>n";
		$films = groupsInEnv("$dataDir/$timeline");
		foreach( $films as $film => $filmFrames ) {
				$out .= "<li><b>$film</b>     ".framesToTC($filmFrames, 25).'<sup>25</sup>     '.framesToTC($filmFrames, 24).'<sup>24</sup></li>';
		}
		$out .= '</ul></li>'."n";
	}
}