当前位置:首页 » 编程软件 » vlcmingw编译

vlcmingw编译

发布时间: 2023-04-16 06:57:52

① 求vlc播放器的源代码

最新版源码下载地址: http://download.videolan.org/pub/videolan/vlc/1.1.7/vlc-1.1.7.tar.bz2
但是官方不支持使用VC编译,并且不建议使用VC,移植难度很大。
官方支持的是MingW或者Cygwin,也就是GCC的Windows版。编译方法见官方Wiki:
- http://wiki.videolan.org/Win32CompileMSYS
- http://wiki.videolan.org/Win32CompileCygwin

② vlc for android 源码能不能在windows环境下编译

1. 准备编译环境

基本上按照这篇wiki的介绍就足够了,为了顺利完成编译,建议首先保证相关的软件或者依赖库都已经下载好了,我再强调一下几个重点注意事项。

(1) Android SDK:必须使用SDK Platform Android 5.0, API 21,因为VLC-for-android用到了Android 5.0 的一些API。

(2) 最好通过apt-get install 把下面这些依赖的软件都安装一遍,或更新到最新版

git,apache-ant (or ant), autoconf, automake, autopoint, cmake,
gawk (or nawk), gcc, g++, libtool, m4, patch, pkg-config, ragel,
subversion, unzip.

2. 下载源码包

直接通过git下载VLC-for-android最新的源码即可:

git clone git://git.videolan.org/vlc-ports/android.git

3. 编译VLC源码和VLC Android工程

(1) 配置编译环境变量

具体参考wiki的介绍,你可以写个shell脚本来执行,避免每次编译都要配置,下面是我的环境变量,可以根据你的路径修改:

#! /bin/sh

export ANDROID_SDK=/opt/android/sdk/

export ANDROID_NDK=/opt/android/android-ndk-r10/

export ANT_DIR=/opt/android/ant/

export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools:$ANT_DIR

export ANDROID_ABI=armeabi-v7a

(2) 执行编译

sh compile.sh

VLC不愧是使用这么广泛的播放器,它的编译脚本写得非常强大和智能,直接通过执行compile.sh,它会自动check所有的依赖,并通过网络去下载缺失的库。

首先,它会下载vlc的源码,并存放在当前目录下。然后去下载依赖的第三方库文件。

当然,由于GFW的存在,有的时候下载会失败,这个时候,就需要你手动去Google搜索它正在下载的依赖文件,手动下载好了之后放到 vlc/contrib/tarballs目录下,然后再回到命令行重新执行 sh compile.sh

它依赖的全部第三方库文件如图所示:

(3) 编译问题

编译过程还算顺利,只出现过一个大问题,如下:

google/protobuf/unittest.proto:853:21: Missing field number.

google/protobuf/unittest.proto:862:1: Reached end of input in message definition (missing '}').

make[3]: *** [unittest_proto_middleman] Error 1

网上也搜不到解决方案,我看了下GitHub上Protobuf的Readme,然后下载了最新的protobuf放到vlc/contrib
/tarballs/contrib-android-arm-linux-androideabi/protobuf目录下,执行.
/configure --disable-shared,再编译,没想到就直接过了。

4. 加载VLC-For-Android的Java工程

编译通过后,就可以直接在vlc-android/bin目录下看到debug版的apk了,下面简单说说在Eclipse中加载vlc-android的整个工程。

打开Eclipse,选择Import,把vlc-for-android目录下所有的工程到导入到Eclipse中(我去掉了TV工程),如图所
示,有5个必须的工程,其中,VLC是主工程,其他四个都是Lib工程。没有什么意外的话,直接运行VLC工程,就可以在Android手机上看到VLC
播放器应用了!

③ 如何使 vlc 支持 fdk-aac 编码windows平台

可能是由于fdk-aac开源协议的原因,VLC默认是不支持fdk-aac编码的,fdk-aac 是非常优秀的AAC编码库,并且支持AAC-LD AAC-ELD, 对于要求低延迟的场景下很有用。
可以通过修改VLC的编译脚本,并加入fdkaac库来使用VLC支持fdkaac编码器。
我是在64位的ubuntu16.04下编译的,vlc的编译方法参考VLC官网的编译文档。

1 修改vlc/extras/package/win32/configure.sh , 加入--enable-fdkaac, 这样VLC就会编译fdkaac这个模块。
执行make,会出现编译错误
as/package/win32/../../../moles/codec/fdkaac.c:56:32: fatal error: fdk-aac/aacenc_lib.h: No such file or directory
这是因为缺少fdk-aac库相关的头文件。

