Open tigrouind opened 1 month ago
Thanks for the report, can you try
i % 2 == 0
instead of rand.Next()
for the alternating images?That'll help narrow it down, but I'll look into the other issues as well.
@Twometer :
i % 2 == 0
but I edited it, fearing that WriteVideoFrame()
would always end up on a odd or even value (thus using same color) because calls are interleaved with WriteAudioFrame()
.
Code to reproduce the issue
Expected result
The movie alternate between yellow and red frames.
Actual result
Only first frame is shown. Time length of movie seems correct (there is as many frames as expected).
Additionally
Here is a list of things that are not obvious and took me lot of time to figure out :
FFmpeg.AutoGen
dlls which are newer than this project. Here is a link to same version as the one used by the library.AccessViolationException
. Instead, writer should throw a custom exception with an explicit message. It's possible to use a custom resolution by settingwriter.Width
andwriter.Height
before callingwriter.Open()
.WriteVideoFrame()
/WriteAudioFrame()
alternatively. You are not supposed to callWriteVideoFrame()
consecutively (even if video does not contains audio). Library should detect that and throw an exception (unless it is supported).