源码下载地址: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. java基础语法笔记

    这段时间看了一些java,急了一些笔记,记下一遍以后复习用! 2016-07-24 15:12:40 java很多语法都跟C#类似,下面列举一些不同的地方******注意***** java中的系统方 ...

  2. hibernate篇章四-- Hibernate配置文件中hiberante.hbm2ddl.auto四个参数的配置

    我们在搭建环境的时候,在配置文件中有一个属性标签为: <property name="hibernate.hbm2ddl.auto">     </propert ...

  3. 20151213Jquery学习笔记--插件

    插件(Plugin)也成为 jQuery 扩展(Extension),是一种遵循一定规范的应用程序接口编 写出来的程序.目前 jQuery 插件已超过几千种,由来自世界各地的开发者共同编写.验证 和完 ...

  4. 软件工程——UML简介

    UML概述: UML是对OMT(对象建模技术).Booth(Booch方法)以及OOSE(面向对象的软件工程)等记号系统实施统一工作后得到的一种记号系统. UML(Unified Modeling L ...

  5. 学习重点:1、金典的设计模式在实际中应用2、JVM原理3、jui源代码

    学习重点:1.金典的设计模式在实际中应用 2.JVM原理 3.jui源代码

  6. Maximum Product Subarray动态规划思想

    该题即是昨天没有做出来的题目,想了很久,想出了一个普通的做法,提交发现超时了.思想是新建一个数组,保存每个元素与后面的元素相乘后得到的最大值,然后再在该数组中选出最大的值,返回.[笨死 发现行不通后决 ...

  7. 周末充电之WPF(二 ) .窗口的布局

    登录窗口布局:[ Grid 布局 -Grid.RowDefinitions / Grid.ColumnDefinitions] 代码如下: <Window x:Class="login ...

  8. 常用JS验证和函数

    下面是我常用一些JS验证和函数,有一些验证我直接写到了对象的属性里面了,可以直接通过对象.方法来调用 //浮点数除法运算 function fdiv(a, b, n) { if (n == undef ...

  9. 代码:Masonry 第三方框架

    必备宏使用前提: //define this constant if you want to use Masonry without the 'mas_' prefix #define MAS_SHO ...

  10. MySQL分库分表备份脚本

    MySQL分库备份脚本 #脚本详细内容 [root@db02 scripts]# cat /server/scripts/Store_backup.sh #!/bin/sh MYUSER=root M ...