源码下载地址:http://download.videolan.org/pub/videolan/vlc/

编译依赖:

sudo apt-get install liblua5.2-dev
sudo apt-get install libmad0-dev
sudo apt-get install libavutil-dev
sudo apt-get install libavcodec-dev
sudo apt-get install libavformat-dev
sudo apt-get install libavswscale-dev
sudo apt-get install liba52-0.7.4-dev
sudo apt-get install libxcb1-dev
sudo apt-get install libxcb-composite0-dev
sudo apt-get install libxcb-xv0-dev  sudo apt-get install libdc1394-22-dev
 sudo apt-get install libraw1394-dev
 sudo apt-get install libdvdread-dev
 sudo apt-get install libbluray-dev
 sudo apt-get install libopencv-dev
 sudo apt-get install libmpeg2-4-dev
 sudo apt-get install libflac-dev
 sudo apt-get install libudev-dev
 sudo apt-get install libresample1-dev
 sudo apt-get install libsamplerate-ocaml-dev
 sudo apt-get install libkate-dev
 sudo apt-get install libmtp-dev
 sudo apt-get install libfluidsynth-dev
 sudo apt-get install libschroedinger-dev
 sudo apt-get install libfreerdp-dev
 sudo apt-get install libbluray-dev
 sudo apt-get install librsvg2-dev
 sudo apt-get install libtwolame-dev
 sudo apt-get install libogg-dev
 sudo apt-get install libavc1394-dev
 sudo apt-get install libraw1394-dev
 sudo apt-get install libdca-dev
 sudo apt-get install libdirac-dev
 sudo apt-get install libchromaprint-dev
 sudo apt-get install libsmbclient-raw-dev
 sudo apt-get install libssh2-1-dev
 sudo apt-get install libgnome-vfs2.0-cil-dev
 sudo apt-get install libshout3-dev
 sudo apt-get install libdca-dev
 sudo apt-get install libdca-utils
 sudo apt-get install libdts-dev
 sudo apt-get install libupnp-dev
 sudo apt-get install libspeex-dev
 sudo apt-get install libnotify-dev
 sudo apt-get install libgsf-gnome-1-dev
 sudo apt-get install libgnome-vfsmm-2.6-dev
 sudo apt-get install liblivemedia-dev
 sudo apt-get install libpostproc-dev
 sudo apt-get install libsidplay2-dev
 sudo apt-get install libprojectm-dev
 sudo apt-get install libsdl1.2-dev
 sudo apt-get install libsdl-image1.2-dev
 sudo apt-get install libcddb2-dev
 sudo apt-get install libxcb-randr0-dev
 sudo apt-get install libxcb-keysyms1-dev
 sudo apt-get install libjack-dev
 sudo apt-get install libzvbi-doc
 sudo apt-get install libzvbi-dev
 sudo apt-get install liblivemedia-dev
 sudo apt-get install livemedia-utils
 sudo apt-get install libfaad-dev
 sudo apt-get install libspeexdsp-dev
 sudo apt-get install libavutil-dev
 sudo apt-get install libavutil51
 sudo apt-get install libavutil-extra-51
 sudo apt-get install libjackasyn-dev
 sudo apt-get install libjack-jackd2-dev
 sudo apt-get install libtaglib-cil-dev
 sudo apt-get install libtaglib-ocaml-dev
 sudo apt-get install libogg-dev
 sudo apt-get install libogg-ocaml-dev
 sudo apt-get install liboggkate-dev
 sudo apt-get install liboggplay1-dev  sudo apt-get  install libopencv-contrib-dev
 sudo apt-get  install libopencv-core-dev
 sudo apt-get  install libopencv-dev
 sudo apt-get  install libopencv-core2.3
 sudo apt-get  install libopencv-features2d-dev
 sudo apt-get  install libopencv-flann-dev
 sudo apt-get  install libopencv-gpu-dev
 sudo apt-get  install libopencv-video-dev
 sudo apt-get  install libopencv-objdetect-dev
 sudo apt-get  install libopencv-legacy-dev
 sudo apt-get  install libcv-dev
 sudo apt-get  install libopencv-imgproc-dev
 sudo apt-get  install libopencv-highgui-dev
 sudo apt-get  install libopencv-ml-dev
 sudo apt-get  install libopencv-objdetect-dev
 sudo apt-get  install libcvaux-dev
 sudo apt-get  install libhighgui-dev

