Skip to content

New module for live backgrounds#100

Merged
phlash merged 9 commits intofloe:experimentalfrom
phlash:live-backgrounds
Aug 30, 2021
Merged

New module for live backgrounds#100
phlash merged 9 commits intofloe:experimentalfrom
phlash:live-backgrounds

Conversation

@phlash
Copy link
Collaborator

@phlash phlash commented Aug 18, 2021

New code module to handle backgrounds, and in particular live backgrounds from local files or network streams.

Partly addresses #70, in that backgrounds are now a more flexible item, although no UI is present to select one while running.
Also partly addresses #43, in that video backgrounds are now possible.

@phlash phlash changed the base branch from main to experimental August 18, 2021 19:30
@phlash phlash requested a review from BenBE August 18, 2021 19:31
@floe
Copy link
Owner

floe commented Aug 19, 2021

General question: would it maybe make sense to use GStreamer instead for the whole video streaming thing? (IIRC you can use GStreamer pipelines as a video capture device in OpenCV, although I'm not 100% sure anymore about how.)

@BenBE
Copy link
Collaborator

BenBE commented Aug 19, 2021

Would be interesting to take the contents of another window as background … Not sure if GStreamer allows for that (but IIRC it somehow did) …

@phlash
Copy link
Collaborator Author

phlash commented Aug 21, 2021

General question: would it maybe make sense to use GStreamer instead for the whole video streaming thing? (IIRC you can use GStreamer pipelines as a video capture device in OpenCV, although I'm not 100% sure anymore about how.)

I've looked at GStreamer a little, while considering a module to connect libbackscrub into the ecosystem, it's quite invasive to the programming style (ie: you end up writing a GApplication and supporting paraphernalia), so I wouldn't be keen to adapt this codebase (it would be a re-write), instead continue with creating a module that other GStreamer apps can use.

std::this_thread::sleep_for(del);
}
proc = std::chrono::steady_clock::now();
proc += std::chrono::nanoseconds((long)(1e9/pbkd->fps));
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about dropping frames when too slow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good question - if we run out of cycles simply reading frames.. we have bigger problems? Difficult to drop frames on network streams (especially if they are http-like streams), so non-trivial to do this I think?

@phlash phlash merged commit df0654d into floe:experimental Aug 30, 2021
@phlash
Copy link
Collaborator Author

phlash commented Aug 30, 2021

..and now I remember that the usage text should probably change 😄 bug fix incoming!

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

Successfully merging this pull request may close these issues.

3 participants