Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obs - Can't capture "only" ppInk output #21

Closed
AntonyGarand opened this issue Oct 12, 2020 · 16 comments
Closed

Obs - Can't capture "only" ppInk output #21

AntonyGarand opened this issue Oct 12, 2020 · 16 comments

Comments

@AntonyGarand
Copy link

This is an issue which is also on gInk, and I'm not quite sure how either OBS or ppInk can solve this issue from a technical standpoint.
Opening the issue here as it seems to be the most active and advanced fork, but this might be a change that wants to be on both repos.

OBS is a video streaming and recording software which allows you to mix and match inputs, such as windows and monitors, to output a single video output.
Using this tool, ideally, I would like to draw on my screen and record the ppInk layer as well as the base layer separately, allowing me to isolate these.

Epic pen creates a "window" with only the drawing on it, which allows OBS to record it independently, such as demonstrated in this video: https://www.youtube.com/watch?v=BIU1XN9vkOA&t=2m05s

Using ppInk, it seems like there are two modes it uses: One where we don't have an active canvas, and the one where we do.

First, when we're not drawing, I can find the ppInk executable, but can only see the marker icon, which is fine in itself.
image

Second, while drawing on the screen, nothing seems to be captured, even though I'm drawing and have the toolbar open.
image


Note that while using a complete display capture, aka. recording everything on the screen, I do see the output of ppInk, but this doesn't allow much flexibility when using layers.
An example of what can't be done while using a display capture is draw "over" the other OBS sources, such as the webcam.

Therefore, I'm wondering:

  • Is there currently a way to capture only the output of ppInk, ideally only the output on one monitor?
  • If not, what is needed to do so, is this something ppInk needs to expose, or OBS to find?

Thanks a ton!

@pubpub-zz
Copy link
Owner

pubpub-zz commented Oct 12, 2020

Hi @AntonyGarand ,
Thanks for talking about Obs. I was not aware of this product which seems very efficient. I've downloaded it and this is the way I've used it:

  • Launch OBS
  • Configure shortcuts for starting record / stop
  • Configure it to a screen capture and adjusted it as requested.
  • Engage ppInk in drawing mode
  • Press shortcut to start recording
  • Draw in screen
  • Press stop recording shortcut

This use case seems quite acceptable but may be improved with a icon in the toolbar to send the start/stop shortcuts.
What do you think of this approach?

PS : the transparent drawing window is created when, and the windows You've "captured" is the launcher window which is hidden when the toolbar is displayed

@AntonyGarand
Copy link
Author

Hey!
As you noticed, you can indeed record when using a screen capture, which does record the whole screen.
Where it doesn't work is when the "base" layer is anything other than a screen capture, such as only the browser window.

I made a test to demonstrate what I'm attempting to do:

In the following image, there are three OBS components:

  1. screen capture, which is the same as your example, where the full screen is displayed.
  2. window capture of ppInk, which renders the red crayon placeholder (which is hidden when starting a drawing, as you said)
  3. Any other window, such as a browser with anything on it.

Then, I drew with ppInk on the screen, from top left to bottom right, adding bullet points.

image

From the result, you can see the following behavior the layers:

  1. The screen capture displayed everything on my screen correctly, as expected. This is what you did to test it out!
  2. The ppInk window capture kept the crayon placeholder, kind of expected I guess
  3. The browser window was over the drawing, also expected as it was on a layer above the screen capture

Now, what I'd like to do, is a setup similar to epic pen, where there would be the following layers instead:

  1. browser (or anything else really, such as a game capture) layer
  2. ppInk drawing by itself, which could be over the other layers
  3. any other content, such as webcam or images

With the described layout, I would be able to draw over the layers of my choice, a bit like this example where I'm drawing over the browser on OBS (forged screenshot):
image

Hopefully this makes things a bit more clear!
Thanks for looking into this 😀

@pubpub-zz
Copy link
Owner

pubpub-zz commented Oct 12, 2020

actually the problem of selecting the newly created window is due to the fact that the floating window is hidden and not destroyed.
I've changed it in this test version.
I've done a few test and this may be good for you, however it has a limitation : OBS can not capture transparency (or I've not been able to find how) this make semi-transparent pens opaques. :(

Give me your feed back
ppInk_test.zip
PS : config.ini fix is inside.

@AntonyGarand
Copy link
Author

Thanks a ton for the quick update!
It seems like there are two bugs with this update:

  1. The exposed layer for OBS (Aka. this issue)
    I can see the pen itself, but not the "drawing" layer with the actual content.
    Ref: On this image, I can see the cursor, but not the orange mess next to it.
    image

  2. Settings "freeze" after focusing the "height" option
    Related to the config.ini fix I assume

Once I focus the bar "height" option and it has a comma in it, as expected as it's the decimal delimiter in my locale, I can't focus anything else, save the settings, or close the settings window.
Repro steps:

  1. Open the settings
  2. Enter a value such as 0,02 in the height box
  3. Attempt to tab out, or to edit another field, such as the file save path or magnetic radius.
    Expected result: The focus is switched to the other field
    Actual result: The focus is kept on the screen height

Note: After step 2, you can still perform "click" actions, such as checkboxes and certain buttons, but anything requiring an input won't work.

Thanks again!

@pubpub-zz
Copy link
Owner

A) about toolbar_height : I have worked only on the config.ini. the double decimal separator is also possible in options dialog. Try this new version.
about your issue with OBS, I have had the same issue : You should force the windows 10 capture method (automatic does not seem to select the good one)
ppInk-test2.zip

