Fix proxy generation by explicitly setting ffmpeg output format
ffmpeg could not infer the container format because ProxyManager writes proxies to a temporary '.mp4.working' file. Explicitly pass '-f mp4' (or the configured proxy extension) so ffmpeg knows the output format regardless of the temporary extension.
This commit is contained in:
@@ -69,6 +69,9 @@ bool ProxyTask::Run()
|
||||
.arg(QString::number(params_.width),
|
||||
QString::number(params_.height));
|
||||
|
||||
const QString container_format =
|
||||
params_.extension.isEmpty() ? QStringLiteral("mp4") : params_.extension;
|
||||
|
||||
QStringList args;
|
||||
args << QStringLiteral("-y")
|
||||
<< QStringLiteral("-i") << source_filename_
|
||||
@@ -80,6 +83,7 @@ bool ProxyTask::Run()
|
||||
<< QStringLiteral("-crf") << QStringLiteral("23")
|
||||
<< QStringLiteral("-pix_fmt") << QStringLiteral("yuv420p")
|
||||
<< QStringLiteral("-movflags") << QStringLiteral("+faststart")
|
||||
<< QStringLiteral("-f") << container_format
|
||||
<< output_filename_;
|
||||
|
||||
QProcess process;
|
||||
|
||||
Reference in New Issue
Block a user