FFmpeg Understanding(5. How to install GSM lib for FFMPEG?)

How to install GSM lib for FFMPEG?

It is a painful experience to compile and install GSM lib for FFMPEG in the environment of MINGW, whereas a good result gives me some comfort. I guess that many users will meet the same troubles as mine, so I write them to share with you. I think that it will be a great help for who like shot way, right?!

It is unlucky that I have not successfully compiled it in the latest version, for example, libgsm_1.0.10-13, because many errors burn my enthusiasm downL. At last, I give up. However, I believe that I can eliminate them later, and re-share them with you.

Anyway, this article focuses on the old version gsm-1.0.12.tar.gz. Likewise other libs, it needs patch(libgsm_1.0.10-13.diff.gz) to make it run, do you like it?! No matter what, we must follow the rule of open source. As mentioned before, open source is free for anything, and often gives you additional gifts. Enjoy them and happy day!

1. Download them form the hyperlink.

2. Uncompress them. It is very simple operation and shown in the following table.

$ tar xvzf ./gsm-1.0.12.tar.gz

$ unzip ./ libgsm_1.0.10-13.diff.gz

$ patch –p0 < ./ libgsm_1.0.10-13.diff

3. Enter gsm folder.

$ cd ./gsm-1.0-pl12

4. Edit Makefile.

INSTALL_ROOT   = /mingw

GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include

‘INSTALL_ROOT’ indicate the root to install lib and header files.

‘GSM_INSTALL_INC’ is error in the original file and correct it.

5. Make it! Why do you hesitate?!

$ make

./src/toast.o:toast.c:(.text+0x978): undefined reference to `fchmod'

./src/toast.o:toast.c:(.text+0x9af): undefined reference to `fchown'

collect2: ld returned 1 exit status

make: *** [bin/toast] Error 1

WOW, Angry?! Hit the desk heavy, and “$#2%%68sssZzzz#!!!”. Try my best to find gcc lib in the MINGW, unfortunately, it does not exist!!! Disappointed, unhelpful, …, come out! After some minute silence, A thinking arises in my brain, whether libgsm.a has been generated because toast.c looks like a testing program. After rechecking toast.c, it is confirmed. Great! Let’s go!

6. Install GSM into MINGW.

$ make install

7. Install GSM into FFMPEG

$ ./configure --prefix=/mingw --enable-memalign-hack --enable-shared --disable-static --enable-w32threads --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-gpl --enable-avfilter --enable-postproc --enable-avfilter-lavf --enable-swscale --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libfaac --enable-libfaad --enable-libgsm

$ make

$make install

 

Yeah, successful!

 

Summarize

1. Please keep patient when using the SW of open source. Good toast only can be enjoyed after making efforts!

2. Recheck the configurations in terms of the compiling errors. This case indicates that we can obtain the result even if compiler shows the unrelated errors.

3. After failing to deal with them, please search whether wise users have another solution.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值