Git Product home page Git Product logo

dotnet-timecode's Introduction

What is Dotnet Timecode?

CI NuGet Nuget

Dotnet Timecode is a single class c# library built to create an API for working with SMPTE Timecodes defined by the Society of Motion Picture and Television Engineers in the SMPTE 12M specification.

The library allows the user to construct timecode objects, manipulate timecode values, and convert between the most common framerates, including drop frame framerates such as 29.97DF and 59.95DF.

How do I get started?

Get the latest nuget package using the dotnet CLI

dotnet add package DotnetTimecode

or using the Nuget Package Manager

Install-Package DotnetTimecode

Add a reference to the library, then simply construct your objects.

Examples:

using DotnetTimecode;
using DotnetTimecode.Enums;

var foo = new Timecode(Framerate.fps30);
var bar = new Timecode(10, 00, 00, 00, Framerate.fps59_94_DF);
var baz = new Timecode("10:00:00:00", Framerate.fps24);

foo.ToString() // "00:00:00:00"
bar.AddMinutes(-61).ToString(); // "08:59:00:00"
baz.ConvertFramerate(Framerate.fps25).ToString(); // "09:36:00:00"

Public endpoints

Constructors

Timecode(Enums.Framerate framerate);
Timecode(int hour, int minute, int second, int frame, Enums.Framerate framerate);
Timecode(string timecode, Enums.Framerate framerate);

Methods

string timecodeString = timecodeObj.ToString();
timecodeObj.AddHours(1);
timecodeObj.AddMinutes(1);
timecodeObj.AddSeconds(120);
timecodeObj.AddFrames(1);
timecodeObj.ConvertFramerate(Enums.Framerate targetFramerate);

Properties

int hour = timecodeObj.Hour;
int minute = timecodeObj.Minute;
int second = timecodeObj.Second;
int frame = timecodeObj.Frame;
int totalFrames = timecodeObj.TotalFrames;
Enums.Framerate framerate = timecodeObj.Framerate;
string timecodeRegex = Timecode.RegexPattern;

Contributions

See CONTRIBUTING.md and CODE_OF_CONDUCT.md for instructions on how to contribute to the project.

License, etc.

Dotnet Timecode is Copyright © 2022 Rasmus Broborg and other contributors under the MIT license.

Contributors

dotnet-timecode's People

Contributors

rasmusbroborg avatar leijon avatar gopinathrakkiyannan 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.