Easily stream your Vimeo videos into Unity or record and publish out to Vimeo.
This plugin has two major features:
Record video (including 4K, 360, stereo 360) and upload to your Vimeo account.
Stream video (4K, 360, stereo 360) from your own Vimeo account into Unity.
Download the most recent .unitypackage
from the latest releases and open it up.
The Vimeo Recorder is built on top of Unity's native MediaEncoder
to make it simple to capture your Unity scene and share to Vimeo. Features include:
2017.2
or higher.We provide a simple demo scene in the Vimeo/Scenes
folder called Recorder
. The Recorder
scene contains the prefab, [VimeoRecorder]
. Select it and in the component inspector you'll see the recording settings.
In order to add the Vimeo recorder in your own Unity scene simply go to the menu, GameObject > Video > Vimeo Recorder
. You can also right-click in your Game Hierarchy and go to Video > Vimeo Recorder
.
Sign into your Vimeo account by clicking Get Token
. After you authorize Unity with Vimeo, copy the token, paste it into the Vimeo Token
field, and click Sign into Vimeo
.
Once you're signed in, all you have to do is click the Start Recording
button. When you're done recording, click Finish & Upload
.
Probably the most powerful part about this plugin is that you can control recording via a script. Below is a simple code snippet on how you would do that.
using UnityEngine;
using Vimeo.Recorder;
public class CustomRecorder : MonoBehaviour {
VimeoRecorder recorder;
void Start() {
recorder = gameObject.GetComponent<VimeoRecorder>();
recorder.defaultVideoInput = Vimeo.Recorder.VideoInputType.Camera;
recorder.defaultResolution = Vimeo.Recorder.Resolution.x2160p_4K;
recorder.defaultAspectRatio = Vimeo.Recorder.AspectRatio.x16_9;
recorder.frameRate = 60;
recorder.recordMode = Vimeo.Recorder.RecordMode.Duration;
recorder.recordDuration = 5; // in seconds
recorder.autoUpload = true;
recorder.videoName = "My Custom Video";
recorder.privacyMode = Vimeo.Services.VimeoApi.PrivacyModeDisplay.HideThisFromVimeo;
recorder.autoPostToChannel = false;
recorder.OnUploadComplete += UploadComplete;
recorder.BeginRecording();
}
void UploadComplete()
{
Debug.Log("Uploaded to Vimeo!");
// Now you could change the scene and then immediately queue up another recording.
// ...
// recorder.BeginRecording();
}
}
In this sample, CustomRecorder
is assuming that it is a part of the same GameObject as the VimeoRecorder
. All the settings that are avaiable in the editor GUI can be controlled via code.
The SDK comes with the following example Unity scenes in the Vimeo/Scenes
folder. Please note these demos don't work out of the box. You will need to authorize your Vimeo account and select your own video test.
Player - Demos simple video streaming inside of a 3D environment. |
360Player - Demos how to stream 360 videos from Vimeo (supports 3D / stereoscopic video). |
CanvasPlayer - Demos how to build a canvas-based player with basic playback controls. |
VideoPlayer
behind the scenes.5.6.0
or higher.Open up your Unity scene or create a new one. For streaming any Vimeo video, you will be using the VimeoPlayer
component. There are two ways to setup the Vimeo player in Unity:
The easiest way to get started is to either drag in one of the prefabs from Vimeo/Resources/Prefabs
or simply right-click on your scene and the Vimeo Player from the Video
menu:
If you are setting up your own scene and want to specify your video "screen" and audio outputs, you can add the Vimeo Player
component to your GameObject.
Sign into your Vimeo account (or create one if you haven't already) and make sure you have some videos uploaded.
Vimeo Token
field in Unity.Vimeo Video URL
field.Video Screen
field. Currently, we only support Mesh and RawImage GameObjects.Audio Output
is optional. If left empty, a new audio object will be attached to the video screen.You're all set! Press play and you should now see your Vimeo video streaming in your app.
If you're looking for an even more robust streaming and/or recording solution, we have integrated into AVPro's Video and Movie Capture plugins.
After installing either of AVPro's tools, the Vimeo plugin will automatically detect AVPro and a new option will appear.
The Vimeo Player
component will now show a Video Player
dropdown letting you to switch between Unity's native video player and AVPro Video
. After selecting AVPro, you will need to assign their Media Player
to the Vimeo Player component. Now when you run Unity, the Vimeo Player will automatically set the URL in the Media Player
.
The Vimeo Recorder
component will now show a Video Encoder
dropdown letting yo uswitch between Unity's native Media Encoder
and AVPro Movie Capture
. Select AVPro Movie Capture and assign the Capture component. Now when you record with AVPro's tools, Vimeo will automatically upload the video after it is finished recording.
For questions and support, ask on StackOverflow. If you found a bug, please file a GitHub issue.
Make pull requests, file bug reports, and make feature requests via a GitHub issue.
Big thanks to the Unity teams building MediaEncoder, GenericFrameRecorder, SkyboxPanoramicShader, and DepthKit