A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/facebook/360-Capture-SDK below:

facebookarchive/360-Capture-SDK: A developer focused sample SDK that allows game and virtual Reality devs to be able to easily and quickly integrate 360 photo/video capture capability into their game apps.

FBCAPTURE SDK 2.25 DOCUMENTATION FBCAPTURE SDK 2.2 DOCUMENTATION

See the LICENSE file.

  1. Hardware AND Software Compatibility
  1. Unity Full Sample Project Download: https://github.com/facebook/360-Capture-SDK/tree/master/Samples/Unity

  2. FBCapture SDK 2.2 Full Source Code: https://github.com/facebook/360-Capture-SDK/releases/tag/v2.20

FBCAPTURE SDK 2.2 Unity Integration Guide
  1. Integration Guide

    1. DLL copy
      1. Download attached DLLs in this page and copy them into plugin folders in the Sample Project
    2. Unity package import
      1. Import FBCapture SDK Unity package into your Unity project
      2. Drag and drop FBCapture prefab into your scene
      3. That's it. Now you're ready to go for video and image capture
  2. Folder Structure

    1. Scripts
      • DisplayDepth.cs: Rendering depth texture with the ConvertDepth material
      • FBCaptureSDK:* Main script calling FBCAPTURE SDK’s APIs
    2. Shaders
      • ConvertDepth: Reading from Unity Depth texture and converting to RGB-D inverse depth
      • CubemapDisplay: Generating cubemap texture
      • CubemapToEquirect:* Generating equirect texture from cubemap texture
    3. Prefab
      • FBCapture: Capturing video and screenshot for 360, non-360 and RGB-D. It’s everything you need to put in the scene for capturing video and screenshot.
  3. FBCapture Prefab and Interface on Unity Inspector FBCapture prefab handles all encoding and screenshot sessions with “FBCapture.dll”.

4. FBCapture SDK LOG SAVE PATH

LOG file will be saved in "%LOCALAPPDATA%\FBCapture" and the log file will be named with process name and timestamp to have unique log file per process. (ex. %LOCALAPPDATA%\FBCapture\FBCaptureSDK_processname_timestamp.txt) If you want to change save path or naming convention, please refer to Log.cpp file.

5. FBCapture SDK Calling Conventions (Sample Unity C# Integration Code)

1. Set up Session APIs needed to be called once at start encoding

(1) Check capabilities

private static extern FBCAPTURE_STATUS fbc_getCaptureCapability();

It will check hardware and software capabilities. Currently it checks windows version(Win 7 SP1 or greater), Graphics driver version(Nvidia: 375.95 or newer, AMD: Radeon Software Crimson 17.1.1 or later) and Graphics manufacturer(AMD, NVIDIA). If your specs doesn't meet SDK's minimum specs, it will return failure reason and won't start encoding.

(2) Set configurations depending on capture types

// Live configurations private static extern FBCAPTURE_STATUS fbc_setLiveCaptureSettings( int width, int height, int frameRate, int bitRate, float flushCycleStart, float flushCycleAfter, string streamUrl, bool is360, bool verticalFlip, bool horizontalFlip, PROJECTIONTYPE projectionType, STEREO_MODE stereoMode);

// VOD configurations
private static extern FBCAPTURE_STATUS fbc_setVodCaptureSettings( int width, int height, int frameRate, int bitRate, string fullSavePath, bool is360, bool verticalFlip, bool horizontalFlip, PROJECTIONTYPE projectionType, STEREO_MODE stereoMode);

// Screenshot Configurations private static extern FBCAPTURE_STATUS fbc_setScreenshotSettings( int width, int height, string fullSavePath, bool is360, bool verticalFlip, bool horizontalFlip);

// Preview configurations private static extern FBCAPTURE_STATUS fbc_setPreviewCaptureSettings( int width, int height, int frameRate, bool is360, bool verticalFlip, bool horizontalFlip);

It will configure encoding or screenshot properties. In the Unity sample, we can easily set them on inspector of Unity editor.

(3) Set VR audio device in used

private static extern FBCAPTURE_STATUS fbc_setMicAndAudioRenderDeviceByVRDeviceType(VRDeviceType vrDevice);

It will set VR audio device that FBCapture SDK will capture for output(headphone) and input(microphone).

(4) Enable audio capture

private static extern FBCAPTURE_STATUS fbc_setAudioEnabledDuringCapture(bool enabled);

It will enable audio capture during video capture. If you don't want to capture audio(input/output), then you need to pass 'false'.

(5) Start capture depending on capture types

// Start Live private static extern FBCAPTURE_STATUS fbc_startLiveCapture();

// Start VOD private static extern FBCAPTURE_STATUS fbc_startVodCapture();

// Start Screenshot private static extern FBCAPTURE_STATUS fbc_startScreenshot();

// Start Preview private static extern FBCAPTURE_STATUS fbc_startPreviewCapture();

It will start encoding or screenshot session with creating resources and separate threads needed for session in dll.

2. Pass rendered Textures for encoding

It will pass rendered textures to FBCapture SDK and video will be generated based on the textures.

It will pass rendered texture to FBCapture SDK and screenshot will be generated based on the texture.

3. Stop Encoding API needed to be called once at stop

private static extern void fbc_stopCapture();

It will flush input textures stacked on buffer and create video file with audio and video muxing. And then metadata for projection type, stereo mode and stitching software name will be injected for 360 VOD video, but only stitching software name's metadata will be injected for non 360 VOD video. At last, it will release all created resources and cleanup threads.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4