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.
https://github.com/facebook/360-Capture-SDK
Other
253 stars 75 forks source link

Persistent 'AMF_VIDEO_ENCODER_FRAMESIZE' errors #51

Open danbrown99 opened 6 years ago

danbrown99 commented 6 years ago

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

grancia commented 6 years ago

According to your log, the resolution is not supported on AMD encode driver. Can you try with other resolutions like 1920 x 1080p? I'm also encouraging you to update SDK version to 2.2. You might just can download FBCapture.dll from following link and replace with this one. https://github.com/facebook/360-Capture-SDK/releases/tag/v2.20 Thanks

danbrown99 commented 6 years ago

Hello, Thanks for getting back to me quickly. I've only had chance to try the changes. I've updated everything to the new 2.25 version and it works well. The video is uploaded ok to FB. I'm still having issues with the render size - anything other than 1920x1080 crashes the render, with the error:

TEXTURE_ENCODE_FAILED [Error code: FBCAPTURE_STATUS_ENCODE_SET_CONFIG_FAILED ]

Any ideas on this? Thanks alot

grancia commented 6 years ago

I think AMD supports typical resolution such as 720P(1280 x 720), 1080p(1920 x 1080), 1440p(2560 x 1440) and 2160p(3840 x 2160). Have you tried those resolution? In the meantime, I will also take a look your resolution on our AMD device.