http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines#H.264_RTP_Streaming

http://processors.wiki.ti.com/index.php/GStreamer

https://gstreamer.freedesktop.org/documentation/application-development/basics/helloworld.html

https://github.com/GStreamer/gst-examples

https://github.com/GStreamer/gst-rtsp-server/tree/master/examples

https://gstreamer.ti.com/gf/project/gstreamer_ti/scmsvn/?action=browse&path=%2Fbranches%2F

https://gstreamer.freedesktop.org/documentation/rtp.html

https://gstreamer.freedesktop.org/

https://gstreamer.ti.com/gf/project/gstreamer_ti/

最近做一个项目是要用OpenCV来加工处理rtsp流,直接用opencv 中自带的VideoCapture video(rtsp://192.168.1.221:554)这种方式能够拉到rtsp流,但是很容易解码错误,毕竟opencv也不是做视频解码的,后来决定用vlc来处理,代码如下。
#include "libvlc.h"
#include "libvlc_media.h"
#include "libvlc_media_player.h"
#include <opencv2\opencv.hpp>
#include <opencv2\video\background_segm.hpp>
#include "opencv2/imgproc.hpp"
#include <opencv2/highgui.hpp>
#include <opencv2/video.hpp>
#include <opencv2/objdetect.hpp> Mat videobuf;
void* lock(void *data, void**p_pixels)
{
*p_pixels = videobuf.data;
return NULL;
} void VideoShow::rtspstream()
{
videobuf.create(height,width,CV_8UC3);
libvlc_media_t* media = NULL;
libvlc_media_player_t* mediaPlayer = NULL;
char const* vlc_args[] =
{
"-I",
"dummy",
"--ignore-config",
}; libvlc_instance_t* instance = libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args); media = libvlc_media_new_location(instance, "rtsp://192.168.1.221:554");
mediaPlayer = libvlc_media_player_new_from_media(media); //libvlc_media_player_set_media(mediaPlayer, media);
libvlc_video_set_callbacks(mediaPlayer, lock, NULL, NULL, NULL);
libvlc_video_set_format(mediaPlayer, "RV24", width, height, width*24/8);
libvlc_media_release(media); for(int i=0;i<5;i++)
{
libvlc_media_player_play(mediaPlayer);
Sleep(500);
}
}
int main()
{
Mat show ;
while(true){
show = videobuf;
imshow("rtsp",show);
waitKey(30);
}
}

最新文章

  1. js的单线程和异步
  2. iOS判断是模拟器还是真机
  3. IntelliJ IDEA 发布最新版本13.0.1
  4. mysql 语句大全
  5. 在hibernate中使用c3p0数据源
  6. JavaScript 类型判断的那些事
  7. MVC — 第 6 天
  8. hibernate框架学习笔记12:查询优化
  9. spring security oauth2
  10. WIndows下将文件夹映射为磁盘
  11. 【bzoj 4756】[Usaco2017 Jan] Promotion Counting
  12. mysql定时任务用到存储过程和定时任务
  13. Get与Post区别小结
  14. Vuejs学习笔记(一)
  15. Cmd Markdown语法参考
  16. 使用kafka consumer api时,中文乱码问题
  17. 玩转SpringCloud(F版本) 二.服务消费者(2)feign
  18. golang多进程测试代码
  19. as3 文本竖排效果实现
  20. JAVA calling convention

热门文章

  1. 自定义MVC--增删改查
  2. SublimeText 括号插件 Bracket Highlighter高亮设置
  3. hive基础及系统架构
  4. StringUtils的isBlank()方法
  5. 关于item的prevvalue
  6. 解决vue多个路由共用一个页面的问题
  7. codeforces626F
  8. 通过Confulence API统计用户文档贡献量
  9. Docker:Docker Compose 详解
  10. thymeleaf 与shiro 整合错误