radek-k / FFMediaToolkit

FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
MIT License
352 stars 56 forks source link

Green video for the first few seconds #42

Closed baldvinhansson closed 3 years ago

baldvinhansson commented 3 years ago

I am creating a video using 1920x1080 30fps H264 to a file name of mp4 with CRF 23 (have tried various other CRF, makes no difference).

The first few seconds (sometimes up to 8 seconds) of the video are (as it appears to me) lacking a key frame at the start of the video. So they show up as decoding artifacts on a green screen. Then it kicks in a bit later with a key frame and from there on, everything is ok.

I can't see there is a way for me to configure or request a key frame at the start of the video file. So I wonder, am I missing something?

My video is being created from a bunch of JPG's. And they look great as soon as this green period is over.

Thank you so much for taking the time to review this. And thank you for a wonderful toolkit!