Audio-Video editing via Avisynth + Lua + OpenGL
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7e81afa May 21, 2012
Permalink
Failed to load latest commit information.
data added documentation and release built May 20, 2012
examples extended examples May 20, 2012
src defined .gitignore May 21, 2012
.gitignore defined .gitignore May 21, 2012
LICENSE added license May 21, 2012
README.md .md for readme format parsing May 20, 2012

README.md

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