2 编译fdk-aac库
下载源码https://github.com/mstorsjo/fdk-aac.git
在terminal下进入源码目录,输入
mkdir winBuild
cd winBuild
../configure --host=i686-w64-mingw32 --prefix=VLCPATH/contrib/i686-w64-mingw32
make install

VLCPATH 替换成VLC代码的路径

3 编译VLC代码
make packag-win32-zip
这时应该可以编译通过了, 在mole/codec/ 目录下会生成libfakaac_plugin.dll文件。
还需要把这个模块依赖的VLCPATH/contrib/i686-w64-mingw32/libfdk-aac-1.dll动态库复制到这个目录下。

现在VLC就可以支持fdk-aac编码了。

④ vlc播放器是用什么写出来的

以下是编译VLC源代码时所需的库:

Third party libraries used by VLC
You'll find a complete list on the wiki.

But, here are the most important libraries.

Audio/Video codecs
liba52 - an ATSC A/52 (aka AC3) audio decoder
libmad - an MPEG audio decoder
libmpeg2 - an MPEG1/2 video decoder
libavcodec (ffmpeg) - an extensive audio/video codec library which supports several formats like MPEG4, H263, WMV/A etc...
libogg - an Ogg bitstream parser
libvorbis - a Vorbis audio decoder
libflac - a FLAC (Free Lossless Audio Codec) audio decoder
libspeex - a Speex (Free speech codec) audio decoder
libtheora - a Theora video decoder
libfaad2 - an AAC audio decoder
libdv - a DV video decoder (deprecated in favor of libavcodec)
libxvidcore (xvid) - an ISO MPEG-4 compliant video codec (deprecated in favor of libavcodec)
libdca - A DTS Coherent Acoustics decoding library.

GUI framework libraries
wxWidgets - a cross-platform C++ GUI framework that keeps the look and feel of each platform
QT4 - a C++ Cross-Platform Rich Client Development Framework

Audio/Video output libraries
libsdl - a cross-platform multimedia library designed to provide level access to audio, and 2D video framebuffer

Miscellaneous libraries
libdvdcss - a library for accessing encrypted DVDs
libdvdnav - a library for DVD navigation
libdvdread - a library for reading DVD-Video images
libdvbpsi - a library designed for decoding and generation of MPEG TS and DVB PSI tables
libopenslp - an open-source implementation of Service Location Protocol
gettext - a set of tools that provides a framework to help applications proce multi-lingual messages
libfreetype2 - a software font engine that is designed to be small, efficient, highly customizable and portable while capable of procing high-quality output (glyph images).
fribidi - A Free Implementation of the Unicode Bidirectional Algorithm
liveMedia - C++ libraries for multimedia streaming (RTP/RTCP, RTSP, SIP)
matroska - a new, extensible open standard Audio/Video container format

If you're using those libs to compile VLC for windows with mingw-gcc 3.3.1, you can use our Win32 contribs.

如果需要更权威的回答,这里是VLC官方提供的源码下载:
http://download.videolan.org/pub/vlc/

⑤ VLC源代码包如何在linux下编译+调试

你是为了装软件还是为了学习?如果只是装个软件,为什么不装二进制版的呢(.deb .rpm)。自己编译挺麻烦的。
如果非想自己编译,一般都是(我没编译过VLC,编译过其他的,感觉像VLC这么大的软件应该得较长时间!):先解压下载的源码包(tar.bz),然后从终端进入解压后的源码目录,在终端输入:一 ./configure ;二 make ;三 make install ;
一,好像是为了检查当前系统参数,也可以在后面加环境变量参数(./configure [options])。如果没问题便生成makefile
二,根据makefile编译
三,编译安装。(二,可省略)
其实,不管是windows还是linux下载了软件解压后第一件事是读readme!!!!!!!!!!!(其实你应该自己看readme和install,因为别人也不知道你下的软件什么情况,这两个文件一般都会告诉你怎样安装以及软件依赖什么包!!)
再是读install ,这是基本素质。要养成自觉性,这在linux下尤为重要!

至于调试,比较麻烦,不过如果只是装软件而不改代码的情况下,不用专门调试(难道你还要用专门工具调试?) 既然说是菜鸟,又稿这么复杂的东西,并且搞这么复杂的东西又不在更专业的地方提问,网络知道一般是解决日常问题的地方!!!
不过一般情况下执行上述三步时会报错,根据它报错情况自己想办法解决,一般来说是依赖不能满足!

⑥ 编译VLC出错,请帮我看看是怎么回事

