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

Field not found when creating container with video #101

Closed oiproks closed 2 years ago

oiproks commented 2 years ago

When executing MediaBuilder.CreateContainer(PathToFile).WithVideo(settings).Create(); I get an ExceptionUnhandled:

System.MissingFieldException: 'Field not found: 'FFmpeg.AutoGen.AVStream.codec'.'

Settings:

 var settings = new VideoEncoderSettings(width: img.Width, height: img.Height, framerate: 30, codec: VideoCodec.H264);
settings.EncoderPreset = EncoderPreset.Fast;
settings.CRF = 18;

image

radek-k commented 2 years ago

Fixed in the v4.2.0 release.