lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Mar 3, 2011 at 2:18 PM, Michal Kottman <k0mpjut0r@gmail.com> wrote:
> On Thu, 2011-03-03 at 11:55 +0530, Jayanth Acharya wrote:
>
>> Q4. Anyone aware of existing Lua bindings for ffmpeg / mplayer projects ?
>
> Technically not a binding, but after the release of LuaJIT FFI, I was
> experimenting with ffmpeg libraries (libavcodec, libavformat). I wrote a
> simple program [1] that uses libavcodec to decode a file containing
> audio into a raw array of samples (and it's pretty fast). I want to try
> some signal processing on that later.

Just read up a little about LuaJIT FFI, and at the outset seems like a
wonderful approach.
I'd have to dig deeper for a better grasp, but I am guessing that it
allows one a deterministic access to things like constants as well
(i.e. if I know the constant / literal's name, I'd know how to refer
to it in Lua as well).

BTW, other than lack of LuaJIT's availability on certain target
architectures/platforms, is there any reason why people may not want
to use it, but stick to Lua VM ?

> You should be able to work with video the same way (video processing in
> Lua? Crazy :)

Probably, I am :-). My intention of working with ffmpeg isn't in the
context of extremely CPU intensive codecs like h264/vp8 etc., but much
simpler codecs, and basic containers, so I am guessing that the perf.
hit I take wouldn't be crippling.

> [1] https://github.com/mkottman/ffi_fun/blob/master/ffmpeg_audio.lua