GithubHelp home page GithubHelp logo

facebookarchive / 360-capture-sdk Goto Github PK

View Code? Open in Web Editor NEW
253.0 48.0 75.0 102.55 MB

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.

Home Page: https://github.com/facebook/360-Capture-SDK

License: Other

C++ 93.94% C 5.53% HLSL 0.54%

360-capture-sdk's Introduction

FBCAPTURE SDK 2.25 DOCUMENTATION

Release Note

  • Fixed creating DirectX device on wrong GPU at multiple GPU environment
    • There was bug picking wrong GPU to create DirectX device at multiple GPU environment. For example, when you have Intel, AMD and nVidia GPUs at one PC and one of monitors or VR devices are connected to AMD, then there was potential issue it creates the DirectX device on nVidia. But this version will fix the problem.
  • Fixed blank screenshot output in Unity sample
    • Because of wrong Unity render texture update cycle, it used to generate blank screenshot with just black color, but this version will fix the issue.

FBCAPTURE SDK 2.2 DOCUMENTATION

Release Note

  • RGB-D Capture Support
    • We're starting to support RGB-D capture for euqirectangular videos. You will be able to see recorded RGB-D video with RGB-D video player.
  • Metadata Injection for recorded 360 video.
    • Another file named “xxxx_injected.mp4” will be generated for metadata injected video file. You can upload 360 video to FB or Youtube without any additional work.
  • More simple APIs and integration process
    • All threads for encoding and screenshot are now managed in FBCapture SDK
    • Single APIs will handle start and stop encoding
  • Webcam Capture Support with overlay
    • You're able to capture webcam and overlay it on the captured video
  • Windows 7 Support (SP1 or greater)
  • 32 Bit Support
  • Bug fixes, performance improvement and memory optimizations
    • Improved many parts of performance including async texture encoding, memory, and stability on live and vod we got on FBCapture SDK 1.0

LICENSE

See the LICENSE file.

Compatibility

  1. Hardware AND Software Compatibility
  • NVidia
    • GPU: NVIDIA Quadro, Tesla, GRID or GeForce products with Kepler, Maxwell and Pascal generation GPUs.
    • NVidia Windows display driver: 375.95 or newer
  • AMD
    • GPU: AMD GPUs supporting following driver
    • AMD Windows display driver: AMD Radeon Software Crimson 17.1.1 or later
  • OS
    • Windows 7 SP1 or Greater

Download

  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”.

    • 360 Capture Camera
      • The cameras will be used for generating cubemap, equirect and depth textures for 360 capture
    • Capture Options
    • Capture Mode: You're able to select capture mode for 360 capture and non 360 capture
    • Capture Texture Format: You're able to select texture format for RGB and RGB-D captures
    • Projection Type: You're able to select projection type for 360 (EQUIRECT, CUBEMAP) capture
    • Video Capture Type: You're able to select video capture type for VOD and Live streaming
    • Capture Hotkeys
      • Hotkeys to start or stop video encoding and screenshot
    • Live Video Settings
      • Live Video Preset
        • CUSTOM: Custom resolution and bit rate
        • 720P: 1280 x 720, 2 megabit per second
        • 1080P: 1920 x 1080, 4 megabit per second
        • 4K: 4096 x 2048, 10 megabit per second
      • Live Video Width: Set video resolution for width
      • Live Video Height: Set video resolution for height
      • Live Video Frame Rate: Set live video FPS
      • Live Video Bit Rate: Set live video bit rate
      • Live Stream Url: Set live stream key for streaming server
    • VOD Video Settings
      • Vod Video Preset
        • CUSTOM: Custom resolution and bit rate
        • 720P: 1280 x 720, 2 megabit per second
        • 1080P: 1920 x 1080, 4 megabit per second
        • 4K: 4096 x 2048, 10 megabit per second
      • VOD Video Width: Set video resolution for width
      • VOD Video Height: Set video resolution for height
      • VOD Video Frame Rate: Set vod video FPS
      • VOD Video Bit Rate: Set vod video bit rate
      • Full Vod Save Path: Set video save path for recorded video including file name (file format should be mp4 or h264)
    • Screenshot Settings
      • Screenshot Preset
        • CUSTOM: Custom resolution
        • 720P: 1280 x 720
        • 1080P: 1920 x 1080
        • 4K: 4096 x 2048
      • Screenshot Width: Set screenshot resolution for width
      • Screenshot Height: Set screenshot resolution for height
    • Preview Video Settings
      • Preview Video Preset
        • CUSTOM: Custom resolution and bit rate
        • 720P: 1280 x 720, 2 megabit per second
        • 1080P: 1920 x 1080, 4 megabit per second
        • 4K: 4096 x 2048, 10 megabit per second
      • Preview Video Width: Set preview video resolution for width
      • Preview Video Height: Set preview video resolution for height
      • Preview Video Frame Rate: Set preview video FPS
      • Preview Video Bit Rate: Set preview video bit rate
      • TODO: The function is implemented in FBCapture SDK, but the Unity sample doesn’t include this feature. We will update this feature in Unity sample later.
    • Shader Settings
      • The shaders will generate cubemap, equirect textures with Surround Capture Cameras.

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

  • API needed to be called every frame - Video private static extern FBCAPTURE_STATUS fbc_captureTexture(IntPtr texturePtr);

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

  • API needed to be called once after creating rendered texture - Screenshot private static extern FBCAPTURE_STATUS fbc_saveScreenShot(IntPtr texturePtr);

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.

360-capture-sdk's People

Contributors

cg439 avatar grancia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

360-capture-sdk's Issues

Failed to create encoder component

Every time I try to start capturing the log file shows me this message "Failed to create encoder component", can someone please tell me where should I see a full documentation in order to be able to use the SDK properly. I can't face where the problem is even thought I did all steps as I saw here:
https://github.com/facebook/360-Capture-SDK/blob/master/README.md.

Here is my log:
[ 2017-11-09 08:41:08 ][LOG]: Folder is already existed
[ 2017-11-09 08:41:08 ][LOG]: It's invalid texture pointer: null
[ 2017-11-09 08:41:08 ][LOG]: Audio device name: : Rift (Intel(R) Display Audio)
[ 2017-11-09 08:41:08 ][LOG]: Audio device name: : Speakers/Headphones (Realtek High Definition Audio)
[ 2017-11-09 08:41:08 ][LOG]: Audio device name: : Headphones (Rift Audio)
[ 2017-11-09 08:41:08 ][LOG]: Found Rift headphone. We're using Rift headphone as audio intput/output source
[ 2017-11-09 08:41:08 ][ERROR]: Failed to create encoder component
[ 2017-11-09 08:41:08 ][ERROR]: Initial configuration setting is failed

Thanks in advanced.

Bitrate is low

Are there plans to allow for higher bitrate in a setting?

The current output has really low bitrate and the compression artifacts are extremely noticeable.

Video Pauses During Encoding

Hi,

I am using Unity 2017.4.0f1 and Windows 10. The encoder works for about 9 seconds before it just video pauses, and it doesn't say that there's an error. What can I do to ensure that this does not happen?

Best,
Ciera

integration in other Apps

Hi there,

Thanks for all your work and support! I have one short question. Is it possible to integrate this into Facebook Spaces? I would like to record 360° of a conversation in order to get a video file that i can upload on youtube and see in 360°. Unfortunately, spaces lets you only record and stream in "flat" mode

thanks for your help,
Chris

Switch audio input

HI Dear!

Now the audio source is the default speaker sound, Can I customize the audio input source, such as from the line in interface or microphone interface input.

Thank you.
Best regards.

0 byte Video - Unable to record Videos

As a separate from the other issue as it is clearly a different problem. I built the FBCapture.dll from the master branch using Visual Studio 2015 and the 4 linked .lib libraries.

grafik

No matter what settings I am using, I am unable to get any video recording. Neither in 2D nor 3D.

[ 2017-12-27 21:39:47 ][LOG]: Folder is already existed
[ 2017-12-27 21:39:47 ][LOG]: Added metadata for 360 recognition in FB
[ 2017-12-27 21:39:47 ][LOG]: Succeeded screen capture
[ 2017-12-27 21:39:47 ][LOG]: Screenshot has successfully finished
[ 2017-12-27 21:39:56 ][LOG]: Added metadata for 360 recognition in FB
[ 2017-12-27 21:39:56 ][LOG]: Succeeded screen capture
[ 2017-12-27 21:39:56 ][LOG]: Screenshot has successfully finished
[ 2017-12-27 21:40:02 ][LOG]: Added metadata for 360 recognition in FB
[ 2017-12-27 21:40:02 ][LOG]: Succeeded screen capture
[ 2017-12-27 21:40:02 ][LOG]: Screenshot has successfully finished
[ 2017-12-27 21:40:04 ][LOG]: Folder is already existed
[ 2017-12-27 21:40:04 ][LOG]: Video Codec info: NV_ENC_H264
[ 2017-12-27 21:40:04 ][LOG]: Bitrate:: 500000
[ 2017-12-27 21:40:04 ][LOG]: Device type: DirectX 11
[ 2017-12-27 21:40:04 ][LOG]: Set encode configurations successfully
[ 2017-12-27 21:40:04 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Microphone)
[ 2017-12-27 21:40:04 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Speakers)
[ 2017-12-27 21:40:04 ][LOG]: Audio device name: : Lautsprecher (Creative SB X-Fi)
[ 2017-12-27 21:40:04 ][LOG]: Audio device name: : SPDIF Out (Creative SB X-Fi)
[ 2017-12-27 21:40:04 ][LOG]: Can't find Rift audio device. Just try to use default audio device
[ 2017-12-27 21:40:04 ][ERROR]: Unexpected output channel count, expected stereo
[ 2017-12-27 21:40:04 ][ERROR]: Failed to start output audio client
[ 2017-12-27 21:41:47 ][LOG]: Folder is already existed
[ 2017-12-27 21:41:47 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Microphone)
[ 2017-12-27 21:41:47 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Speakers)
[ 2017-12-27 21:41:47 ][LOG]: Audio device name: : Lautsprecher (Creative SB X-Fi)
[ 2017-12-27 21:41:47 ][LOG]: Audio device name: : SPDIF Out (Creative SB X-Fi)
[ 2017-12-27 21:41:47 ][LOG]: Can't find Rift audio device. Just try to use default audio device
[ 2017-12-27 21:41:47 ][ERROR]: Unexpected output channel count, expected stereo
[ 2017-12-27 21:41:47 ][ERROR]: Failed to start output audio client
[ 2017-12-27 21:45:37 ][LOG]: Folder is already existed
[ 2017-12-27 21:45:37 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Microphone)
[ 2017-12-27 21:45:37 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Speakers)
[ 2017-12-27 21:45:37 ][LOG]: Audio device name: : Lautsprecher (Creative SB X-Fi)
[ 2017-12-27 21:45:37 ][LOG]: Audio device name: : SPDIF Out (Creative SB X-Fi)
[ 2017-12-27 21:45:37 ][LOG]: Can't find Rift audio device. Just try to use default audio device
[ 2017-12-27 21:45:37 ][LOG]: Silent status without any audio
... very often the same log ...
[ 2017-12-27 21:45:48 ][LOG]: Silent status without any audio
[ 2017-12-27 21:45:48 ][ERROR]: Muxing failed, error: : 203
[ 2017-12-27 21:50:51 ][LOG]: Folder is already existed
[ 2017-12-27 21:50:51 ][LOG]: Video Codec info: NV_ENC_H264
[ 2017-12-27 21:50:51 ][LOG]: Bitrate:: 500000
[ 2017-12-27 21:50:51 ][LOG]: Device type: DirectX 11
[ 2017-12-27 21:50:51 ][LOG]: Set encode configurations successfully
[ 2017-12-27 21:50:51 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Microphone)
[ 2017-12-27 21:50:51 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Speakers)
[ 2017-12-27 21:50:51 ][LOG]: Audio device name: : Lautsprecher (Creative SB X-Fi)
[ 2017-12-27 21:50:51 ][LOG]: Audio device name: : SPDIF Out (Creative SB X-Fi)
[ 2017-12-27 21:50:51 ][LOG]: Can't find Rift audio device. Just try to use default audio device
[ 2017-12-27 21:50:51 ][ERROR]: Unexpected output channel count, expected stereo
[ 2017-12-27 21:50:51 ][ERROR]: Failed to start output audio client
[ 2017-12-27 21:55:02 ][LOG]: Folder is already existed
[ 2017-12-27 21:55:02 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Microphone)
[ 2017-12-27 21:55:02 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Speakers)
[ 2017-12-27 21:55:02 ][LOG]: Audio device name: : Lautsprecher (Creative SB X-Fi)
[ 2017-12-27 21:55:02 ][LOG]: Audio device name: : SPDIF Out (Creative SB X-Fi)
[ 2017-12-27 21:55:02 ][LOG]: Can't find Rift audio device. Just try to use default audio device
[ 2017-12-27 21:55:02 ][ERROR]: Unexpected output channel count, expected stereo
[ 2017-12-27 21:55:02 ][ERROR]: Failed to start output audio client
[ 2017-12-27 22:00:35 ][LOG]: Folder is already existed
[ 2017-12-27 22:00:35 ][ERROR]: Invalid render texture pointer(null)
[ 2017-12-27 22:00:36 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Microphone)
[ 2017-12-27 22:00:36 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Speakers)
[ 2017-12-27 22:00:36 ][LOG]: Audio device name: : Lautsprecher (Creative SB X-Fi)
[ 2017-12-27 22:00:36 ][LOG]: Audio device name: : SPDIF Out (Creative SB X-Fi)
[ 2017-12-27 22:00:36 ][LOG]: Can't find Rift audio device. Just try to use default audio device
[ 2017-12-27 22:00:36 ][ERROR]: Failed to create audio file
[ 2017-12-27 22:00:36 ][ERROR]: Unexpected output channel count, expected stereo
[ 2017-12-27 22:00:36 ][ERROR]: Failed to start output audio client