播放TS,需要enable dvbpsi,默认是关闭的


sudo apt-get install libdvbpsi-dev

 

ubuntu下编译VLC源码

http://blog.csdn.net/beitiandijun/article/details/9225591

使用vlc实现视频TS流的推送

http://blog.chinaunix.net/uid-26527046-id-4409467.html

相关博客:

VLC框架分析
http://blog.csdn.net/yxnyxnyxnyxnyxn/article/details/9020821

vlc gdb调试说明(ctrl+c时会使得gdb退出):

yingc@yingc:~/git/thirdparty/av/vlc/vlc-2.1.4/bin$ git diff vlc.c
diff --git a/av/vlc/vlc-2.1.4/bin/vlc.c b/av/vlc/vlc-2.1.4/bin/vlc.c
index 19624de..5b0c7ee 100644
--- a/av/vlc/vlc-2.1.4/bin/vlc.c
+++ b/av/vlc/vlc-2.1.4/bin/vlc.c
@@ -9,9 +9,7 @@
* Gildas Bazin <gbazin@videolan.org>
* Derk-Jan Hartman <hartman at videolan dot org>
* Lots of other people, see the libvlc AUTHORS file
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
@@ -106,7 +104,7 @@ static void vlc_kill (void *data)
static void exit_timeout (int signum)
{
(void) signum;
- signal (SIGINT, SIG_DFL);
+ //signal (SIGINT, SIG_DFL);
} /*****************************************************************************
@@ -175,7 +173,7 @@ int main( int i_argc, const char *ppsz_argv[] )
* Signals that request a clean shutdown, and force an unclean shutdown
* if they are triggered again 2+ seconds later.
* We have to handle SIGTERM cleanly because of daemon mode. */
- sigaddset (&set, SIGINT);
+ //sigaddset (&set, SIGINT);
sigaddset (&set, SIGHUP);
sigaddset (&set, SIGQUIT);
sigaddset (&set, SIGTERM);
@@ -262,9 +260,9 @@ int main( int i_argc, const char *ppsz_argv[] ) /* Restore default signal behaviour after 3 seconds */
sigemptyset (&set);
- sigaddset (&set, SIGINT);
+ //sigaddset (&set, SIGINT);
sigaddset (&set, SIGALRM);
- signal (SIGINT, SIG_IGN);
+ //signal (SIGINT, SIG_IGN);
signal (SIGALRM, exit_timeout);
pthread_sigmask (SIG_UNBLOCK, &set, NULL);
alarm (3);

创建rtcp socket:

Breakpoint 2, net_OpenDgram (obj=0xb2703410, psz_bind=0xa2754d7c "192.168.110.58", i_bind=52877, psz_server=0xa2754dbc "192.168.110.58",
    i_server=1123, protocol=17) at network/udp.c:590
590    {
(gdb) bt
#0  net_OpenDgram (obj=0xb2703410, psz_bind=0xa2754d7c "192.168.110.58", i_bind=52877, psz_server=0xa2754dbc "192.168.110.58",
    i_server=1123, protocol=17) at network/udp.c:590
#1  0xa3a10cd1 in OpenRTCP (obj=0xb2703410, rtp_fd=32, proto=17, mux=false) at rtcp.c:106
#2  0xa3a09535 in rtp_add_sink (id=0xb2707c80, fd=32, rtcp_mux=false, seq=0x0) at rtp.c:1513
#3  0xa3a0a386 in Add (p_stream=0xb2703410, p_fmt=0x0) at rtp.c:1142
#4  0xa3a0b1ea in Open (p_this=0xb2703410) at rtp.c:635
#5  0xb7d63730 in generic_start (func=0xa3a0aaa0, ap=0xa27550b8 ")") at modules/modules.c:351
#6  0xb7d637aa in module_load (obj=<optimized out>, m=0x806e4e8, init=0xb7d63720 <generic_start>, args=0xa27550b4 "\020\064p\262)")
    at modules/modules.c:185
#7  0xb7d63e5a in vlc_module_load (obj=0xb2703410, capability=0xb7dbde9c "sout stream", name=0xb2702b53 "", strict=true,
    probe=0xb7d63720 <generic_start>) at modules/modules.c:277
