Skip to content

win-dshow: Save and restore video device configuration properties - #5480

Merged
jp9000 merged 1 commit into
obsproject:masterfrom
exeldro:video_device_properties
Jun 15, 2022
Merged

jp9000 merged 1 commit into
obsproject:masterfrom
exeldro:video_device_properties

Conversation

@exeldro

@exeldro exeldro commented Nov 2, 2021 •

Copy link
Copy Markdown
Contributor

Description

Save and restore webcam settings/ video device configuration properties

Requires obsproject/libdshowcapture#37

Inspired by Camooz

Motivation and Context

Some webcams don't save the settings and this allows you to have different webcam settings per scene collection

How Has This Been Tested?

On windows 64 bit

Types of changes

  • New feature (non-breaking change which adds functionality) -->

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@exeldro
exeldro force-pushed the video_device_properties branch from 9287127 to f54b56f Compare November 2, 2021 20:53
@WizardCM WizardCM added the kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. label Nov 2, 2021
@exeldro
exeldro force-pushed the video_device_properties branch from f54b56f to 088e532 Compare November 3, 2021 06:15
@cg2121

cg2121 commented Nov 3, 2021

Copy link
Copy Markdown
Contributor

Just my opinion, others can chime in: I think the settings should save automatically, so there shouldn't be a need for the checkbox.

@WizardCM

WizardCM commented Nov 3, 2021

Copy link
Copy Markdown
Member

I know others have tried to implement something similar and ended up either reverting or disabling the capability because it was not saving correctly, or potentially corrupting data. I am OK with providing a checkbox to begin with to allow users to disable the functionality if it's not working as expected for them.

@Fenrirthviti

Copy link
Copy Markdown
Member

I agree that this should just be automatic without a checkbox. Plenty of applications accomplish this without corruption or failure saving, I'd prefer we just tested this thoroughly and made it automatic.

@exeldro

exeldro commented Nov 4, 2021

Copy link
Copy Markdown
Contributor Author

I think the seeking testers label needs to be added to this PR to allow users to test the change.

@Fenrirthviti Fenrirthviti added the Seeking Testers Build artifacts on CI label Nov 4, 2021
@exeldro
exeldro force-pushed the video_device_properties branch from 088e532 to 1f3ceef Compare November 4, 2021 17:14
@exeldro
exeldro force-pushed the video_device_properties branch 2 times, most recently from dbcb841 to 95b3512 Compare November 20, 2021 18:37
@exeldro

exeldro commented Nov 23, 2021

Copy link
Copy Markdown
Contributor Author

Tested and confirmed working with C910, C920, C922, C295
Reported not working C270

@WizardCM

Copy link
Copy Markdown
Member

@exeldro I own a C270. Anything specific you'd like me to try?

@exeldro

exeldro commented Nov 23, 2021

Copy link
Copy Markdown
Contributor Author

@WizardCM set some custom camera settings, check if there are settings stored when OBS is closed in the scene collection json, in arrays called VideoProcAmp and CameraControl. Restart computer or have an other way to change the camera settings. Start OBS to check if the camera settings are restored.

@exeldro
exeldro force-pushed the video_device_properties branch from 95b3512 to f2f9571 Compare November 25, 2021 17:24
@exeldro

exeldro commented Nov 25, 2021

Copy link
Copy Markdown
Contributor Author

Removed the extra setting, now it is always enabled

@exeldro
exeldro force-pushed the video_device_properties branch from f2f9571 to 9b862ac Compare November 27, 2021 18:00
@exeldro
exeldro force-pushed the video_device_properties branch from 9b862ac to 5473cdb Compare December 5, 2021 09:54
@exeldro exeldro changed the title win-dshow: Add option to save video device configuration properties win-dshow: Save and restore video device configuration properties Dec 5, 2021
@exeldro

exeldro commented Dec 5, 2021

Copy link
Copy Markdown
Contributor Author

All changed to not make it a setting, but always save and restore

@WizardCM

WizardCM commented Jan 2, 2022

Copy link
Copy Markdown
Member

Heads up, this PR has a merge conflict with a submodule.

@WizardCM WizardCM added kind/feature Functionality or other elements that the project doesn't currently have. and removed kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. labels Jan 2, 2022
@exeldro
exeldro force-pushed the video_device_properties branch from 5473cdb to 034806e Compare January 2, 2022 07:50
@mat1jaczyyy

mat1jaczyyy commented Feb 15, 2022 •

Copy link
Copy Markdown

is it possible for this feature to additionally re-activate the video once? so the full process for restoring would be:

  1. first load/activation
  2. restore settings
  3. deactivate
  4. activate again
  5. restore settings again

This is due to some webcams (such as C920) having really low FPS on manual exposure -6 or below on the first load, but after the device is deactivated and reactivated once, the FPS works perfectly fine. As far as I understand the current system, this sort of fix wouldn't be able to be fully restored.

now that I think about it, this should likely be a separate thing in the form of a checkbox "reactivate on first load" or such.

@exeldro
exeldro force-pushed the video_device_properties branch from 034806e to 4071a50 Compare February 23, 2022 12:40
@Tod181

Tod181 commented Feb 26, 2022

Copy link
Copy Markdown

Is there an updated version for OBS 27.2.1? When I updated OBS it removed the setting from my menu.

@exeldro

exeldro commented Feb 26, 2022

Copy link
Copy Markdown
Contributor Author

The latest test version including OBS 27.2.1 changes can be downloaded here:
https://github.com/obsproject/obs-studio/actions/runs/1887279360

@johnebgood

Copy link
Copy Markdown

The latest test version including OBS 27.2.1 changes can be downloaded here: https://github.com/obsproject/obs-studio/actions/runs/1887279360

I think OBS 27.2.1 had an issue that was crashing my computer that was fixed in 27.2.2, would it be possible to get a build with 27.2.3? I can test with OBSBOT Tiny's, Feiyu Pocket 2S and some other oddball webcams.

@exeldro
exeldro force-pushed the video_device_properties branch from 4071a50 to 9a23998 Compare March 21, 2022 17:15
@exeldro

exeldro commented Mar 21, 2022

Copy link
Copy Markdown
Contributor Author

The latest test version including OBS 27.2.3 changes can be downloaded here:
https://github.com/obsproject/obs-studio/actions/runs/2017636125

@RytoEX RytoEX added the platform/windows Categorizes issue or PR as affecting Windows specifically label May 29, 2022
@exeldro
exeldro force-pushed the video_device_properties branch from 9a23998 to bda553f Compare May 29, 2022 05:54
@exeldro

exeldro commented May 29, 2022 •

Copy link
Copy Markdown
Contributor Author

@sebastian-s-beckmann sebastian-s-beckmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are quite a few cases here where to me it looks like OBSDataAutoRelease or OBSDataArrayAutoRelease could be used instead of manually releasing, which could improve code readability. Could you check where those can be used (or is there a specific reason why they aren’t)?

(Since this PR is open for quite a bit I think the AutoSelect classes just didn’t exist on the main branch when it was created)

@exeldro
exeldro force-pushed the video_device_properties branch from bda553f to 9ea51cc Compare June 14, 2022 17:23

@sebastian-s-beckmann sebastian-s-beckmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AutoRelease wise this looks fine

@RytoEX
RytoEX requested review from sebastian-s-beckmann and removed request for sebastian-s-beckmann June 14, 2022 20:13
@RytoEX
RytoEX dismissed sebastian-s-beckmann’s stale review June 14, 2022 20:15

Requested changes made.

@jp9000
jp9000 force-pushed the video_device_properties branch 2 times, most recently from 50f832e to 3b64a20 Compare June 15, 2022 07:47
@josiasmat

Copy link
Copy Markdown

Hello.
Is there any chance this feature will be reenabled anytime soon? Because I'm sticking to version 28.0.0 and skipping all updates as I cannot live without this anymore. I use 3 cameras, and before 28.0.0 had to configure all of them every time.
Would it not be better if added as an experimental feature, available through a checkbox?
Many thanks.

@zacgoodwin

zacgoodwin commented Jun 2, 2023 •

Copy link
Copy Markdown

1 year on and any word on recommitting this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Functionality or other elements that the project doesn't currently have. platform/windows Categorizes issue or PR as affecting Windows specifically Seeking Testers Build artifacts on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.