Code Monkey home page Code Monkey logo

fluag's Introduction

FLuaG


##Definition FLuaG (Floating Lua Graphics) is an Avisynth plugin for video/audio data editing via Lua scripting.

Allowing to transfer image/sample data between Avisynth and Lua, it works like a filter SDK. Inside Lua scripts it's possible to write 3D effects with OpenGL or others things by importing libraries to the Lua API. Regrettably FLuaG slows the process much more than an original filter in C/C++ but it makes the work easier.

##Features

  • All in one file
  • Video & audio access
  • OpenGL 2.1 + GL_ARB_imaging + GL_ARB_framebuffer_object support
  • Text extents & outline path
  • PNG image loading & saving
  • Math geometry functions
  • Onscreen rendering

##Examples test.avs

BlankClip(length=250, width=704, height=396, pixel_type="RGB32", fps=25, audio_rate=48000, channels=2, sample_type="16bit")

point_size = 50
FLuaG(audio="test_audio.lua", video="test_video.lua", onscreen=false, samples32=false, userdata="point_size")

test_audio.lua

function GetSamples(start_sample_index, start_sample_ms, count)
    local samples = {}

    for i=1, count * AUDIO_CHANNELS do
        samples[i] = math.random(-32768, 32767)
    end

    SaveSamples(samples)
end

test_video.lua

glPointSize(USERDATA[1])

function GetFrame(frame_index, frame_ms)
    LoadFrameToContext()

    glBegin(GL_POINTS)
        glVertex(0,0)
    glEnd()

    SaveFrameFromContext()
end

--

test.avs: using FLuaG on a blank clip to edit audio data by "test_audio.lua" and video data by "test_video.lua"

test_audio.lua: random noise

test_video.lua: point at mid

fluag's People

Contributors

youka avatar

Watchers

James Cloos avatar  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.