Force DDAgrab framerate, add -shortest
to combined output to reduce dropped frames at the end of the final clip
This commit is contained in:
parent
8f96bb6029
commit
b91ed611d0
|
@ -233,7 +233,7 @@ class Program
|
|||
var date = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss");
|
||||
_videoFilePath = $"{_ffmpegFolderPath}\\{songName}_{date}.mkv";
|
||||
var ffmpegArguments = $"-framerate {_framerate} " +
|
||||
$"-filter_complex \"ddagrab=0,hwdownload,format=bgra\" " +
|
||||
$"-filter_complex \"ddagrab=framerate={_framerate},hwdownload,format=bgra\" " +
|
||||
$"-c:v libx264 -tune zerolatency -crf {_crf} -video_size {_resolution} -movflags +faststart -y \"{_videoFilePath}\"";
|
||||
_ffmpegProcess = new Process
|
||||
{
|
||||
|
@ -280,7 +280,7 @@ class Program
|
|||
{
|
||||
var combinedOutputFilePath = $"{_ffmpegFolderPath}\\{songName}_combined_{DateTime.Now:yyyy-MM-dd_HH-mm-ss}.mp4";
|
||||
var ffmpegArgs =
|
||||
$"-y -i \"{videoFilePath}\" -i \"{audioFilePath}\" -c:v copy -c:a aac -strict experimental \"{combinedOutputFilePath}\"";
|
||||
$"-y -i \"{videoFilePath}\" -i \"{audioFilePath}\" -c:v copy -c:a aac -strict experimental -shortest \"{combinedOutputFilePath}\"";
|
||||
|
||||
var processInfo = new ProcessStartInfo
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue