m3u8_segmenter

最近研究hls,发现需要使用m3u8_segmenter这个程序,搞了半天才编译通过,特此记录一下。

使用正常的./configure等编译老是出错误

gcc -Wall -g m3u8-segmenter.c -o segmenter -lavformat -lavcodec -lavutilm3u8-segmenter.c: In function add_output_stream:

m3u8-segmenter.c:58: warning: implicit declaration of function avformat_new_stream

m3u8-segmenter.c:58: warning: assignment makes pointer from integer without a cast

m3u8-segmenter.c: In function main:

m3u8-segmenter.c:343: warning: implicit declaration of function avformat_find_stream_info

m3u8-segmenter.c:380: error: AVFMT_FLAG_IGNDTS’ undeclared (first use in this function)

m3u8-segmenter.c:380: error: (Each undeclared identifier is reported only once

m3u8-segmenter.c:380: error: for each function it appears in.)

m3u8-segmenter.c:390: warning: implicit declaration of function avcodec_open2

m3u8-segmenter.c:397: error: AVIO_FLAG_WRITE’ undeclared (first use in this function)

 

在网上查资料,特别是参考xjd_1985的文章,m3u8-segmenter工程编译和使用

 

./configure FFMPEG_CFLAGS=-I../ffmpeg-2.1.1  FFMPEG_LIBS='-L ../ffmpeg-2.1.1/libavformat -L../ffmpeg-2.1.1/libavcodec -L../ffmpeg-2.1.1/libavutil -pthread -lavformat -lavcodec -lavutil -lm -lz'

 



ffmpeg-2.1.1是我使用ffmpeg的版本和目录

然后再make就通过了。


 ./configure FFMPEG_LIBS="-L/home/yod/workbench/ffmpeg-2.6/build_out/lib -pthread -lavformat -lavcodec -lavutil -lswscale -lswresample    -lm -lz" FFMPEG_CFLAGS=-I/home/yod/workbench/ffmpeg-2.6/build_out/include


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值