rtsp

Decode h264 rtsp with ffmpeg and separated AVCodecContext

Deadly 提交于 2019-12-05 06:08:53
I need some help with decodein rtsp stream of video. I get it from AXIS IP-camera. I use ffmpeg library for it. It is neccessary to create AVCodecContext separately, not from AVFormatContext->streams[...]->codec; So i create AVCodec, AVCOdecContext and try to init them. AVCodec *codec=avcodec_find_decoder(codec_id); if(!codec) { qDebug()<<"FFMPEG failed to create codec"<<codec_id; return false; //--> } AVCodecContext *context=avcodec_alloc_context3(codec); if(!context) { qDebug()<<"FFMPEG failed to allocate codec context"; return false; //--> } avcodec_open2(context, codec, NULL); Then in main

How to detect I/P/B frame from H264 RTP packet

旧时模样 提交于 2019-12-05 04:45:47
问题 I got H264 RTP packet from RTSP stream. So I want to detect whether the frame is I frame or not. And below is the first packet I got from the first time open stream. So I believe that it is a I-frame (I show you 160 bytes first). packet: 00 00 00 01 67 4D 00 1F 95 A8 14 01 6E 40 00 00 00 01 68 EE 3C 80 00 00 00 01 06 E5 01 33 80 00 00 00 01 65 B8 00 00 08 52 90 9F F6 BE D6 C6 9C 3D F6 D4 2F 49 FB F7 13 F2 A9 C7 27 2D A4 75 59 6C DB FF 35 27 A4 C7 B6 E7 69 A2 E0 FB 0E FF 2D 0E E0 6F 25 43 78

How to play Youtube or Real Time Streaming Protocol Videos in Windows 8 Metro apps?

梦想与她 提交于 2019-12-05 04:03:57
问题 I am building one app which can pick videos from our channel and list and play from within the application. I have done all the json parsing and have everything ready but the only problem is that I am not able to play the rtsp videos coming from the Youtube API. I have read that it is possible to play rtsp videos using the MediaElement control but its not working, my sample XAML code is as below. <MediaElement Width="500" Height="500" AutoPlay="True" Source="rtsp://v6.cache5.c.youtube.com

MediaPlayer RTSP video stream with authentication

时光怂恿深爱的人放手 提交于 2019-12-05 03:16:22
问题 I was able to stream a video from ip camera without authorization, but now i need to do this with authorization. I found few information that says that Android doesn't support authentication by RTSP, but I found another information that says that it is possible in API level 14 by adding HEADERS with that method: setDataSource (Context context, Uri uri, Map headers). My code looks like this: @Override public void surfaceCreated(SurfaceHolder holder){ String authHeader = getB64Auth("user",

centos6.5 live555 rtsp转发

不想你离开。 提交于 2019-12-05 02:48:34
live555安装 wget http://www.live555.com/liveMedia/public/live555-latest.tar.gz tar -zxvf live555-latest.tar.gz cd live ./genMakefiles linux-64bit #注意后面这个参数是根据当前文件夹下config.<后缀>获取得到的 make 完成之后会生成一个proxyServer目录。 rtsp转发 cd proxyServer ./live555ProxyServer rtsp流源地址 &, 例如:./live555ProxyServer rtsp://192.168.0.188:554/stream/main & #执行命令后会返回一个分发的流地址 可以用vlc或其它流播放器测试转发后的流地址。 同类的rtsp服务还有EasyDarwin。 来源: https://www.cnblogs.com/dch0/p/11899474.html

[FFMPEG-代码分析]rtsp客户端

走远了吗. 提交于 2019-12-04 21:17:43
1.代码 libavformat/rtspdec .c libavformat/rtsp .c 2.说明 RTSP具有独立于传输的特性,它本身并不传输流,只是做一个“网络遥控”的作用。在FFMPEG中认为RTSP是一种封装格式,而不是一种协议。 3.RTSP和HTTP的区别 RTSP引入了很多新方法并且有不同的协议标识符。 RTSP服务器在绝大多数默认情况下需要维持状态,而HTTP是无状态协议 RTSP客户机和服务器都可以发出请求,而HTTP只能由客户端发起请求 数据由信带外的另一个协议传送(TCP,UDP,HTTP等) RTSP使用IS 10646(UTF-8) 而不是IS 8859-1,以配合当前HTML的国际化。 RTSP的URI包含绝对URI,而HTTP/1.0请求包含的是相对路径,HTTP/1.1请求包含绝对路径,把主机名放入单独的头部域中。 3.代码分析 rtsp_probe:主要是实现对rtsp或rtsps的格式探测; rtsp_ read _header:主要是实现建立以及完成部分(OPTIONS,DESCRIBE,SETUP,PLAY)会话; ff_rtsp_connect(以负载使用UDP协议): 1 .打开RTSP的会话TCP连接; 2 .OPTIONS会话 3 .DESCRIBE会话:并解析SDP文件(ff_sdp_parse) 4 .SETUP会话

宇视摄像机RTSP地址格式规则

徘徊边缘 提交于 2019-12-04 21:17:09
宇视摄像机RTSP地址规则为:rtsp://{用户名}:{密码}@{ip}:{port}/video1/2/3,分别对应主/辅/三码流; 比如: rtsp://admin:admin@192.168.8.8:554/video1,就表示主码流; rtsp://admin:admin@192.168.8.8:554/video2,表示子码流; rtsp://admin:admin@192.168.8.8:554/video3,表示3码流; 二、通用摄像机RTSP取流URL地址规则 现在实际上现在已经不用再这么复杂地获取RTSP的取流地址了,因为大部分的IPC或者NVR都基本支持了Onvif协议,通过Onvif Device Test Tool或者EasyNVR这样的工具,可以直接发现到设备的RTSP流地址,不用再自己来拼接了,以EasyNVR为例: 更多流媒体音视频技术资源 EasyDarwin开源流媒体服务器: www.EasyDarwin.org EasyDSS高性能互联网直播服务: www.EasyDSS.com EasyNVR安防视频可视化服务: www.EasyNVR.com EasyNVS视频综合管理平台: www.EasyNVS.com EasyNTS云组网: www.EasyNTS.com EasyGBS国标GB/T28181服务器: www.EasyGBS.com

rtsp流媒体协议客户端client Android端实现

拥有回忆 提交于 2019-12-04 21:16:14
播放器主要用来对遵循 RTSP 标准协议的码流进行实时播放以及码流录制。 播放器核心为两个 DLL,分别为网络 DLL 以及播放 DLL。网络 DLL 基于 Live555 开发,主要对码流的获取以及链路的管理进行控制;播放 DLL 基于 ffmpeg 以及 DirectX 开发,主要对实时码流以及本地的音视频的文件进行解码播放和控制。 特别说明:本资源为demo程序,不含源代码,需要源码可联系开发者(见资源里文档说明) Section I Problem Specification 实验目的 本次实验室在MFC环境下使用socket制作的应用程序,实现对RTSP与RTP协议的解析并播放缓存的媒体流。实现一边 下载 一边播放的音乐播放器。客户端使用RTSP协议与LIVE555服务器进行通信,如果与服务器的通信无误就启动RTP线程开始缓存文件并进行播放。本次程序设计还包括一些其他功能: 1使用MFC进行界面的设计 2使用RTP将收到文件下载到本地,进行播放 3 播放控制,包括暂停,播放,终止,快进,快退,拖动播放时间播放,音量控制,播放时间条随播放时间变化。 实验背景 1RTSP协议 RTSP(Real Time Streaming Protocol),实时流协议,是一种流媒体 控制协议。。RTSP是一个多媒体播放控制协议,默认使用554或8554端口

opencv 获取rtsp流媒体视频

亡梦爱人 提交于 2019-12-04 21:16:01
获取实时数据 import cv2 # user: admin # pwd: 12345 # main: 主码流 # ip: 192.168.1.64 # Channels: 实时数据 # 1: 通道 cap = cv2.VideoCapture( "rtsp://admin:12345@192.168.1.64/main/Channels/1" ) print (cap.isOpened()) while cap.isOpened(): success,frame = cap.read() cv2.imshow( "frame" ,frame) cv2.waitKey( 1 ) 获取回放 import cv2 # user: admin # pwd: 12345 # main: 主码流 # ip: 192.168.1.64 # tracks: 回放 # 1: 通道 # time: 开始时间和结束时间的范围 time= 'starttime=20180613t172206z&endtime=20180613t172230z' cap = cv2.VideoCapture( "rtsp://admin:12345@192.168.1.64:554/main/tracks/1?" + time) print (cap.isOpened()) while cap.isOpened():

Android VideoView如何播放RTSP的流

こ雲淡風輕ζ 提交于 2019-12-04 21:15:42
目前在做视频应用的时候,比较先进的技术就是RTSP流媒体了,那么如和利用Android的播放控件VideoView来播放RTSP的流呢? RTSP流媒体链接: http://218.204.223.237:8081/wap/ 这个链接含有所有的RTSP流媒体的链接,现在咱们就用VideoView来播放里面的RTSP的流,咱们以其中的一个链接来测试下好了: rtsp://218.204.223.237:554/live/1/66251FC11353191F/e7ooqwcfbqjoo80j.sdp. 效果截图: 核心代码如下: Java代码 package com.video.rtsp; import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.VideoView; public class rtspActivity extends Activity { /** Called when the activity is first created. */ Button