适用于 Delphi 等非 C 族语言的 FFmpeg 解码简化库 FFDec 发布

FFmpeg is a very powerful library for video/audio encoding/decoding. But unfortunately it is very difficult to use in non-C/C++ developments. So I wrote this library a year ago to simplify it for other programming languages - especially for Delphi (but I think it would work in Free Pascal too).

The FFDec library consists of only ONE single DLL, which may be released as two versions (see below), and a Pascal header file, which loads the DLL dynamically. You can simply include the header and compile your code.

You can find the official site of FFDec on SF.net:
http://sourceforge.net/projects/ffdec/

The FFDec library wraps the original FFmpeg-APIs almost directly. The usage of FFDec functions is very similar to the libAV* functions. So you'd better get some FFmpeg knowledge before you work with FFDec. I'm sorry that I cannot provide a detailed documentation currently. However, I prefer you to read the DLL source code (it's short and simple) to get ideas of how it works.

The library is released under GPL or LGPL license depending on the embedded FFmpeg version. Both versions can be called in the same way, but the LGPL version may support less formats.

FFmpeg 是一个非常强大的视频/音频编码解码库。但是很可惜,人们很难将其应用到非 C/C++ 的工程中。因此我一年前将其重新封装为一个库并希望这一工作能够简化其在视频解码方面的应用——尤其是在 Delphi (或 Free Pascal) 中的应用。

FFDec 库由一个 DLL (有可能按照授权方式不同分为两个版本) 和一个负责动态装载 DLL 的 Pascal 头文件。用户可以直接将其加入到自己的工程中进行编译。

您可以访问在 SF.net 上 FFDec 的官方主页来取得最新的信息:
http://sourceforge.net/projects/ffdec/
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
如果你只需要使用 FFmpeg 的 MP3 解码进行 MP3 解码,可以按照以下步骤进行环境配置: 1. 安装 FFmpeg 在 Linux 系统中,可以使用包管理器来安装 FFmpeg。例如,在 Ubuntu 或 Debian 系统中,可以运行以下命令来安装 FFmpeg: ``` sudo apt-get install ffmpeg ``` 2. 安装 libmp3lame FFmpeg 的 MP3 解码依赖于 libmp3lame 。在 Ubuntu 或 Debian 系统中,可以使用以下命令来安装 libmp3lame : ``` sudo apt-get install libmp3lame-dev ``` 3. 配置 FFmpeg 在安装完 libmp3lame 之后,需要重新编译 FFmpeg,以便它可以使用 libmp3lame 进行 MP3 解码。 首先,需要下载 FFmpeg 的源代码: ``` git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg ``` 然后,进入 FFmpeg 的源代码目录,并运行以下命令: ``` ./configure --enable-libmp3lame make sudo make install ``` 这个命令将会重新编译 FFmpeg,并将 libmp3lame FFmpeg 集成在一起。 4. 解码 MP3 文件 使用 FFmpeg 解码 MP3 文件常简单,只需要在终端中运行以下命令即可: ``` ffmpeg -i input.mp3 output.wav ``` 这个命令将会把 `input.mp3` 文件解码成 WAV 格式的音频文件,并保存为 `output.wav`。 如果你需要指定解码后的音频格式,可以在输出文件的文件名中指定格式。例如,如果你想要将 MP3 文件解码成 AAC 格式的音频文件,可以运行以下命令: ``` ffmpeg -i input.mp3 output.aac ``` 这个命令将会把 `input.mp3` 文件解码成 AAC 格式的音频文件,并保存为 `output.aac`。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

数字蛋糕

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值