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

How to use MediaOptions.DecoderOptions? (Question) #59

Closed marksugrue closed 3 years ago

marksugrue commented 3 years ago

MediaOptions.DecoderOptions is a dictionary of strings that get passed in on MediaFile.Open(filename, mediaOptions).

I can't seem to find documentation for this. Does it correspond to the ffmpeg commandline parameters? I've tried the following without success

mediaOptions.DecoderOptions.Add("f", "h264");

radek-k commented 3 years ago

DecoderOptions does not match all command-line parameters, but only the codec options listed in the FFmpeg documentation: https://www.ffmpeg.org/ffmpeg-codecs.html#Codec-Options. The MediaFile class is designed for extracting frames from a video to process them or export as bitmap data. If you want to simply convert a video file, you should use other libraries that call FFmpeg via command-line.