No clear support for Unreal Engine

At the beginning of the description of the plugin it is said that it supports Unreal Engine.

Nevertheless, at the "How to integrate" section there is not clear instructions how to use it with Unreal Engine.

stream

Can this sdk privides push stream when Unity running and encoding? Thanks

Example Unity Project broken in Unity 2017.3

As posted in #30
the library does not work at all and even If I open the Sample Project from master it does not do anything

This are the errors from the FBCaptureSDK

[ 2018-01-02 20:30:29 ][LOG]: Folder is already existed
[ 2018-01-02 20:30:29 ][ERROR]: Invalid render texture pointer(null)
[ 2018-01-02 20:31:07 ][ERROR]: Invalid render texture pointer(null)

Win 10 x64 Educational
Nvidia Geforce 1080 TI

grafik

fbc_getCaptureCapability fails with AMD device when both AMD and NVidia cards present

I have both a GTX 1080 and an AMD Vega in my machine. My default adapter is the AMD Vega. When I call fbc_getCaptureCapability, the OS and graphics card checks succeed, and so does the initialization of encoder components, but it fails in EncoderMain::initSessionANDdriverCapabilityCheck because nvidiaDevice is true, and the encoder was created, but the device it was given was not the NVidia device. Hence, when it tries to initialize CNvHWEncoder in NVEncoder::initNVEncodingSession, Initialize() fails with NV_ENC_ERR_UNSUPPORTED_DEVICE.

Unity 2017.3 - Unable to Capture video: WAMDEIA_MUXING_FAILED

Thanks for releasing this! While I have been able to take 360 screenshot I have unfortunately not been able to capture video successfully. I'm just loading the included sample project, and attempting to capture video with the surround capture option with a cube map export.
Any help greatly appreciated!

This is the error output from Unity

Failed on muxing video and audio data. Please check FBCaptureSDK.log file for more information. [Error Type: WAMDEIA_MUXING_FAILED]
UnityEngine.Debug:Log(Object)
FBCapture.SurroundCapture:MuxingThread() (at Assets/EncodePackage/Script/SurroundCapture.cs:237)

This is the contents of the FBCaptureSDK log

[ 2018-01-12 00:24:52 ][LOG]: Folder is already existed
[ 2018-01-12 00:24:52 ][LOG]: Added metadata for 360 recognition in FB
[ 2018-01-12 00:24:52 ][LOG]: Succeeded screen capture
[ 2018-01-12 00:24:52 ][LOG]: Screenshot has successfully finished
[ 2018-01-12 00:24:58 ][LOG]: Folder is already existed
[ 2018-01-12 00:24:58 ][LOG]: Video Codec info: NV_ENC_H264
[ 2018-01-12 00:24:58 ][LOG]: Bitrate:: 5000000
[ 2018-01-12 00:24:58 ][LOG]: Device type: DirectX 11
[ 2018-01-12 00:24:58 ][LOG]: Set encode configurations successfully
[ 2018-01-12 00:24:58 ][LOG]: Audio device name: : Headphones (Rift Audio)
[ 2018-01-12 00:24:58 ][LOG]: Found Rift headphone. We're using Rift headphone as audio intput/output source
[ 2018-01-12 00:25:03 ][ERROR]: Muxing failed, error: : 516

Unity 2017.3.0f3
Oculus Rift
Oculus 1.22.0
Windows 10
Nividia GTX 1080
Asus X99 Motherboard


OS Name Microsoft Windows 10 Pro
Version 10.0.16299 Build 16299
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Manufacturer ASUS
System Model All Series
System Type x64-based PC
System SKU Unsupported
Processor Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz, 3301 Mhz, 6 Core(s), 12 Logical Processor(s)
BIOS Version/Date American Megatrends Inc. 3101, 5/4/2016
SMBIOS Version 3.0
BIOS Mode UEFI
BaseBoard Manufacturer ASUSTeK COMPUTER INC.

Files not converting to mp4, not muxed

I have had success recording video at 2048x1024 but increasing the resolution 7168x3584 causes a problem.

The files generated are the .wav and .h264 files with a size of 0 bytes. If I also stop the editor after stopping the recording it has an error about the render target being released is the camera's targetTexture.

I don't get any errors in the console, and have tried leaving the editor running after stopping the recording but the files remain.

Only record video does not record audio

HI:
I just want to record a h264 video file without recording the sound. But when I close the recording of audio-related code, has been reported "Failed to ascend out of a chunk in a RIFF file" error. The background may still record sound. How do i close recording related code?
Thank you.

Broken Commit

Hello,

Trying to work with your SDK ran into a number of issues so far:

  1. Latest commit left HEAD in a broken state.
    a. Unity Prefabs have missing links(easy to fix)
    b. No DLLs, no way of building them(solution doesn't compile)
  2. Had to revert checkout to commit before:
    a. Everything seems to be normal there, but unfortunately, there is no x64 DLL and when I try to
    build it with the solution provided, a solution would not build due to librtmp.lib file being
    corrupt.

Dear developer, can you please fix the issues? I'm aiming to use this SDK with our in-house project.
Thanks,
Vadim @ Free Range

Driver version incompatibility

Hello again,

The list of supported devices includes NVidia GRID GPUs, but the latest version of these drivers is 370.21. When running the software, it fails with an error saying that the driver version must be 379 or higher. Does this mean GRID is not supported? We're trying to run this on a cloud server and they're using GRID GPUs.

Thanks!

Compiling the source

Hi again!

I'm trying to compile the DLL from source, but having some trouble as VS complains that some of the static libs are compiled with an old compiler, and it wants me to rebuild them. Since source for some of the libs isn't in the repo, would it be possible to identify a location for those? The only one I haven't found so far is the mp4muxer in wamedia, but also have a feeling the flvoperations.lib I compiled is wrong as the original is 19 megabytes and my compiled version is 32k :)

"center" of VR view in Unity is on left side of 360 vide

I am trying to use EncodePackage in my own Unity project. It works great (thanks!!), however in the rendered video the thing that I see in the "middle" of my VR view is on the left side. So, when you start it in any VR video player, you have to "turn left" to see anything.

I would like the ground-plane object to be where the red X is in the screenshot.

The EncoderObject prefab is pointed at my scene, as one would expect. Is there some kind of global rotation being applied to the captured video? Or, can I apply such a rotation?

image

Photos output, videos do not

Just started playing around with this, and I've come across an issue with outputting and saving video:

I am able to take both rectilinear and equirectangular screenshots and save to the absolute path. However, when I try to capture video (in either non-surround or surround), no file is found in the output folder. I did not change the absolute path.

Is there a step in the process that I'm missing? Could it have something to do with my GPU (NVIDIA GeForce GTX 960M)?

mp4 output

Thanks for the dopeness! I am trying to have my render output go to .mp4 but it only seems to only go to .h264 and .aac... is there something I'm missing? After a rendering there is an Error Type: 315

Only record sound

Hello:

    Is it possible to record only the sound, and sometimes I do not need a video.

Best reards!

Unity UI elements are not displayed

Hi there,

I've noticed that Unity UI elements are not visible on capture (pictures and videos). You can easily reproduce the issue on the demo scene : The green circle around the tank is not visible on capture. For some reason it does work for non surround capture.

Thanks !

Sample integration doesn't work | Unity 5.6.2f1

I tried to open sample integration. It calls start/stopEncoding functions and muxing after stopEncoding but no video is saved. I tried different output paths and both surround and non-surround capturing. No errors logged, only information that the encoding started and stopped. Screenshots work.

NV_ENC_ERR_OUT_OF_MEMORY

I found when I record once ,the function "NvEncOpenEncodeSessionEx(device, deviceType)" was invoked twice.
1、FBCaptureSystem::getCaptureCapability() ->
EncoderMain::initSessionANDdriverCapabilityCheck() ->
"status = this->nvEncoder->initNVEncodingSession();
2、BCaptureSystem::encodeThreadRun() ->
EncoderMain::startEncoding ->
FBCAPTURE_STATUS NVEncoder::encodeMain ->
“status = initNVEncodingSession();”
This make two NV session ,but only release one after stop record, is not it?
And when I record continuously ,the issue occured with NV_ENC_ERR_OUT_OF_MEMORY.

Any guide for UE4?

Im trying to create an ue4 plugin using the NativeDLL but stuck on what to give as input for d3d11_DevicePtr
at instance->SetGraphicsDevice(d3d11_DevicePtr);

Guide/Tutorial on How to use 360 Capture SDK to record Oculus Game or other Game like Steam

Sorry to bother if that's the wrong location.

I'm looking for some help on how to use 360 Capture SDK to record an Oculus game or any other game like from Steam.
I was able to integrate 360 Capture SDK.
I just don't know how to use it to capture a game.
How can I get a Oculus Game (or any other game e.g. from Steam) into Unity to record it?

Thanks for the help, and sorry if that's the wrong place to ask for.
I couldn't find any other documentation or help for that.

Dependencies?

Hello,

As an alternative to supplying video data faster than the encoder is expecting it from a local machine, we are looking at running an instance of the app on a server in the cloud. I've set up an instance of Windows Server 2016 Datacenter edition, and installed the GRID drivers on it.
The only problem is that when I run the app (I've tried bot 64 and 32bit builds), the FBCapture.dll fails to load. The only error I get is:

The specified module could not be found

Any idea why this could happen? The only thing I can find is that the dll might have dependencies that aren't present on the system, but the exception doesn't give any more detail so it's hard to tell what might be missing.

Thanks!

Unexpected output channel count, expected stereo

(Unity 2017.3.0f3)
The FBSDK does only produce 0 byte .wav and .h264 files and in the log file I find the following error

[ 2017-12-27 16:16:23 ][LOG]: Folder is already existed
[ 2017-12-27 16:16:23 ][LOG]: Video Codec info: NV_ENC_H264
[ 2017-12-27 16:16:23 ][LOG]: Bitrate:: 500000
[ 2017-12-27 16:16:23 ][LOG]: Device type: DirectX 11
[ 2017-12-27 16:16:23 ][LOG]: Set encode configurations successfully
[ 2017-12-27 16:16:23 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Microphone)
[ 2017-12-27 16:16:23 ][LOG]: Audio device name: : Lautsprecher (Steam Streaming Speakers)
[ 2017-12-27 16:16:23 ][LOG]: Audio device name: : Lautsprecher (Creative SB X-Fi)
[ 2017-12-27 16:16:23 ][LOG]: Audio device name: : SPDIF Out (Creative SB X-Fi)
[ 2017-12-27 16:16:23 ][LOG]: Can't find Rift audio device. Just try to use default audio device
[ 2017-12-27 16:16:23 ][ERROR]: Unexpected output channel count, expected stereo
[ 2017-12-27 16:16:23 ][ERROR]: Failed to start output audio client

I am running on a 5.1 system, how can I specify the output channel count and fix the 0 byte video?

The screenshots work fine.

Save WAV FILE

Hi~ o( ̄▽ ̄)ブ:
I see it generate a encodedAudio.wav file when recording, can I get this file and renamed at run time? Or can provide an interface to record only this wav file, and can customize the file name.

Crash in debug on AMD hardware

Hi folks,

When I compile the DLL from source, and overwrite the dll after importing the supplied unitypackage, I can get videos to record in release. However, the library crashes in AMDEncoder::fillSurface when calling CopySubresourceRegion in debug. Is this a known issue? Any ideas what I can do to fix it?

GPU hardware is Radeon RX 580, have tried with Unity 2017.4.1f1 and 2018.2.0b7.

Missing Scripts on Prefabs

I'm downloading as a zip from the master branch, and when I import that into Unity, the only Unity specific thing I can find is a prefab with a camera on it and 3 missing scripts. What scripts are these supposed to be? Any help would be extremely appreciated.

Thanks!

startEncoding function not found

Any suggestions on properly importing the HWEncoder.dll? I have it in Assets/Plugins/x86_64

When I start encoding, I get the error below

EntryPointNotFoundException: startEncoding
FBCapture.SurroundCapture.Update () (at Assets/EncodePackage/Script/SurroundCapture.cs:221)

Slack channel and support from other developers

@cg439 @grancia Looking at the developer activity and how many issues are currently open for this projects I'd like to know if you are thinking at all about starting a Slack channel so that other developers can discuss problems/solutions more actively.
Also, there are 35 forks of this project but not a single pull request which makes me think that it's not clear right now how (or even if) others are able to contribute to this repo. Are there any plans on supporting such functionality and laying out the steps/processes to facilitate this?

Display output disabled/black

With the sample scene, as well as when I've imported the FBCapture prefab in a custom project, the screen is shown black when recording.
The video is recorded fine, however while recording the screen is black.
Any idea what causes this and how I can fix this?

Persistent 'AMF_VIDEO_ENCODER_FRAMESIZE' errors

Hello,
I've been getting these persistent errors when I try to use 360 Capture on Unity. This has happened across various projects. My AMD software is up to date (18.8.1) and Unity is at 2018.2.1.
I've added the prefab and the AMD file to the project. I am wanting to capture 360 video RGBD 25FPS equirectangular mp4, no audio. I've tried this with many different sizes and I'm still getting the error.
Screenshots work absolutely fine - I'm able to upload these to FB with no issues. But the videos aren't capturing.

Unity Console shows me this:

Capture SDK Error Occured of type: TEXTURE_ENCODE_FAILED [Error code: FBCAPTURE_STATUS_ENCODE_SET_CONFIG_FAILED ]

and

'OnRenderImage() possibly didn't write anything to the destination texture!'

and the .txt shows me:

[ 2018-08-21 16:59:03 ][INFO] Capture SDK Version: : 2.0
[ 2018-08-21 16:59:03 ][INFO] Graphics Card Info: : AMD Radeon (TM) R7 370 Series
[ 2018-08-21 16:59:03 ][INFO] Graphics Card Info: : Microsoft Basic Render Driver
[ 2018-08-21 16:59:03 ][INFO] Output folder already existed
[ 2018-08-21 16:59:03 ][INFO] AMF version (header): : 1000400000000
[ 2018-08-21 16:59:03 ][INFO] AMF version (runtime): : 1000400090000
[ 2018-08-21 16:59:03 ][INFO] Passed capture capability tests. Ready to start encoding
[ 2018-08-21 16:59:03 ][INFO] Audio device name: : Microphone (USB Audio CODEC )
[ 2018-08-21 16:59:03 ][INFO] Audio device name: : CABLE Output (VB-Audio Virtual Cable)
[ 2018-08-21 16:59:03 ][INFO] Can't find VR audio devices. Just use default audio input and output
[ 2018-08-21 16:59:03 ][ERROR] Failed to set proprty(AMF_VIDEO_ENCODER_FRAMESIZE) : width: 2000 height: 1000
[ 2018-08-21 16:59:03 ][ERROR] Initial configuration setting is failed
[ 2018-08-21 16:59:03 ][ERROR] Start encoding failed: 101
[ 2018-08-21 16:59:03 ][INFO] Start audio capture
[ 2018-08-21 16:59:03 ][INFO] No data can be read from Microphone--IAudioCaptureClient::GetBuffer
[ 2018-08-21 16:59:03 ][INFO] No data can be read from Microphone--IAudioCaptureClient::GetBuffer

So AMF_VIDEO_ENCODER_FRAMESIZE seems to be the issue but I have no idea whats going wrong. If its the way I've set it up, or the code or what.
Any ideas? Thanks in advance for any help

Video missing frames

Hi! This is a wonderful SDK! Thank you!

We are having a problem, though. We're trying to record video very fast by disabling vsync and running Unity in fixed frame rate mode.

We do this by setting GraphicsSettings.vSyncCount to 0 and setting Time.captureFramerate to the desired FPS of the output video. This enables the app to process frames at a much faster rate than real time. However, the resulting video comes out way shorter and faster than expected and only records every 3rd frame for a 60fps video, resulting in a video that is something like 2.5s-3s long instead of 10s.

This is unexpected behaviour - I assumed that setting FBCaptureSDK.vodVideoFrameRate to 60 would result in a 60fps video that contained every frame we threw at it.

Is there something we are doing wrong here, or is it a bug?

If it's in a thread, is it possible that the thread is still processing a previous frame when we try to send a new capture?

Is there some way we can block the main thread and wait for the encoding thread to finish processing a previous frame before sending a new capture?

Stereoscopic Video tips

Hi people. I would like to implement stereoscopic video render with this sdk.
As i find my self rather hobbist in Unity than pro. I want to ask for any tips how to approach this problem.

Regards

Muxing failed - wamedia muxer error codes?

Hi, I'm getting an error after recording a video. The MP4 muxer fails with error code 509 and I can't find any documentation or error codes in the supplied source, nor can I identify who wrote the muxer or find any info about it online.

Any hints?

prefab issue and small bug

This is an amazing component - thank you!! I used previous versions to capture great videos of VR 3D interaction: https://www.youtube.com/watch?v=0PtXAfWaZ3g

However with the current version, I found two small problems when trying to set up my own Unity project to use EncodePackage, that prevent non-surround capturing from working (it didn't work in the included Unity demo, either)

  1. the EncoderObject prefab does not have the FlippingTexture shader assigned. Can be fixed by assigning this shader in an instance of the prefab and clicking Apply in Inspector.

  2. If you start w/ Do Surround Capture un-checked, and try to non-surround capture, there are errors in the log about a null render texture. This is because CaptureOptions.nonSurroundCapture.enabled is never set to true. This is my fix:
    rms80@7c0475c

How to get mpeg-ts stream?

In live streaming mode, how can I get an output stream of mpeg-ts rather than pushing it on a streaming server?

System sounds getting captured too

Upon enabling audio capture in Capture Sdk, it captures app's audio and also all other system sounds. For e.g. if I am playing a song via media player, that audio gets captured too. Can it be fixed?

Could this support H.265?

H.265 is more better for quality and compression than H.264.
Both AMD&NVIDIA supports H.265 HW encoder in their latest VR ready GPUs.(GTX900+, RX 400+).
Have a roadmap for H.265 support?

FBCapture SDK 1.2 source code available?

Hi and thanks for the create SDK,

I was wondering are you planning on publishing the source code for the 1.2 update of the FBCapture SDK. Currently only the built dll is available. I'm using the old FBCapture (open source) in my project with slight modifications, however I'm interested in the performance updates of the latest edition.

Thanks,
-Teemu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.