ddnet icon indicating copy to clipboard operation
ddnet copied to clipboard

'Render all' button for demos

Open Chikowitz opened this issue 3 years ago • 6 comments

Is it possible to implement a 'render all' button in demos section? Similar to current 'render' button, but it will render all the demos in the current folder one by one.

image

Lumpy ◐ω◑

Chikowitz avatar Sep 01 '22 10:09 Chikowitz

Guess we could make the start_video command work at client start, then you can create a script to render all demos. Similar to how you can start a demo at client start directly

Jupeyy avatar Sep 11 '22 07:09 Jupeyy

Thing is, how would it notify you that there are files with the same name? Would it show the files that clash in a list?

VoxelDoesCode avatar Sep 15 '22 08:09 VoxelDoesCode

hm, why would there be files with the same name?

Chikowitz avatar Sep 15 '22 08:09 Chikowitz

For exporting videos. Say, you export a demo into an MP4. Later on, you decide to render the whole folder, with the same demo inside of it. Assuming you can't rename the demos when you render all, there would be an attempt to render a video with the same name as the previous one.

VoxelDoesCode avatar Sep 15 '22 08:09 VoxelDoesCode

well just replace or ask before the render as it is now

Chikowitz avatar Sep 15 '22 11:09 Chikowitz

I suggest adding the following command/config variables to support video batch rendering:

  • cl_video_initialspeed: stores the speed value for the demo render popup, so this can be set when lauching the client. The "Show chat" etc. checkbox states are already saved in config variables.
  • cl_video_initialpaused: stores the paused value for the demo render popup, so we would consistently store all state of the popup. Wouldn't be useful for video batch rendering though, so I'm not sure about this.
  • video_batch s[demo-file] ?s[video-file]: adds a job for batch rendering a demo. The output file will be overwritten if it already exists. The client will add the batch jobs to a queue and render each demo individually.
  • cl_video_batch_quit_on_completion: sets whether the client will quit when all batch rendering jobs have been completed.

That should make it possible to batch render multiple demos at once from the terminal.

Robyt3 avatar Jun 09 '24 09:06 Robyt3