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

Transform command not working when using custom video mode #311

Open
janniksaxler opened this issue Feb 14, 2024 · 4 comments
Open

Transform command not working when using custom video mode #311

janniksaxler opened this issue Feb 14, 2024 · 4 comments

Comments

@janniksaxler
Copy link

Hi folks,
I just tried the new RC from server version 2.4.0 and set up my server with 3 full HD outputs reacting as one canvas (5760x1080px). It's working! The only problem is that videos and images are stretched to the full width.
This would be no problem, if I could just transform them back to their original aspect ratio. But the transform-tool in the client (v2.3.0, rev. 58e2267) doesn't work. It only works with standard video modes (720, 1080, etc.).
In the log I see that the client normally calculates the size or position values from 0-1920 (X) or 0-1080 (Y) to 0-1 for the AMCP command. I think this conversion doesn't work if the client detects a custom aspect ratio (e.g. 16:3 in my case).

The workaround with a custom command (e.g. MIXER 1-10 FILL 0.25 0 0.33 1) works. So the issue has to be within the client's transform-tool.

image

@markusnygard
Copy link

Can confirm that I have the same problem with custom resolution and transform-effect with 2.3.0 RC1-win

@TheTrueCoder
Copy link

I also experienced the same issue when I last used CasparCG with the Client and managed to find the core of the issue and fix it in a PoC kinda way.

The problem is because the way the Client is written, it references a fixed internal list of video formats which are the default ones referencing the names like "1080p3000" instead of pulling the actual parameters size and speed parameters from the server. These preset values are defined here Schema.sql which are put into the app's sqlite database in the Format table.

To check it I opened the SQLite database file in an editor program and added a row with my custom format name, resolution, and frame rate, and when I opened the Client again the Transform and related functions worked perfectly as expected! 😀

@TheTrueCoder
Copy link

So simplest solution would probably be to have the Client download custom resolutions defined on the Server each time it connects and save it into the SQLite table. With the caveat that I'm not a developer on the project, so I don't really know how to implement it exactly and it may require small additions to the Server.

@Julusian
Copy link
Member

@TheTrueCoder I think you have the right idea there.
the resolutions probably should be stored with a reference to the server they belong to, it would be reasonable to be connected to two servers which each differing definitions under the same names.

From the little I have done in this, getting the correct reactivity in the panels is not the most trivial.

I don't think you will need to modify the server, the INFO CONFIG command gives out the config file, which will contain all the known custom definitions.

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

No branches or pull requests

4 participants