Showing posts with label mpegstreamclip. Show all posts
Showing posts with label mpegstreamclip. Show all posts

Friday, 22 March 2013

Screen Recording Project - timelapsed

So, I would like to record a whole working week, or maybe more, of work at my computer, but how?

Well, first off I think I want it to be time-lapsed. I think I would like 1 working day compressed into 1 minute:

1 working day = 8.5 x 60 = 510 minutes = 30600 seconds
1 minute = 60 seconds = 60 x 24fps = 1440 frames
30600 / 1440 = 21.25 seconds between each frame

Well, Quicktime does come with screen recording capabilities, but these are a bit hefty on the old processor/ram/disk space.

What I will probably do is make an Automator workflow which takes a screenshot every 21 seconds. Here it is:
Automator workflow which takes a screenshot every 22 seconds
By default "Take a screenshot" saves a file in a location but calls it something. For the next screenshot it overwrites the first. I had to use variables to change this.

Firstly I got a location variable and this contained the folder to save it to. I then got the time variable. I then made a text variable and dragged both of these other variables in, with a "/" in between. I dragged this variable into  the "Save to:" box. It then saves it to the location folder, with the name of the time it was taken.

I think you also need the "Get Value of Variable" before so it updates the variable "time".

Each screenshot is about 1.7MB:

1.7MB x 1440 = 2448MB per day.

I converted this into a quicktime movie using MPEGStreamClip  and it made a 17MB file! (15fps). Sorted!

To anonymise reducing it by 1/3rd (600 x 400 px) seems to render the text unreadable!


After a while of running this I got slightly annoyed at the screencapture noise. To run it silently I figured changing the preferences for it would work. Nope. Next I found the plist file:
com.apple.screencapture

But firstly it didn't exist, and next I couldn't find full documentation of it! Just the simple stuff like file format and location.

The command line for it is:

screencapture -x filelocation/filename.png

So I modified the automator workflow to use this command line instead of the screencapture object. It took 5 mins to work out how to access the variables in Run Shell Script but here's how I did it:
Screencapture workflow with automator using command line argument and passing variable
To access variables I think the only way is to pass them into the run shell script. I found this helpful page on it

The main points were:

  1. Make sure you ignore the inputs unless you really need them.
    1. i.e. I only really needed the full path name and filename combined so this was only passed into the "Run Shell Script"
  2. To use the passed variable you type:
    1. "$@"
      1. I don't think you need the speech marks but I needed them in the shell script
Now I'm thinking about it I don't think I need the workflow at all, could just run it using a simple shell script. But I think Automator is a nice way of introducing people to programming.

Sunday, 18 March 2012

testing MatchMover 2012 and Maya with camera tracking

So, i've been testing MatchMover to see how good it is with camera tracking. I've just done the tutorial, but with some footage taken in the garden.

After my first two tries with "automatic tracking" it didn't work too well. It can't seem to handle the HD footage with the compression on it. The amount of pixels per compressed block seems to put the tracking points off a little. One idea might be to make the resolution smaller, with the idea that this will make the compressed areas pixels themselves, and so not cause any confusion.

On exporting to Maya I noticed it did not put the image in the background of the camera. It came up with this error:

// Error: Unable to load the image file, '/Users/monkey/Desktop/Movies/DSCF0.AVI', for rzImagePlane1

For a start, the movie file was named: DSCF01525.AVI, and not DSCF0.AVI. Second of all it is a movie file! So, to fix:


  1. In the Viewport, select Panels > Perspective > rzCamera1
  2. Select the camera
  3. Go to the rxImagePlane1
  4. Change Type to "Movie"


Done.

I noticed when put into Maya the image slips a lot, certainly a lot more then in MatchMover. The only reason I can see for this is the fact I'm using a widescreen movie file, and the camera setup might not be the same.

The first thing I tried was to increase the frame offset. I changed it to '1' and it made a little difference, but still wasn't perfect. My next thing to try is to change the AVI into an image sequence. Thirdly, I'll have to look into the 'pixel aspect ratio'.

Now, the question of how to convert to an image sequence?

Answer: use MPEGstreamclip 1.9 and upwards. Cheers.

After converting to a sequence, I matchmover'd it and put it into maya. Perfect. It looked as good as it did in MatchMover. I can only assume it was to do with things like 'pixel ratio' and frames per second? Anyway, from now on I shall only use image sequences.