#8  0xb7d642a2 in module_need (obj=0xb2703410, cap=0xb7dbde9c "sout stream", name=0xb2702b50 "rtp", strict=true) at modules/modules.c:366
#9  0xb7d887c0 in sout_StreamNew (p_next=0x0, p_cfg=0xb2702f50, psz_name=<optimized out>, p_sout=<optimized out>)
    at stream_output/stream_output.c:783
#10 sout_StreamChainNew (p_sout=0xb2703728, psz_chain=0x0, p_next=0x0, pp_last=0x0) at stream_output/stream_output.c:845
#11 0xb7d88f0a in sout_NewInstance (p_parent=0x80d9ed0, psz_dest=0xb2702e28 "#rtp{dst=192.168.110.58,port=1122,mux=ts}")
    at stream_output/stream_output.c:119
#12 0xb7d2f037 in RequestSout (psz_sout=0xb2702e28 "#rtp{dst=192.168.110.58,port=1122,mux=ts}", p_sout=0x0, p_resource=0x80dca20)
    at input/resource.c:121
#13 input_resource_RequestSout (p_resource=0x80dca20, p_sout=0x0, psz_sout=0xb2702e28 "#rtp{dst=192.168.110.58,port=1122,mux=ts}")
    at input/resource.c:501
#14 0xb7d29514 in InitSout (p_input=<optimized out>) at input/input.c:872
#15 Init (p_input=0xb1301748) at input/input.c:1213
#16 0xb7d2c420 in Run (obj=0xb1301748) at input/input.c:521
#17 0xb7f8dd4c in start_thread (arg=0xa2755b40) at pthread_create.c:308
#18 0xb7ec6bae in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Breakpoint 3, rtp_packetize_send (id=0x8103f40, out=0xa1b00ee0) at rtp.c:1662
1662    {
(gdb) bt
#0  rtp_packetize_send (id=0x8103f40, out=0xa1b00ee0) at rtp.c:1662
#1  0xa1e1800f in AccessOutGrabberWriteBuffer (p_buffer=0xb2704ee8, p_stream=<optimized out>) at rtp.c:1741
#2  AccessOutGrabberWrite (p_access=0x80fd140, p_buffer=0xb2704ee8) at rtp.c:1779
#3  0xb7d87925 in sout_AccessOutWrite (p_access=0x80fd140, p_buffer=0xb2704ee8) at stream_output/stream_output.c:318
#4  0xa2ec7eea in TSDate (p_mux=0x80fd1f0, p_chain_ts=0xa2aa20e4, i_pcr_length=200000, i_pcr_dts=285486505088) at mpeg/ts.c:1799
#5  0xa2ec83e0 in TSSchedule (p_mux=0x80fd1f0, p_chain_ts=0xa2aa21cc, i_pcr_length=200000, i_pcr_dts=285486505088) at mpeg/ts.c:1747
#6  0xa2ecf714 in MuxStreams (p_mux=0x80fd1f0) at mpeg/ts.c:1551
#7  Mux (p_mux=0x80fd1f0) at mpeg/ts.c:1574
#8  0xb7d881cb in sout_MuxSendBuffer (p_mux=0x80fd1f0, p_input=0xa1ba1460, p_buffer=0xb270bda8) at stream_output/stream_output.c:541
#9  0xa1e13bc5 in MuxSend (p_stream=0x80fc870, id=0xa1ba1460, p_buffer=0xb270bda8) at rtp.c:1703
#10 0xb7d876d5 in sout_InputSendBuffer (p_input=0xa1ba12f0, p_buffer=0xb270bda8) at stream_output/stream_output.c:233
#11 0xb7d15b4f in DecoderPlaySout (p_sout_block=0xb270bda8, p_dec=0x8315cc8) at input/decoder.c:1668
#12 DecoderProcessSout (p_block=0x0, p_dec=0x8315cc8) at input/decoder.c:1790
#13 DecoderProcess (p_block=<optimized out>, p_dec=0x8315cc8) at input/decoder.c:1991
#14 DecoderThread (p_data=0x8315cc8) at input/decoder.c:936
#15 0xb7f8dd4c in start_thread (arg=0xa2aa2b40) at pthread_create.c:308
#16 0xb7ec6bae in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

创建rtp socket:

Breakpoint 3, net_Socket (p_this=0x80f5178, family=2, socktype=2, protocol=17) at network/io.c:83
83    {
(gdb) bt
#0  net_Socket (p_this=0x80f5178, family=2, socktype=2, protocol=17) at network/io.c:83
#1  0xb7d567bb in net_ConnectDgram (p_this=0x80f5178, psz_host=0x80f9fa0 "192.168.110.58", i_port=1122, i_hlim=-1, proto=17)
    at network/udp.c:526
#2  0xa3a21329 in Add (p_stream=0x80f5178, p_fmt=0x0) at rtp.c:1131
#3  0xa3a221ea in Open (p_this=0x80f5178) at rtp.c:635
#4  0xb7d63730 in generic_start (func=0xa3a21aa0, ap=0xa2f2c0b8 ")") at modules/modules.c:351
#5  0xb7d637aa in module_load (obj=<optimized out>, m=0x806e4e8, init=0xb7d63720 <generic_start>, args=0xa2f2c0b4 "xQ\017\b)")
    at modules/modules.c:185
#6  0xb7d63e5a in vlc_module_load (obj=0x80f5178, capability=0xb7dbde9c "sout stream", name=0x80f471b "", strict=true,
    probe=0xb7d63720 <generic_start>) at modules/modules.c:277
#7  0xb7d642a2 in module_need (obj=0x80f5178, cap=0xb7dbde9c "sout stream", name=0x80f4718 "rtp", strict=true) at modules/modules.c:366
#8  0xb7d887c0 in sout_StreamNew (p_next=0x0, p_cfg=0x804d978, psz_name=<optimized out>, p_sout=<optimized out>)
    at stream_output/stream_output.c:783
#9  sout_StreamChainNew (p_sout=0x80e5530, psz_chain=0x0, p_next=0x0, pp_last=0x0) at stream_output/stream_output.c:845
#10 0xb7d88f0a in sout_NewInstance (p_parent=0x80d9ed0, psz_dest=0x80ec400 "#rtp{dst=192.168.110.58,port=1122,mux=ts}")
    at stream_output/stream_output.c:119
#11 0xb7d2f037 in RequestSout (psz_sout=0x80ec400 "#rtp{dst=192.168.110.58,port=1122,mux=ts}", p_sout=0x0, p_resource=0x80dca20)
    at input/resource.c:121
#12 input_resource_RequestSout (p_resource=0x80dca20, p_sout=0x0, psz_sout=0x80ec400 "#rtp{dst=192.168.110.58,port=1122,mux=ts}")
    at input/resource.c:501
#13 0xb7d29514 in InitSout (p_input=<optimized out>) at input/input.c:872
#14 Init (p_input=0xb24099c8) at input/input.c:1213
#15 0xb7d2c420 in Run (obj=0xb24099c8) at input/input.c:521
#16 0xb7f8dd4c in start_thread (arg=0xa2f2cb40) at pthread_create.c:308
#17 0xb7ec6bae in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

vlc的更多相关文章

  1. 自定义基于 VLC 的视频播放器

    前言(蛋疼的背景故事) 前段时间,接了一个小项目,有个需求是要在系统待机一段时间以后,循环播放 MV(类似于 Windows 系统的屏幕保护). 听到这个需求,我首先想到的是 MediaPlayer ...

  2. VLC 资料整理

    libvlc_media_t的创建 创建libvlc_media_t有两种方法:libvlc_media_new_path()和libvlc_media_new_location().简单描述一下这两 ...

  3. 使用vlc进行二次开发做自己的播放器

    可参考: 使用vlc播放器做rtsp服务器 使用vlc播放器播放rtsp视频 web网页中使用vlc插件播放相机rtsp流视频 使用 https://github.com/ZeBobo5/Vlc.Do ...

  4. 使用vlc播放器做rtsp流媒体服务器

    可参考: 使用vlc播放器播放rtsp视频 web网页中使用vlc插件播放相机rtsp流视频 使用vlc进行二次开发做自己的播放器 首先需要安装vlc播放器,下载及安装步骤略 使用vlc播放器做rts ...

  5. 使用vlc播放器播放rtsp流视频

    可参考: 使用vlc播放器做rtsp服务器 web网页中使用vlc插件播放相机rtsp流视频 使用vlc进行二次开发做自己的播放器 首先需要安装vlc播放器,下载及安装步骤略 使用vlc播放器播放rt ...

  6. web网页中使用vlc插件播放相机rtsp流视频

    可参考: 使用vlc播放器做rtsp服务器 使用vlc播放器播放rtsp视频 使用vlc进行二次开发做自己的播放器 vlc功能还是很强大的,有很多的现成的二次开发接口,不需配置太多即可轻松做客户端播放 ...

  7. ubuntu14.0 (arm平台)源码安装 VLC播放器

    环境 ubuntu14.0  arm开发板 源 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty main multiverse restrict ...

  8. run VLC in root

    sed -i 's/geteuid/getppid/' /usr/bin/vlc

  9. RTSP流和USB摄像头转MJPEG使用VLC

    测试环境: 系统: Ubuntu14.04 LTS Desktop 设备:海康IP摄像头和USB摄像头 1.需要先安装vlc包,命令行运行 sudo apt-get update sudo apt-g ...

  10. vlc 在ie11 中的addEventListener事件不触发

    在vlc控件中触发一事件,在IE11之前的版本使用attachEvent注册一个回调函数后IE11可以捕获到事件,但IE11中提示attachEvent不支持.经查询发现IE11已经去掉了attach ...

随机推荐

  1. JUnit4简要说明

    单元测试(unit testing),是指对软件中的最小可测试单元进行检查和验证. 开发者编写一小段代码,用于检验被测代码的一个很小的.很明确的功能是否正确. 通常而言,一个单元测试是用于判断某个特定 ...

  2. 监听列表ListVIew的滑动状态

    /*监听列表的滑动状态:暂时用不到 * SCROLL_STATE_FLING 时让图片不显示,提高滚动性能让滚动小姑更平滑 * SCROLL_STATE_IDLE 时显示当前屏幕可见的图片*/ mLi ...

  3. CodeFile与CodeBehind的区别

    引自:http://blog.163.com/wentworth0119@126/blog/static/17321924220122852720103/ asp.net发布项目之后 存在" ...

  4. hibernate篇章六--demo(Hibernate之第1解之-hibernate_demo_1)

    准备工作做好了,开始Hibernate: 1:建立包:package:dao.model.service.util包: 2:开始model实体类Student:id,sname生成getter/set ...

  5. mvc给html扩展方法:

    mvc给html扩展方法: 注意:扩展方法和所在的类都必须是 public static如果在页面直接使用新扩展的方法,需要web.config里把Web.Helper名称命名空间加上,页面才能访问到 ...

  6. 查看SQL server 2008 R2 的Service Package 版本号(同样适用于SQL Server 2005)

    在SQL Server 中新建一个查询(new Query),然后输入下面的SQL脚本,即可看到当前的数据库的Service Package (补丁包)的版本号 select serverproper ...

  7. Excel表数据导入数据库表中

    ***Excel表数据导入到数据库表中 通过数据库表的模板做成‘Excel’表的数据导入到数据库相应的表中(注意:主表 和 从表的关系,要先导‘主表’在导入从表) 过程:通过数据库的导入工具—先导入为 ...

  8. 手动修复OneDrive的DNS污染屏蔽的方法

    随着云计算的发展和微软云战略的持续推进,使用网盘进行文档存储.协同编辑与共享已成为文档操作的新流程.而Office.Office 365和OneDrive等微软产品是Windows用户的首选.但由于国 ...

  9. RAC分解步骤之一,在oracle linux 4u4上安装oracle 10.2.0.1.0操作日志

    练习oracle的rac组建过程,第一步,先练习4u4上安装oracle 10.2.0.1.0.直接安装rac,有些难度.从简单的做起.总RAC步骤,参照小布老师的RAC组建. 1. 启动vc,登陆v ...

  10. Flexbox盒子弹性布局

    Can I Use? 2. 概念: 当你给一个元素使用了flexbox模块,那么它的子元素就会指定的方向在水平或者纵向方向排列.这些子元素会按照一定的比例进行扩展或收缩来填补容器的可用空间. < ...