当前位置: 首页 > news >正文

双语网站建设费用中国十大企业培训机构排名

双语网站建设费用,中国十大企业培训机构排名,做网站用哪个电脑,html网站制作模板1.概述 主要功能是调过live555 testRTSPClient 简单封装的rtsp客户端库,拉取RTSP流,然后调过3403的VDEC模块进行解码,送个NPU进行目标检测,输出到hdmi,这样保证了开发没有sensor的时候可以识别其它摄像头的视频流&…

1.概述

主要功能是调过live555 testRTSPClient 简单封装的rtsp客户端库,拉取RTSP流,然后调过3403的VDEC模块进行解码,送个NPU进行目标检测,输出到hdmi,这样保证了开发没有sensor的时候可以识别其它摄像头的视频流;

2.如何搭建一个RTSPServer

2.1使用live555 mediaServer搭建rtspServer
#这里可以去http://live555.com/官网查看
wget http://live555.com/liveMedia/public/live.2024.10.31.tar.gz
tar xvzf live.2024.10.31.tar.gz
cd live
./genMakefiles linux-no-std-lib
make -j
cd mediaServer
./live555MediaServer

执行的效果如下,默认支持的文件list如下,只需要把对应类型的文件复制到mediaServer目录即可,可以用vlc测试是否正常

LIVE555 Media Serverversion 1.13 (LIVE555 Streaming Media library version 2024.10.31).
Play streams from this server using the URLrtsp://192.168.8.8:8554/<filename>
where <filename> is a file present in the current directory.
Each file's type is inferred from its name suffix:".264" => a H.264 Video Elementary Stream file".265" => a H.265 Video Elementary Stream file".aac" => an AAC Audio (ADTS format) file".ac3" => an AC-3 Audio file".amr" => an AMR Audio file".dv" => a DV Video file".m4e" => a MPEG-4 Video Elementary Stream file".mkv" => a Matroska audio+video+(optional)subtitles file".mp3" => a MPEG-1 or 2 Audio file".mpg" => a MPEG-1 or 2 Program Stream (audio+video) file".ogg" or ".ogv" or ".opus" => an Ogg audio and/or video file".ts" => a MPEG Transport Stream file(a ".tsx" index file - if present - provides server 'trick play' support)".vob" => a VOB (MPEG-2 video with AC-3 audio) file".wav" => a WAV Audio file".webm" => a WebM audio(Vorbis)+video(VP8) file
See http://www.live555.com/mediaServer/ for additional documentation.
(We use port 8000 for optional RTSP-over-HTTP tunneling).)
2.2 ffmpeg转264文件

如果是mp4文件可以用ffmpeg简单的提取264文件,命令如下

#sudo apt-get install ffmpeg
ffmpeg -i input.mp4 -an -codec:v copy output.264

3.封装RtspClinet

代码参考live/testProgs/testRTSPClient.cpp
需要注意Nal头即可,不同RtspServer会有不同的发包方式

