Giter Club home page Giter Club logo

xabe.ffmpeg's Introduction

Xabe.FFmpeg

Build Status NuGet version GitHub issues GitHub stars GitHub license HitCount Join the chat at https://gitter.im/Xabe-FFmpeg/Lobby

.NET Standard wrapper for FFmpeg. It's allow to process media without know how FFmpeg works, and can be used to pass customized arguments to FFmpeg from dotnet core application.

List of features and wiki

If you want to push something

Using

You have to have installed FFmpeg and added it to your PATH variable OR specify directory where FFmpeg and ffprob are before run conversion in variable FFbase.FFmpegDir OR have FFmpeg and FFprobe in directory with you executable.

Default the library is trying to find FFmpeg executables names contains "ffprobe", "ffmpeg". This function is case insensitive. Those names can be changed in FFbase.FFmpegExecutableName and FFbase.FFprobeExecutableName.

Install the Xabe.FFmpeg NuGet package via nuget:

PM> Install-Package Xabe.FFmpeg

Creating media info:

IMediaInfo mediaInfo = new MediaInfo("videofile.mkv");

Media info contains information about video like: duration, audio format, video format, radio, frame rate, height, width, size in Properties property.

It is possible to have more elastic way to convert media. Conversion class is builder for FFmpeg command. You can specify all implemented FFmpeg options and run process:

string output = Path.ChangeExtension(Path.GetTempFileName(), ".mp4");
bool result = await ConversionHelper.ToMp4("videofile.mkv", output)
                                .Start();

or

string outputPath = Path.ChangeExtension(Path.GetTempFileName(), Extensions.Mp4);
bool conversionResult = await new Conversion()
	.SetInput("videofile.mkv")
	.Rotate(rotateDegrees)
	.SetOutput(outputPath)
	.Start();

it is possible to give your own arguments

bool conversionResult = await new Conversion().Start("-i \"C:\Xabe.FFmpeg.Test\bin\Debug\netcoreapp2.0\Resources\SampleVideo_360x240_1mb.mkv\" \"C:\Users\tzmuda\AppData\Local\Temp\tmp9B8A.mp4\"");

Lincence

Xabe.FFmpeg is licensed under MIT - see License for details.

Contact

Feel free to ask any questions on Gitter or write e-mail to [email protected]

xabe.ffmpeg's People

Contributors

tomaszzmuda avatar alex6dj avatar lkischler avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.