Skip to content

Commit

Permalink
Update ffmpeg.cpp
Browse files Browse the repository at this point in the history
The option `-vsync` is deprecated now, so it should use `-fps_mode` instead.
  • Loading branch information
ProtagNeptune authored Sep 2, 2024
1 parent 4a4612b commit dbbc9ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/src/external/ffmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ QString FFmpeg::convertUgoira(const QString &file, const QList<QPair<QString, in
// Build the params
QStringList params = { "-n", "-loglevel", "error", "-i", ffconcatFile.fileName() };
if (extension == QStringLiteral("gif")) {
params.append({ "-filter_complex", "[0:v]split[a][b];[a]palettegen=stats_mode=diff[p];[b][p]paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle", "-vsync", "0" });
params.append({ "-filter_complex", "[0:v]split[a][b];[a]palettegen=stats_mode=diff[p];[b][p]paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle", "-fps_mode", "passthrough" });
} else if (extension == QStringLiteral("apng")) {
params.append({ "-c:v", "apng", "-plays", "0", "-vsync", "0" });
params.append({ "-c:v", "apng", "-plays", "0", "-fps_mode", "passthrough" });
} else if (extension == QStringLiteral("webp")) {
params.append({ "-c:v", "libwebp", "-lossless", "0", "-compression_level", "5", "-quality", "100", "-loop", "0", "-vsync", "0" });
params.append({ "-c:v", "libwebp", "-lossless", "0", "-compression_level", "5", "-quality", "100", "-loop", "0", "-fps_mode", "passthrough" });
} else if (extension == QStringLiteral("webm")) {
params.append({ "-c:v", "libvpx-vp9", "-lossless", "0", "-crf", "15", "-b", "0", "-vsync", "0" });
params.append({ "-c:v", "libvpx-vp9", "-lossless", "0", "-crf", "15", "-b", "0", "-fps_mode", "passthrough" });
} else {
params.append({ "-c:v", "copy" });
}
Expand Down

0 comments on commit dbbc9ea

Please sign in to comment.