videokit-ai / videokit

Low-code, cross-platform media SDK for Unity Engine. Register at https://videokit.ai
https://videokit.ai
Apache License 2.0
105 stars 14 forks source link

Requests the ability to save a movie with a specified aspect ratio (area). #28

Closed ghkd3930 closed 1 year ago

ghkd3930 commented 1 year ago

hello. I would like to upload a game screen video in conjunction with social media. However, all parts are not required. For Instagram, an aspect ratio of 4:3 is best. I'd like to make this automatically adjustable. I tried to use the Texture Input part, but it seems that it is not possible to modify the script manually.

Are there any plans to create a screen recording function for each area?

olokobayusuf commented 1 year ago

Hey @ghkd3930 , I think this is generally a good feature request. That being said, VideoKit might be able to handle this already. Are you saying you want to record a video in one specific aspect ratio for Instagram? If so, currently you can record with a custom resolution that has the aspect ratio you want. We can then add resolution presets for Instagram and other platforms as they come up.

If you're trying to record multiple videos at once, each with its own different aspect, then it gets much more complicated. Let me know what you're thinking.

ghkd3930 commented 1 year ago

hello. @olokobayusuf ,

I think the feature you mentioned is a feature using "enum Resolution". But I think it's more of a resolution than an aspect ratio (1280x720 and 1920x1080 are the same 16:9). As you say, using resolution naturally plays a role in aspect ratio? If the aspect ratio can be specified separately, where can I specify it? I couldn't find that function.

Do you mean custom modifying the resolution? If so, how much is the appropriate width for mobile devices? Also, is there any way to specify where to start shooting? (I want to shoot from height 300, which is the screen where the game score is displayed, but doesn't the starting shooting position start from 0?)

The only way I found was to use CropTextureInput, but this cannot modify the script.

Sorry for the confusing question. I think your features are so cool, it's an honor to use them. We look forward to your kind reply.

olokobayusuf commented 1 year ago

As you say, using resolution naturally plays a role in aspect ratio? If the aspect ratio can be specified separately, where can I specify it? I couldn't find that function.

The aspect ratio is a direct consequence of the resolution you choose. In your case, you will need to specify a custom resolution, and you can do so by setting the video resolution setting to Custom.

Do you mean custom modifying the resolution? If so, how much is the appropriate width for mobile devices? Also, is there any way to specify where to start shooting? (I want to shoot from height 300, which is the screen where the game score is displayed, but doesn't the starting shooting position start from 0?)

The width and height of the recording is up to you. For cropping the video, this is a feature request we've received, and will likely be adding soon.

The only way I found was to use CropTextureInput, but this cannot modify the script.

Yup, we'll be exposing this in the next update.

olokobayusuf commented 1 year ago

Succeeded by #52 where we'll be exposing a way for devs to attach their own transformations on the texture sent to the recorder.