lua-users home
lua-l archive

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


On Tue, 2011-03-22 at 09:26 -0700, Wesley Smith wrote:
> > Is there any simple way with Lua or any existing module available from Lua
> > framework for quick and fastest way Audio/Video codecs write and translate
> > that code into C/Java code? Just like translator for any upcoming new
> > Audio/Video codec to save life time.
> >
> > I am looking native Lua way to write without involving C/C++ following
> > staffs:
> >
> > - Video codec H.264
> > - Audio codec Opus/Speex
> > - Protocol BFLC and SIP
>
> Sounds like a job for FFMPEG to me.

FFMPEG/libavcodec works well with LuaJIT2 FFI, you can have a look at my
example [1] where I decode audio from any file containing an audio
stream. Using similar techniques, you can encode it and video too.

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