diff --git a/src/imgui/window/animation_preview.cpp b/src/imgui/window/animation_preview.cpp index 6cf53ad..aafca09 100644 --- a/src/imgui/window/animation_preview.cpp +++ b/src/imgui/window/animation_preview.cpp @@ -147,7 +147,7 @@ namespace anm2ed::imgui } else { - if (animation_render(ffmpegPath, path, renderFrames, audioStream, (render::Type)type, size, anm2.info.fps)) + if (animation_render(ffmpegPath, path, renderFrames, audioStream, (render::Type)type, size)) { toasts.push(std::vformat(localize.get(TOAST_EXPORT_RENDERED_ANIMATION), std::make_format_args(pathString))); logger.info(std::vformat(localize.get(TOAST_EXPORT_RENDERED_ANIMATION, anm2ed::ENGLISH), diff --git a/src/render.cpp b/src/render.cpp index dd4c4b5..914168e 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -19,9 +19,9 @@ using namespace glm; namespace anm2ed { bool animation_render(const std::filesystem::path& ffmpegPath, const std::filesystem::path& path, - std::vector& frames, AudioStream& audioStream, render::Type type, ivec2 size, int fps) + std::vector& frames, AudioStream& audioStream, render::Type type, ivec2 size) { - if (frames.empty() || size.x <= 0 || size.y <= 0 || fps <= 0 || ffmpegPath.empty() || path.empty()) return false; + if (frames.empty() || size.x <= 0 || size.y <= 0 || ffmpegPath.empty() || path.empty()) return false; auto pathString = path::to_utf8(path); auto ffmpegPathString = path::to_utf8(ffmpegPath); @@ -85,8 +85,8 @@ namespace anm2ed } } - command = std::format("\"{0}\" -y -f rawvideo -pix_fmt rgba -s {1}x{2} -r {3} -i pipe:0", ffmpegPathString, size.x, - size.y, fps); + command = std::format("\"{0}\" -y -f rawvideo -pix_fmt rgba -s {1}x{2} -r 30 -i pipe:0", ffmpegPathString, size.x, + size.y); if (!audioInputArguments.empty()) command += " " + audioInputArguments; diff --git a/src/render.h b/src/render.h index 5abc2ae..c3c9e89 100644 --- a/src/render.h +++ b/src/render.h @@ -37,5 +37,5 @@ namespace anm2ed { std::filesystem::path ffmpeg_log_path(); bool animation_render(const std::filesystem::path&, const std::filesystem::path&, std::vector&, - AudioStream&, render::Type, glm::ivec2, int); + AudioStream&, render::Type, glm::ivec2); } \ No newline at end of file