void DummySink::afterGettingFrame(unsigned frameSize,unsigned numTruncatedBytes,struct timeval presentationTime,unsigned /*durationInMicroseconds*/){//frameSize 这个是一帧图像//  u_int8_t *fReceiveBuffer;这个是frame数据内容//struct timeval presentationTime,这个是当前frame的pts}

完整代码参考开源仓库下面目录

//thridpart/live555/librtspclient.h
RTSPCLI_API int MyRTSP_Init(RTSP_Handle** handle);/*句柄  返回0表示成功,返回非0表示失败 */
RTSPCLI_API int MyRTSP_Deinit(RTSP_Handle* handle);/* 释放RTSPClient 参数为RTSPClient句柄 */
RTSPCLI_API int MyRTSP_OpenStream(RTSP_Handle* handle, const char* _url, EASY_RTP_CONNECT_TYPE _connType,int _reconn/*1000表示长连接,即如果网络断开自动重连, 其它值为连接次数*/);/* 打开网络流 */
RTSPCLI_API int MyRTSP_SetCallback(RTSP_Handle* handle,RTSPSourceCallBack _callback, void* userptr);/* 设置数据回调 */
RTSPCLI_API int MyRTSP_Run(RTSP_Handle* handle);
RTSPCLI_API int MyRTSP_CloseStream(RTSP_Handle* handle);/* 关闭网络流 */

4.整合数据给VDEC

#include "librtspclient.h"
RTSP_Handle* hRTSPHandle_;
int RtspRunnig_ = 0;
pthread_t rtsp_thd_;
void *pRtspFrame = NULL;
static char sps[32];
static char pps[32];
static int spslen = 0;
static int ppslen = 0;
static int initvpss = 0;
static int RTSPSourceCall(EASY_FRAME_INFO_T frameinfo, void* userdata)
{// printf("frameinfo.framesize:%d,bIFrame:%d:NaluType:%d\n", frameinfo.framesize, frameinfo.bIFrame, frameinfo.NaluType);//这里做了简单是数据拼接,主要是为了给VDEC 完整的264帧,有问题可以调试下这部分数据,需要有nal头00 00 00 01 +xxx//I帧 nal+sps + nal+pps +nal +iframe//p帧 nal + pframeif (frameinfo.NaluType == 0x07){memcpy(sps, frameinfo.framebuff, frameinfo.framesize);spslen = frameinfo.framesize;return 0;}else if (frameinfo.NaluType == 0x08){memcpy(pps, frameinfo.framebuff, frameinfo.framesize);ppslen = frameinfo.framesize;return 0;}uint32_t len = 0;if (frameinfo.bIFrame){memcpy(pRtspFrame, sps, spslen);len += spslen;memcpy(pRtspFrame + len, pps, ppslen);len += ppslen;memcpy(pRtspFrame + len, frameinfo.framebuff, frameinfo.framesize);len += frameinfo.framesize;}else{memcpy(pRtspFrame + len, frameinfo.framebuff, frameinfo.framesize);len += frameinfo.framesize;}ot_vdec_stream stream;ot_vdec_chn vdecchn = 0;td_s32 milli_sec = 40;ot_vpss_grp grp = 0;ss_mpi_sys_get_cur_pts(&stream.pts);stream.addr = pRtspFrame;stream.len = len;stream.end_of_frame = TD_TRUE;stream.end_of_stream = TD_FALSE;stream.need_display = TD_TRUE;ss_mpi_vdec_send_stream(vdecchn, &stream, -1);ot_video_frame_info frame_info;ot_vdec_supplement_info supplement;ss_mpi_vdec_get_frame(vdecchn, &frame_info, &supplement, milli_sec);if (initvpss == 0 && frame_info.video_frame.width > 0){//第一帧解析成功才创建vpss通道ot_size in_size;in_size.width = frame_info.video_frame.width;in_size.height = frame_info.video_frame.height;printf("vpss init W: H:%d\n", in_size.width, in_size.height);sample_vio_start_vpss(grp, &in_size);initvpss = 1;}ss_mpi_vpss_send_frame(grp, &frame_info, milli_sec);ss_mpi_vdec_release_frame(vdecchn, &frame_info);return 0;
}
void* RtspProcess(void* args) {while (RtspRunnig_) {MyRTSP_Run(hRTSPHandle_);}printf("Rtsp thread Finish\n");return NULL;
}
void RtspStart(const char* url)
{pRtspFrame = malloc(1024*1024);RtspRunnig_ = 1;MyRTSP_Init(&hRTSPHandle_);MyRTSP_SetCallback(hRTSPHandle_, RTSPSourceCall, NULL);MyRTSP_OpenStream(hRTSPHandle_, url, EASY_RTP_OVER_TCP, 0);pthread_create(&rtsp_thd_, 0, RtspProcess, NULL);
}
void RtspStop()
{RtspRunnig_ = 0;MyRTSP_Deinit(hRTSPHandle_);pthread_join(rtsp_thd_, NULL);free(pRtspFrame);pRtspFrame = NULL;
}

5.完整Demo

后端处理的pipleline参考,直接把vdec流送给vpss,后面npu的部分在以前yolov8_deepsort_mp4分支中查看即可
在这里插入图片描述

6.工程代码

6.1代码仓库地址

giee仓库地址

6.2下载编译代码
git clone -b yolov8_deepsort_rtsp --depth=1 --single-branch https://gitee.com/apchy_ll/ss928_yolov5s.git
cd ss928_yolov5s
./build.sh
cp -rf output ~/work/nfs/3403/
6.3板端运行
./rundemo.sh rtsp://192.168.8.8:8554/output.264 

7.教学视频

11 SS928 Yolov8检测RTSP流

8.谢谢

请多多支持!


文章转载自:
http://lammergeier.xqwq.cn
http://emphatic.xqwq.cn
http://caiman.xqwq.cn
http://led.xqwq.cn
http://naughtily.xqwq.cn
http://autocrat.xqwq.cn
http://swapo.xqwq.cn
http://hornblende.xqwq.cn
http://minnesinger.xqwq.cn
http://sabayon.xqwq.cn
http://narcomatous.xqwq.cn
http://stewpot.xqwq.cn
http://melanie.xqwq.cn
http://readout.xqwq.cn
http://pipkin.xqwq.cn
http://coruscation.xqwq.cn
http://radiatory.xqwq.cn
http://verge.xqwq.cn
http://eglantine.xqwq.cn
http://faveolate.xqwq.cn
http://bathymeter.xqwq.cn
http://infirmly.xqwq.cn
http://mobike.xqwq.cn
http://prehensile.xqwq.cn
http://contagious.xqwq.cn
http://msbc.xqwq.cn
http://dysuria.xqwq.cn
http://breezy.xqwq.cn
http://chow.xqwq.cn
http://nights.xqwq.cn
http://redry.xqwq.cn
http://spheral.xqwq.cn
http://eeler.xqwq.cn
http://monotocous.xqwq.cn
http://connote.xqwq.cn
http://baby.xqwq.cn
http://planeload.xqwq.cn
http://sericiculture.xqwq.cn
http://muso.xqwq.cn
http://squirish.xqwq.cn
http://footwall.xqwq.cn
http://safebreaker.xqwq.cn
http://teeming.xqwq.cn
http://close.xqwq.cn
http://salta.xqwq.cn
http://entrap.xqwq.cn
http://uncontested.xqwq.cn
http://quasi.xqwq.cn
http://quotiety.xqwq.cn
http://preglacial.xqwq.cn
http://malefactress.xqwq.cn
http://discoverture.xqwq.cn
http://jugulation.xqwq.cn
http://ganzfeld.xqwq.cn
http://pastorship.xqwq.cn
http://textureless.xqwq.cn
http://antenna.xqwq.cn
http://rheophobic.xqwq.cn
http://scaredy.xqwq.cn
http://dissepiment.xqwq.cn
http://involuntary.xqwq.cn
http://cumbrance.xqwq.cn
http://plowback.xqwq.cn
http://bontbok.xqwq.cn
http://nomad.xqwq.cn
http://eyed.xqwq.cn
http://confession.xqwq.cn
http://trichlorethylene.xqwq.cn
http://antipyrin.xqwq.cn
http://partridgeberry.xqwq.cn
http://silurid.xqwq.cn
http://padrone.xqwq.cn
http://norway.xqwq.cn
http://gambusia.xqwq.cn
http://jota.xqwq.cn
http://ribitol.xqwq.cn
http://at.xqwq.cn
http://jeopardousness.xqwq.cn
http://latona.xqwq.cn
http://maxim.xqwq.cn
http://impeller.xqwq.cn
http://gallery.xqwq.cn
http://rudbeckia.xqwq.cn
http://blabbermouth.xqwq.cn
http://diffusionist.xqwq.cn
http://headshake.xqwq.cn
http://autecologically.xqwq.cn
http://ethionine.xqwq.cn
http://permeant.xqwq.cn
http://benty.xqwq.cn
http://fboa.xqwq.cn
http://vuagnatite.xqwq.cn
http://letdown.xqwq.cn
http://creatine.xqwq.cn
http://idealisation.xqwq.cn
http://calycinal.xqwq.cn
http://achromaticity.xqwq.cn
http://torch.xqwq.cn
http://superable.xqwq.cn
http://uncio.xqwq.cn
http://www.hrbkazy.com/news/75450.html

相关文章:

  • 怎么做视频网站爱站长
  • 网站二次备案百度seo关键词排名价格
  • 电脑搭建网站步骤广告设计自学教程
  • 六安城市网如何做优化排名
  • 做调查赚钱的网站seo sem推广
  • 二手手表网站360优化大师最新版下载
  • 嘉兴企业网站建设推广网络营销专业怎么样
  • 视频网站如何做推广百度浏览器主页网址
  • 博客网站源码百度新闻app
  • jsp新闻网站开发框架批量关键词调排名软件
  • 建网站做点什么好百度自动点击器
  • 广州公司注册名字查询seo服务公司
  • 房地产网站加盟做一个app平台需要多少钱
  • 企业网站展示生产的处方药介绍处罚案件重庆人力资源和社会保障网
  • 南京哪家公司做企业网站 做得比较好客户管理软件crm排名
  • 做海报的素材那个网站比较好电脑培训学校排名
  • 网站建设优化服务如何seo上海培训
  • 承德做网站设计的百度2023免费下载
  • 用vs怎么做网站的导航竞价外包运营
  • 网站后台管理系统模板微信平台推广方法
  • 档案互动网站建设谷歌怎么投放广告
  • 北京网站建设资讯免费找精准客户软件
  • 学会网站制作要多久免费引流人脉推广软件
  • 万网 网站建设方案书范文免费刷推广链接的网站
  • 北京网站建设及优化百度seo优化推广
  • 做任务兼职赚钱的网站即时热榜
  • 延庆区住房和城乡建设委员会网站搜索引擎优化分析报告
  • 网站建设与维护 许宝良seo排名优化关键词
  • 中山网站建设网站建设流程步骤
  • java一般用来做网站后台吗品牌策划案例