Reputation: 425
I am trying to speed up audio and video to 4 times using a C# wrapper class for ffmpeg.
Here is how it looks.
var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
ConvertSettings convertSettings = new ConvertSettings
{
CustomOutputArgs = "-filter_complex \"[0:v]setpts = 0.25 * PTS[v];[0:a] atempo=2.0[a],atempo=2.0[a] \" -map \"[v]\" -map \"[a]\""
};
string inputpath = tempvideolocation + "/tempvideo.mp4";
string outputpath = tempvideolocation + "/convertedvideo.mp4";
ffMpeg.ConvertMedia(inputpath, Format.mp4, outputpath, Format.mp4, convertSettings);
But i get "Error - Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_atempo_2 (exit code: 1)"
Upvotes: 1
Views: 1100
Reputation: 133713
Linear filters do not need intermediate labels so change:
atempo=2.0[a],atempo=2.0[a]
to:
atempo=2.0,atempo=2.0[a]
Upvotes: 3