aboutsummaryrefslogtreecommitdiff
path: root/src/FileAnalyzer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/FileAnalyzer.cpp')
-rw-r--r--src/FileAnalyzer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/FileAnalyzer.cpp b/src/FileAnalyzer.cpp
index 4deb8c3..1d24c5f 100644
--- a/src/FileAnalyzer.cpp
+++ b/src/FileAnalyzer.cpp
@@ -157,6 +157,7 @@ namespace QuickMedia {
char size_arg_str[512];
snprintf(size_arg_str, sizeof(size_arg_str), "scale=%d:%d:force_original_aspect_ratio=decrease", width, height);
+ // TODO: Dont output as jpg, ffmpeg jpg is very slow
const char *program_args[] = { "ffmpeg", "-y", "-v", "quiet", "-ss", seconds_str, "-i", file.get_filepath().c_str(), "-frames:v", "1", "-vf", size_arg_str, "--", destination_path_tmp.data.c_str(), nullptr };
if(exec_program(program_args, nullptr, nullptr, allowed_exit_status, 2) != 0) {
fprintf(stderr, "Failed to execute ffmpeg, maybe its not installed?\n");
@@ -168,6 +169,7 @@ namespace QuickMedia {
if(fallback_first_frame && get_file_type(destination_path_tmp) == FileType::FILE_NOT_FOUND)
return video_get_frame(file, destination_path, width, height, 0, false);
} else {
+ // TODO: Dont output as jpg, ffmpeg jpg is very slow
const char *program_args[] = { "ffmpeg", "-y", "-v", "quiet", "-ss", seconds_str, "-i", file.get_filepath().c_str(), "-frames:v", "1", "--", destination_path_tmp.data.c_str(), nullptr };
if(exec_program(program_args, nullptr, nullptr, allowed_exit_status, 2) != 0) {
fprintf(stderr, "Failed to execute ffmpeg, maybe its not installed?\n");