Closed LordHDL closed 3 years ago
If OBS streams captured content correctly, then it is also likely recording captured content correctly. Once it's rendering on the OBS canvas, any output type should be encoding that content.
Edit: Does this occur in OBS Studio 27.0.0 or newer? You reported this issue against OBS Studio 27.0.0, but your log is for OBS Studio 26.1.2.
The log is for an older version yes, but the issue has persisted in the newer version as well. Other sources like window and display capture are not affected, the recordings appear correctly. I use ffplay and VLC to view videos and both show me the black screens. Here are two samples, one with a Syphon source and the other with window capture. I didn't change the codecs or settings.
https://user-images.githubusercontent.com/5182602/121759907-f8820180-caf5-11eb-9c75-9b2b705d9def.mp4
https://user-images.githubusercontent.com/5182602/121759916-00da3c80-caf6-11eb-9087-15677dab4964.mp4
The log is for an older version yes, but the issue has persisted in the newer version as well. Other sources like window and display capture are not affected, the recordings appear correctly. I use ffplay and VLC to view videos and both show me the black screens. Here are two samples, one with a Syphon source and the other with window capture. I didn't change the codecs or settings.
Then I would like to see the log file for the current version of OBS, as well as for the session that produced the videos you uploaded.
Firefox will not play, load, or download those videos. Chrome also refuses to play them, but at least lets me download them. VLC shows the first video is blank, and shows the second video has content.
I noticed that you're using "Custom Output (FFmpeg)", which we normally do not provide support for as it's regarded as "you're on your own" territory. Does this occur with the normal recording methods in OBS, either Simple Output Mode or Advanced Output Mode with Standard Type? Please provide a screenshot of your "Custom Output (FFmpeg)" settings, and the full text of any Muxer or Encoder Settings, if possible.
Circling back around to this:
or after injecting an OpenGL app such as a game.
As of macOS 10.14 (Mojave), SyphonInject will no longer work on macOS, which means that Game Capture cannot be used. As far as I know, OBS does still support capturing from apps that integrate Syphon. Just to clarify, is this the app you are using for testing?
SyphonInject does still work on macOS if you disable SIP, and with this method I've been able to record without issue in the past. These videos were not recorded with an injected app, however. I used the official Simple Server app from the Syphon website, which is provided by the developers. The one you linked is correct. You can also find it here: http://www.syphon.v002.info/
This bug still happens with simple recording and stream encoder settings.
I attached the log from the sample video session.
I figured out the smoking gun. Turns out that this is the culprit.
I'm not sure when this broke, but setting the color format to anything else will allow proper recordings of Syphon sources. That's not really ideal, but maybe it can point to the part of code that's breaking.
That would make some sense as to why it works for streaming. For the streaming encoder, OBS forces the color format to NV12 if the color format is neither NV12 nor I420.
As far as I'm aware from some limited exploration, this appears to fail as far back as OBS 24.0.6 on macOS 10.15 and OBS 23.2.1 on macOS 10.13. Selecting NV12, I420, or I444 as the color format work fine.
It works on OBS 22.0.1. Curiously, OBS 23.0.1 and OBS 23.1.0 don't seem to show the Syphon Client source on the canvas, but it does end up in the recording. OBS 23.2.0-rc1 shows the Syphon Client source on the canvas, but not in the recording.
However, simply enabling "Allow Transparency" on the Syphon Client Source in OBS fixes the issue that you're describing. So something may have changed between OBS 23.1.0 and 23.2.0-rc1, but I'm not sure what, and I'm not sure if we need to address it if "Allow Transparency" solves the issue described here.
Hm, interesting. I wonder if allowing transparency affects recording accuracy in any way. So far in my color tests that doesn't seem to be the case.
It works for me when I enable it, but it seems to also make OBS more unstable. Sometimes it crashes upon ending the recording, though I still get the final output from it. I haven't done extended recording tests so I don't know if it remains stable the whole time, but for now it'll suffice as a workaround.
Feel free to test the macOS artifact from #4902.
Operating System Info
macOS 11.4
Other OS
No response
OBS Studio Version
27.0.0
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/forum/attachments/2021-05-28-18-06-09-txt.71614/
OBS Studio Crash Log URL
No response
Expected Behavior
Syphon sources should appear correctly in recordings, as they do in the canvas and while streaming.
Current Behavior
Recording Syphon sources produces black screen videos
Steps to Reproduce
Anything else we should know?
I'm not sure when it started, but this bug has been present for at least a few versions. Streaming is unaffected and works normally.