I'm trying to make video editor tool.
[Environment] C# WPF OpenCVSharp4.5
When encoding video,I have to set some config.(fps/width/height/codec/bitrate/field-order) But,can't set field-order with opencv's videowriter.
VideoWriter video = new VideoWriter(
outPutFilePath,
VideoCaptureAPIs.FFMPEG,
VideoWriter.FourCC(Char.Parse("M"),
Char.Parse("P"),
Char.Parse("4"),
Char.Parse("V"),
fps,
new OpenCvSharp.Size(Width, Height),
true);
for (int movePos = StartFrame; movePos < EndFrame; movePos++)
{
PosFrames = movePos;
Mat mat = SetMatFromFrameNo(PosFrames);
video.Write(mat);
Cv2.WaitKey(1);
}
so,I'm trying to use piped ffmpeg. But I have no idea.
Could you tell how to encode video From VideoCaptures. thanks.