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

Crop (second attempt) #179

Merged
merged 2 commits into from
Dec 14, 2017
Merged

Crop (second attempt) #179

merged 2 commits into from
Dec 14, 2017

Conversation

MaKess
Copy link
Contributor

@MaKess MaKess commented Nov 25, 2017

(Second attempt, first merge request can't be reopened…)

This branch adds a cropping element to the pipeline that allows the removal of a superfluous part of the image.

To do this, configuration items for the picture-in-picture and the side-by-side-preview mode were added. For the latter this allows the final mix to be set up for example like illustrated in the following schematic:
screen

The reasoning behind this is, that source B usually shows the speaker who only occupies the middle part of the frame.

From a technical perspective, the cropping of each side of a source is determined by the corresponding newly introduced attribute of the PadState object (croptop, cropleft, cropbottom, cropright). These attributes are set just like xpos, ypos, width and height when choosing a new Mixer state.

If the configuration items are not present in the config file, the four attributes fall back to 0 and no cropping is done. (i.e. the system is backwards compatible and all preexisting config files can still be used)

In a next, still to be implemented, step, this cropping can also be used to remove the black bars from a padded source (4:3 screen grabbing with black bars to fit 16:9 video stream)

@@ -185,6 +185,9 @@
<property name="homogeneous">True</property>
</packing>
</child>
<style>
Copy link
Contributor

Choose a reason for hiding this comment

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

That changes the look of the toolbar?

@MaZderMind
Copy link
Contributor

Looks fine code-wise to me, need to run it and play a little with it

@1uk4sh 1uk4sh mentioned this pull request Nov 29, 2017
@voc-mng voc-mng merged commit 1910643 into voc:master Dec 14, 2017
@MaKess MaKess deleted the crop branch December 29, 2017 10:12
@fightling
Copy link
Contributor

Hey @MaKess! Why is the order of the crop attributes top,left,bottom,right instead of left, top, right, bottom (as I would expect it). Is there a special reason for this?

@MaKess
Copy link
Contributor Author

MaKess commented Aug 7, 2018

Hi,
No particular reason.
Is there some convention/reason to do it in the other order?
Martin

@fightling
Copy link
Contributor

Thank you @MaKess. I just found it unusual that way and in my transitions code (see https://github.com/fightling/voctomix-transitions/blob/master/README.md#framecrop) I'm currently using left,top,right,bottom order.

@MaKess
Copy link
Contributor Author

MaKess commented Aug 12, 2018

Hi,
I just took a look at your voctomix-transitions project, and it looks really promising! So if there is some compelling reason, feel free to change the order when you submit your changes. (I don't have any emotional attachment to the current order, so you don't hurt my feelings :-) )
I really hadn't put that much thought into the order. I think I just did the cropping clockwise, starting from the top.
Martin

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.

4 participants