运行./compile 的出现两个error:
ERROR : glx.c:49: 36: X11/extensions/XShm.h: No such file or directory
In file included from glx.c:57:
ERROR : xcommon.h: 357: expected specifier-qualifier-list before 'XShmSegmentInfo'
make: *** [all] Error 2
-------------------------------------------------------------------------------------
好像都是X11/extensions的问题,装xorg-dev这个包

⑦ windows平台下编译vlc,使用的是mingw+msys,到了make prebuilt,出现了pkg-config command not found

做这么专业的工作,还用WINDOWS。

⑧ 解决Android Vlc编译报错couldn't find "libcompat.7.so

在build.gradle的defaultConfig下面添卜让困加

ndk{

    abiFilters"armeabi","armeabi-v7a","x86","mips"

}

重新编译即可。。

具体什么原因。。低级错误就型念不解释滑基了

⑨ 如何使用FFMPEG+H264实现RTP传输数据

开发环境:
WINDOWS7 32bit
MINGW
eclipse juno cdt
1、首先你要编译好FFMPEG,
a) 方法一:可以去官网下载源码,用MINGW编译(编译时记得支持H264,当然,事先得下载并编译好libx264,视频技术论坛里有很多介绍)
b) 方法二:更加省心省力的方法是,下载别人已经编译好的资源,如ZeranoeFFmpeg的册好贺,下载他的袜前dev版本,包含了头文件,链接库等必须的东西,当然,这东西已经是支持H264的了。
2、以下的就是代码部分了:
a) 先声明必要的变量:
AVFormatContext *fmtctx;
AVStream *video_st;
AVCodec *video_codec;
const int FPS = 25; /* 25 images/s */
const char *RDIP = “127.0.0.1”;
unsigned int RDPORT = 5678;
const unsigned int OUTWIDTH = 720;
const unsigned int OUTHEIGHT = 480;
av_register_all();
avformat_network_init();

b) 初始化AV容器
fmtctx = avformat_alloc_context();

c) 获得输出格式,这里是RTP网络流
fmtctx->oformat = av_guess_format("rtp", NULL, NULL);

d)打开网络流
snprintf(fmtctx->filename, sizeof(fmtctx->filename),"rtp://%s:%d",RDIP,RDPORT);
avio_open(&fmtctx->pb,fmtctx->filename, AVIO_FLAG_WRITE)

e) 开始添加H264视频流
video_st = NULL;video_st = add_video_stream(fmtctx, &video_codec, AV_CODEC_ID_H264);

其中,add_video_stream函数为:
add_video_stream(AVFormatContext *oc,AVCodec **codec, enum AVCodecID codec_id)
{
AVCodecContext *c;
AVStream *st;
/* find the video encoder */
*codec = avcodec_find_encoder(codec_id);
st = avformat_new_stream(oc, *codec);
c = st->codec;
avcodec_get_context_defaults3(c, *codec);
c->codec_id = codec_id;
c->width = OUTWIDTH;
c->州派height = OUTHEIGHT;
c->time_base.den = FPS;
c->time_base.num = 1;
c->pix_fmt = PIX_FMT_YUV420P;
if(oc->oformat->flags & AVFMT_GLOBALHEADER)
c->flags|= CODEC_FLAG_GLOBAL_HEADER;
av_opt_set(c->priv_data, "preset", "ultrafast", 0);
av_opt_set(c->priv_data, "tune","stillimage,fastdecode,zerolatency",0);
av_opt_set(c->priv_data, "x264opts","crf=26:vbv-maxrate=728:vbv-bufsize=364:keyint=25",0);return st;}
// OPEN THE CODE
avcodec_open2(video_st->codec, video_codec, NULL);
/* Write the stream header, if any. */
avformat_write_header(fmtctx, NULL);

f) 现在,就可以不断的编码数据,并发生数据了
AVFrame* m_pYUVFrame = avcodec_alloc_frame();
while(1) //这里设置成无限循环,你可以设置成250,或其他数进行测试,观看结果
{
fill_yuv_image(m_pYUVFrame, video_st->codec->frame_number,OUTWIDTH, OUTHEIGHT);
/* encode the image */
AVPacket pkt;
int got_output = 0;
av_init_packet(&pkt);
pkt.data = NULL; // packet data will be allocated by the encoder
pkt.size = 0;
pkt.pts = AV_NOPTS_VALUE;
pkt.dts =AV_NOPTS_VALUE;
m_pYUVFrame->pts = video_st->codec->frame_number;
ret = avcodec_encode_video2(c, &pkt,frame, &got_output);
if (ret < 0) {fprintf(stderr, "Error encoding video frame: %s\n", av_err2str(ret));
exit(1);
}
/* If size is zero, it means the image was buffered. */
if (got_output)
{
if (c->coded_frame->key_frame)pkt.flags |= AV_PKT_FLAG_KEY;
pkt.stream_index = st->index;
if (pkt.pts != AV_NOPTS_VALUE )
{
pkt.pts = av_rescale_q(pkt.pts,video_st->codec->time_base, video_st->time_base);
}
if(pkt.dts !=AV_NOPTS_VALUE )
{
pkt.dts = av_rescale_q(pkt.dts,video_st->codec->time_base, video_st->time_base);
}
/* Write the compressed frame to the media file. */
ret = av_interleaved_write_frame(oc,&pkt);
}
else {
ret = 0;
}
}