@AntonyGarand
Copy link
Author

AntonyGarand commented Oct 13, 2020

I confirm the hotkey issue is fixed 👍

On OBS, it does work with the windows 10 capture method as you mentioned, thanks a ton!

There are still few small bugs and QOL changes I found, I'll list them here as reference. Note that they're not all ppInk bugs, some of them are also related to OBS as far as I know.

  1. The toolbar is weirdly formated with the "chroma key" filter
    I assume since the chroma key (background color) is the same as most dark icon's colors, we get a weird
    image
    image

  2. Multi monitor positioning
    This one can be worked around pretty easily, but I'll still note it here in case you have an idea.
    I'm working with Two monitors, yet only "recording" one on OBS.
    As there is a single "canvas" from ppInk with both monitors, it's hard to position the "monitor 1" section properly on the OBS screen, as both of them are on a single canvas.
    A potential solution would be to do like epic pen (refer to the video on the original post), where there is one window per monitor, and they can be captured independently.
    Another one would be to add an option to "pick" on which screen should we draw, and only draw on this specific one.
    This way, even with two monitors, I could easily
    image

  3. Opacity
    As you mentioned previously, opacity isn't supported in window captures, but it does seem supported in "game captures"
    I'm not sure what the difference is between these modes and if opacity could be supported with the game capture, but it's worth noting here.
    Right now, while recording in a game capture, there is no content on ppInk.
    image

This can be kind of worked around while using the chroma key filter and a smoothness of around 150, but this cause other weird behavior:
image

  1. Anti aliasing
    Until there is proper opacity support, the current anti-aliasing doesn't render well by default with a chroma key:
    image

As mentioned in point 3, using a smoothness on the chroma key does a good job at reducing it, but it also has weird behavior, such as missing colors, and doesn't do a perfect job on colors such as the yellow one, where there is still a border.

  1. Extra cursor
    With the windows 10 capture method, the cursor is always captured, which means there will usually be two cursors on the screen instead of one.
    This is probably something OBS would need to fix rather than ppInk, but still worth noting in here.

Once again, thanks for the quick fix!

@pubpub-zz
Copy link
Owner

Hi @AntonyGarand,
about the point you've raised.
1- to produce transparency, I've personnally used "Color key" with black color
image
I agree it is not perfect but very acceptable

2- By design, gink is a window covering the whole desktop. changing to two window is a major change that requires to much redesign and test to take the risk for a very tiny usecase.

3- I've also failed in using game capture. looking in the help, they are talking about directX, not used in gInk/ppInk.

4- the outlining you've observed seems quite reduced with my setup. however, when drawing with any color over a white window, no outlining is observed. I'm quite convinced this is produced by OBS filter

5 - On my computer the option to disable cursor capture with windows 10 is working. can you double check
image

I'm wondering weither it will be useful to have more integration with OBS (button for On/Off recording ?)
You're opinion?

pubpub-zz added a commit that referenced this issue Oct 18, 2020
Replace Hiding CallForm window by closing in order to make only Displaywindow visible and transfert OBS focus onto this window
refer to issue #21 for more details
@pubpub-zz
Copy link
Owner

@AntonyGarand version 1.3 alpha1 is now issued. is it ok for you ?

@pubpub-zz pubpub-zz reopened this Nov 9, 2020
@AntonyGarand
Copy link
Author

Hey! I'll try it out later this evening, but if it's the same as it was previously with #21 (comment) it should be fine 😁

@AntonyGarand
Copy link
Author

I confirm that version 1.3 alpha 1 works well with OBS!
I couldn't test the recording functionality as it kept crashing on me, but that's irrelevant to this specific issue.

Regarding the previous points: Most of them are OBS related and not a bug in PPInk itself, I was mostly writing them to document them if someone else wanted a head start on working with it!

Thanks for the great work, and feel free to close the issue as it's pretty much resolved now 😁

@pubpub-zz
Copy link
Owner

I would have liked to have some feed back on obs control. You have some issue with it? Else can you test ffmpeg. Thks

@AntonyGarand
Copy link
Author

Once I click on the camera icon and pick a region, I get this error:
image

Note that the path with the error lines is not an existing path in my system, it might be something hardcoded?

@pubpub-zz
Copy link
Owner

pubpub-zz commented Nov 10, 2020

check ffmpeg is installed. the command line considers that ffmpeg is in the path. if not add the path without white space(use 8.3 names if required) before ffmpeg.exe. The command line is adjustable from the option dialog, video tab.

@pubpub-zz
Copy link
Owner

Hi @AntonyGarand,
Have you been able to go further in testing ffmpeg embedding or OBS ?

pubpub-zz added a commit that referenced this issue Nov 28, 2020
get OBS status at opening and also introduces streaming status
to tracking ,see #21
@pubpub-zz
Copy link
Owner

Hi @AntonyGarand,
I would rather have your feedbacks before closing this issue

@pubpub-zz
Copy link
Owner

without feed backs I'm closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants