Google Hangout Cam Switcher

Switching between webcam and desktop view in Google Hangouts is a real PITA, and it can be distracting from what’s being shown or talked about, so here’s a possible solution (for OS X only).

Download CamTwist

Download the stable version of the CamTwist application:

http://camtwiststudio.com/download/

After following the package installer, CamTwist.app will be located at:

~/Applications/CamTwist/CamTwist.app

Settings

It is necessary to tweak some of the CamTwist settings for high quality screen casting.

Resolution

First, find out the resolution of your desktop by going to System Preferences... and choosing Displays. Change the “Resolution:” radio button to Scaled and take note of the dimensions.

The default dimensions for an Apple Thunderbolt Display are 2560 x 1440. If you’re using a Macbook Retina, you must hover over the preview icon to see the resolution number displayed to the left under the image of a laptop; for the “Default” resolution setting, it will say "Looks like 1440 x 900".

These are the numbers we need to use for “Video Size” within CamTwist. So, open CamTwist.app and go to Preferences... > General > Video Size, then click the select box and choose Custom. Two new inputs will appear; enter the numbers retrieved from the previous step.

You may also increase or decrease the “Frame rate:”, but the default of 15 should be fine.

Restart CamTwist.app after changing the “Video Size” setting.

Setups

We need to create the two CamTwist “setups” that we will be switching between.

Webcam

To create the “Webcam” setup, open CamTwist.app and under the “Step 1:” column double-click Webcam.

The “Step 3:” column should now have Webcam under “Effects in use”.

Click “Save Setup” under “Step 3:”, and name it Webcam.

Make sure the spelling is exactly “Webcam”.

Desktop

To create the “Desktop” setup, open CamTwist.app and under the “Step 1:” column double-click Desktop+.

The “Step 3:” column should now have Desktop+ under “Effects in use”.

In the fourth “Settings” column, check the “Show mouse pointer (simulated)” checkbox.

Click “Save Setup” under “Step 3:”, and name it Desktop.

Make sure the spelling is exactly “Desktop”.

Create Services

To be able to control CamTwist using global keyboard shortcuts, we need to create two “Services”.

Webcam Service

Open Automator.app and choose to create a new “Service”.

Near the top of the window, where it says “Service receives selected”, change text to no input.

In the leftmost sidebar, choose Utilities, then double-click Run AppleScript.

Replace the “Run AppleScript” step with the following:

on run {input, parameters}
	
	tell application "CamTwist"
		loadSetup "Webcam"
	end tell
	
	return input
end run

Now do File > Save..., and when it asks “Save service as:”, enter CamSwitchWebcam.

Desktop Service

Within Automator.app, do File > New and choose to create a new “Service”.

Near the top of the window where it says “Service receives selected”, change text to no input.

In the leftmost sidebar, choose Utilities, then double-click Run AppleScript.

Replace the “Run AppleScript” step with the following:

on run {input, parameters}
	
	tell application "CamTwist"
		loadSetup "Desktop"
	end tell
	
	return input
end run

Now do File > Save..., and when it asks “Save service as:”, enter CamSwitchDesktop.

Service Locations

By design, these “Services” are saved to:

~/Library/Services/CamSwitchWebcam.workflow
~/Library/Services/CamSwitchDesktop.workflow

Global Keyboard Shortcuts

Go to System Preferences... and choose Keyboard > Shortcuts > App Shortcuts.

Hit the + to add a new shortcut. For “Menu Title:”, enter CamSwitchWebcam. You may set the “Keyboard Shortcut:” to anything of your choosing; perhaps Control-Option-W. Finally, click “Add”.

Hit the + again to add another shortcut. This time, for “Menu Title:”, enter CamSwitchDesktop. Set the “Keyboard Shortcut:” to something like Control-Option-D.

Google Hangout

To use the CamTwist video output in a Hangout, we can try two methods:

  1. Change the input source within Hangouts to the virtual device
  2. Share the CamTwist “Preview” window (this works better)

Method #1: Change Input Device

Before joining a Google Hangout, launch CamTwist.app. Then, in the Hangouts window, click the gear icon in the top right corner; in the popup that appears, change “Video” to CamTwist.

You may ignore the second CamTwist (2VUY) option.

Limitations

In addition to being a bit laggy, this first method does not scale proportionally to the size of other viewer’s Hangouts windows, and so is inferior to the next method.

Method #2: Share the Preview Window

In the CamTwist menubar, select View > Preview. This will open a large preview window.

Within the Hangout, click the three cascading dots and choose “Share screen”.

In the window that pops up, select Preview and then Share.

Side Effects

The only real side effect of this method is that the “Preview” window must always be open in the background (the window cannot be minimized or hidden, but it may be dragged off-screen) and the chrome at the top of the window is visible within the broadcast (because the entire “Preview” window itself is being shared).

These are fair tradeoffs for less lag on the stream, and proportional scaling for viewers, making this method the clear winner.

Using this method it may make sense to increase the “Frame rate:” to something closer to 30 in the CamTwist settings because the CamTwist stream is now only local to its own preview window. I’m not sure if this actually makes a difference however.

Wrapping Up

Now, while in a Google Hangout, you should be able to easily switch between Desktop and Webcam modes, simply by hitting the hotkeys you set earlier (Control-Option-W and Control-Option-D).

Note About Hotkeys

I’ve found the Control-Option shortcuts originally recommended actually don’t fire within certain applications, so you may find that you need to change the shortcuts in System Preferences... > Keyboard > Shortcuts > App Shortcuts to something else that works better for you.

Troubleshooting

CamTwist may open with no visible windows; to show the main window, click the dock icon and then in the menubar choose View > Main Window.

If CamTwist is having trouble opening, it may be because a previous version was installed. In this case, just blow away (delete) the .plist settings file, located at:

~/Library/Preferences/com.allocinit.CamTwist.plist

1 Like

Other useful applications for screen sharing and presenting:

Update from CamTwist developer: http://camtwiststudio.com/ctforums/viewtopic.php?f=3&t=1354#p5857