g) Fill_yuv_image函数:
/* Prepare a mmy image. */
static void fill_yuv_image(AVPicture *pict,int frame_index,int width, int height)
{
int x, y, i;
i = frame_index;
/* Y */
for (y = 0; y < height; y++)
for (x = 0; x < width; x++)
pict->data[0][y * pict->linesize[0] +x] = x + y + i * 3;
/* Cb and Cr */
for (y = 0; y < height / 2; y++)
{
for (x = 0; x < width / 2; x++)
{
pict->data[1][y * pict->linesize[1] +x] = 128 + y + i * 2;
pict->data[2][y * pict->linesize[2] +x] = 64 + x + i * 5;
}
}
}

h) 打印sdp信息,仅需一次,打印的sdp信息,用在VLC播放器结束网络视频流时用到
//打印sdp信息
char sdp[2048];
av_sdp_create(&fmtctx,1, sdp, sizeof(sdp));
printf("%s\n",sdp);
fflush(stdout);

i)最后,做一些清理工作
avcodec_free_frame(&m_pYUVFrame);
av_write_trailer(fmtctx);
/* Free the streams. */
for (unsigned int i = 0; i< fmtctx->nb_streams;i++)
{
av_freep(&fmtctx->streams->codec);
av_freep(&fmtctx->streams);
}
if(!(fmtctx->oformat->flags& AVFMT_NOFILE))
/* Close the output file. */
avio_close(fmtctx->pb);
/*free the stream */
av_free(fmtctx);

3、编译代码,记得添加库文件,运行一次代码,不用死循环,设置不用循环,因为是要让他打印出sdp文件的信息。得到sdp信息,比如我精简成如下:
c=IN IP4 127.0.0.1
m=video 56782 RTP/AVP 96
a=rtpmap:96 H264/90000
a=framerate:25
a=fmtp:96 packetization-mode=1

把这些信息保存到一个文本文件,并改名为sdp后缀,如mySDP.sdp。
4、从官网下载VLC播放器,重新运行上述的代码,这一次要循环,具体循环多久,你自己决定,这一次是正式测试了。代码跑起来后,把刚刚的sdp文件用VLC打开,直接把sdp文件拖到VLC播放器中就行了。等待缓冲,就可以看到效果了。
5、代码中剩掉了出错检查部分,请自行添加。
6、关于IP地址,这里是127.0.0.1,是供本机测试,可以改成制定的接受数据的电脑IP地址,或者广播地址IP地址。

⑩ 要做毕业设计,正在学习VLC,问个小白的问题,VLC一定要自己编译么网上下载和自己编译的有什么区别呢

你自己编译和网上你下载的版本的编译连接选项可能不一样,可能甚至编译器都不一样,所以最终生成的vlc可执行程序当然是不一样的。vlc的编解码器好多都是用的ffmpeg的,还用到一些版权保护的编译器,你自己的本地机器上衫敏渗拿档可能没有,所以或脊,最终生成的vlc几乎不可能和他的一样。

问一句,毕业设计学vlc,用来做什么呢?编解码的话,直接ffmpeg就可以了。

热点内容
蚁周算法 发布:2025-07-15 04:34:28 浏览:599
电脑服务器名称写什么 发布:2025-07-15 04:29:53 浏览:430
安卓编译打包 发布:2025-07-15 04:24:20 浏览:169
bat编译器 发布:2025-07-15 04:18:07 浏览:54
中兴服务器登录地址 发布:2025-07-15 04:02:47 浏览:988
手提箱怎么改密码 发布:2025-07-15 03:55:47 浏览:219
did脚本 发布:2025-07-15 03:55:12 浏览:963
残留溶剂线性浓度如何配置 发布:2025-07-15 03:54:31 浏览:134
部落冲突好号密码是什么 发布:2025-07-15 03:48:45 浏览:971
存储气瓶 发布:2025-07-15 03:48:10 浏览:992