• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

acowley/ffmpeg-light: Minimal Haskell bindings to the FFmpeg library

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

acowley/ffmpeg-light

开源软件地址(OpenSource Url):

https://github.com/acowley/ffmpeg-light

开源编程语言(OpenSource Language):

Haskell 92.2%

开源软件介绍(OpenSource Introduction):

Minimal bindings to the FFmpeg library.

Stream frames from an encoded video, or stream frames to a video output file. To read the first frame from an h264-encoded file into a JuicyPixels Maybe DynamicImage,

import Codec.FFmpeg
import Codec.Picture
import Control.Applicative

go :: IO (Maybe DynamicImage)
go = do initFFmpeg
        (getFrame, cleanup) <- imageReader (File "myVideo.mov")
        (fmap ImageRGB8 <$> getFrame) <* cleanup

A demonstration of creating an animation using the Rasterific library may be found in demo/Raster.hs. A weird animated variation of the Rasterific logo is the result:

Animated Rasterific Logo

Note that encoding an animation to a modern video codec like h264 can result in even smaller files. But those files can't be embedded in a README on github.

Tested on OS X 10.9.2 with FFmpeg 2.2.1 installed via homebrew.

Debian and Ubuntu users: Your package manager's ffmpeg package is actually a not-quite-compatible fork of the ffmpeg project. To use ffmpeg-light, run the included ffmpeg-ubuntu-compile.sh script as regular (non-root) user. This builds the ffmpeg libraries locally. Configure your projects that depend on ffmpeg-light with a modified PKG_CONFIG_PATH:

PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" cabal configure --disable-shared my-project

There are signs that the next Ubuntu release will come with the original ffmpeg and development packages.

Build Status




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap