Settings that equal video seconds #20
-
I feel really dumb and your probably tired of my questions but I'm trying to figure out the proper formula to create a video thats a length of x. So in story mode lets say I have 4 stories.. separated by a ^ and lets say I want each story to run 5 seconds long what are the proper settings.. out of the code block here.
the videos I have done that are longer seem to loop back to the first and second story for some reason.. :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Good question, and I hope I can clarify this. In your example, video_frames will create 4000 iterations. Every 10ths iteration will be saved to disk as a sequentially named PNG. So in this case you end up with 400 frames of video. The duration of the video is determined when you run encode_video. FFMPEG will take your 400 frames of video and encode them based on the output_framerate parameter. If you wanted to treat that as 24 fps footage, you set output_framerate=24, and then you would get 400/24 = 16.6 seconds of footage. So the final duration is You can also add ffmpeg interpolation to that output footage if you use the optional assumed_input_framerate parameter. If you use this, you can speed up or slow down the footage by the ratio of output_framerate / assumed_input_framerate . Typing this out, I realize it's not super clear. In v1.2.0 I believe I'll change encode_video to require input_framerate, and make output_framerate optional. With that change the duration would always be iterations / save_every / input_framerate, and you would only be able change the video footage interpolation with output_framerate. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I missed your comment about prompts. Yes, the way story prompts work is that they cycle back to the beginning if you run out of prompts. I don't really use story prompts and don't feel strongly. If you would prefer that they just stick to the last prompt when you get to the end of the list I can make that change. |
Beta Was this translation helpful? Give feedback.
Good question, and I hope I can clarify this.
In your example, video_frames will create 4000 iterations. Every 10ths iteration will be saved to disk as a sequentially named PNG. So in this case you end up with 400 frames of video.
The duration of the video is determined when you run encode_video. FFMPEG will take your 400 frames of video and encode them based on the output_framerate parameter. If you wanted to treat that as 24 fps footage, you set output_framerate=24, and then you would get 400/24 = 16.6 seconds of footage.
So the final duration is
iterations / save_every / output_framerate = seconds of footage.
You can also add ffmpeg interpolation to that output footage if you use the o…