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

Make Movie Maker save to new file automatically if chosen file already exists #5989

Open
realkotob opened this issue Dec 24, 2022 · 4 comments · May be fixed by godotengine/godot#71420 or godotengine/godot#92067

Comments

@realkotob
Copy link

realkotob commented Dec 24, 2022

Describe the project you are working on

Not relevant.

Describe the problem or limitation you are having in your project

Currently when using the Movie Maker feature, the file name needs to be changed everytime from the Project Settings otherwise it will automatically overwrite the old one.

I know there is a trick using metadata in scenes to customize the file name, but that has the same issue (it overwrites automatically).

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I suggest incrementing the file name if it exists automatically, which is in line with how the Recorder feature works in Unity.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

When the recording starts, if the chosen file already exists then the file name will get incremented e.g. if the file name is C://movie.avi it becomes C://movie_1.avi

Unity has more complicated options to customize the file name increment, those are unnecessary and can be ignored in the screenshots. I have highlighted the relevant part with blue.

Screenshot 2022-12-24 at 21 24 34

If this enhancement will not be used often, can it be worked around with a few lines of script?

This can potentially be worked around with a plugin but it affects everyone who uses the Movie Maker, as the natural workflow is to take multiple successive takes while testing gameplay.
This is infinitely the more common use of Recorders than the "Cinematic" use case which is to script a lot of stuff and record one long video.

Is there a reason why this should be core and not an add-on in the asset library?

This is an essential usability feature.

@Calinou
Copy link
Member

Calinou commented Dec 24, 2022

How would this work with PNG image sequences? There are multiple files created (one PNG per frame + a WAV file).

Also, if this is implemented, this should most likely be done on the editor side (make it specify the expected CLI arguments directly). This way, you can get the old behavior back by running the engine with specific CLI arguments.

@realkotob
Copy link
Author

realkotob commented Dec 25, 2022

@Calinou In the case of image sequences I suggest the format: filename_<Take>_<Frame>.png

Screenshot 2022-12-25 at 09 16 06

Also, if this is implemented, this should most likely be done on the editor side (make it specify the expected CLI arguments directly). This way, you can get the old behavior back by running the engine with specific CLI arguments.

I can see this happening in a bunch of ways:

  1. We can make the number be an editor setting (saved in user settings) which is what it seems they do in Unity anyway.
    So the new behaviour becomes: every time you finish recording, the Take number is incremented, but you can also manually override the Take number to make it restore the old behaviour.

  2. Alternatively, we can also have an additional editor setting called "Increment filename instead of Overwrite" that is on by default, which is simpler.

  3. Ideally we would do exactly what happens in the shared pic -- let the player choose the string format of the name, as that provides the most flexibility and let's them do whatever they want. e.g. filename_<Take>_<Frame>.png to increment or filename_<Frame>.png to overrwrite.
    And this allows for additional magic strings to be injected later, like <ProjectName>_video_<Take>.avi

Let me know what you think, I can update the OP with the most reasonable change.

@Calinou
Copy link
Member

Calinou commented Dec 26, 2022

  1. We can make the number be an editor setting (saved in user settings) which is what it seems they do in Unity anyway.
    So the new behaviour becomes: every time you finish recording, the Take number is incremented, but you can also manually override the Take number to make it restore the old behaviour.

We should avoid making changes to editor settings without actual user interaction. A temporary cache file should be used for that instead.

  1. Alternatively, we can also have an additional editor setting called "Increment filename instead of Overwrite" that is on by default, which is simpler.

Sounds good to me.

  1. Ideally we would do exactly what happens in the shared pic -- let the player choose the string format of the name, as that provides the most flexibility and let's them do whatever they want. e.g. filename_<Take>_<Frame>.png to increment or filename_<Frame>.png to overrwrite.
    And this allows for additional magic strings to be injected later, like <ProjectName>_video_<Take>.avi

We strive to simplify editor settings rather than complexify them, so we should refrain from adding more editor settings than what's strictly needed.

@bitbutter
Copy link

@Calinou In the case of image sequences I suggest the format: filename_<Take>_<Frame>.png

I'm exporting png sequences with the movie maker right now and would love to use placeholders in the Move File field to dynamically create folders to put the pngs in (while avoiding overwrites). Having frames each live in a directory corresponding to the sequence they're part of helps me avoid error later. e.g. when importing png sequences into after effects i want to avoid hunting through multiple 'frame zero's in the same folder, instead i want to just open the relevant sequence directory and know that all frames in there make up the sequence i want. Foolproof!

As Movie File I'd like to be able to enter something like
C:/Users/MyPath/movie_writer/mygame_<Timestamp>/mygame_<Frame>.png

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