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

Applying video filter while encoding images into video #98

Closed Oscar-Verver closed 2 years ago

Oscar-Verver commented 2 years ago

I'm trying to use this package to convert from a custom filetype somebody created into a filetype that can be uploaded onto Vimeo. I can extract images, and pair those up into a dfisheye 360 video projection, and encode those using the FFMediaToolkit. But in order to upload 360 to Vimeo I'll need an equirectangular projection. I can do this in FFmpeg through the command line, but can't figure out how to do it in this toolkit/don't know if this filter can be applied while encoding images. Using the settings library isn't working the way I expected it to work: settings.CodecOptions.Add("vf", "v360=dfisheye:equirect:ih_fov=185:iv_fov=185:yaw=-90"); //doesn't seem to do the trick. Without it my program outputs to dfisheye and with it still outputs the same dfisheye.

Would you be interested in helping me figure this out?

source snippet.txt

IsaMorphic commented 2 years ago

FFMediaToolkit is not an API for accessing the ffmpeg tool itself, it is for managed access to the low level decoding, encoding, and seeking APIs that the ffmpeg tool also happens to use.
I'd recommend calling ffmpeg.exe from the command-line to achieve the behavior you're expecting.

Oscar-Verver commented 2 years ago

Thanks yodadude2003; guess that resolves the question <3