rtp

视频云下半场 向前走还是向“厚”走?

放肆的年华 提交于 2019-12-27 17:54:14
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Photo by Thomas William on Unsplash 从2016年至今,流量的增长基本进入到了平稳期,此时,面向产业界和开发者,我们如何提供更多、更新的能力给到他们,提升平台的用户体验?本文来自腾讯云视频业务产品总监黄斌在LiveVideoStackCon 2019深圳站上的精彩分享,希望和业界一起探讨视频云下半场的方向与定位,也希望与产业界同仁一道,共建更好的大视频生态。 文 / 黄斌 整理 / LiveVideoStack 1.直播行业中的难点 腾讯云内部最早在2015年下半年开始进入视频云领域,将腾讯多年在音视频编解码、音视频通信以及海量并发业务的经验逐渐开放,当时我们也是新进者,定位是在OVP(在线视频平台),类似国外的brightcove及国内的CC视频,我们在教育、在线视频等领域进行了尝试。不过真正确定业务重点方向是在2016年,2016年也是国内的直播元年,行业的爆发让团队意识到直播的流量是非常大的,在高并发情况下如何能做到视频流畅无卡顿、并能提供丰富的IM通信、保证互动连麦等环节的正常进行,这正是我们的技术优势所在,我们抓住了直播的这个风口。 我自己将市面上的产品按照碎片消费、按需点播、实时互动和定时播放四个维度分为四个部分,右上象限这类实时性高,低制作成本的这些应用

RTP时间戳

时光毁灭记忆、已成空白 提交于 2019-12-27 01:39:19
http://xingyunbaijunwei.blog.163.com/blog/static/7653806720126121014111/ —————————————————————————————————————————————————————————— 基本概念: 时间戳单位:时间戳计算的单位不是秒之类的单位,而是由采样频率所代替的单位,这样做的目的就是为了是时间戳单位更为精准。比如说一个音频的采样频率为8000Hz,那么我们可以把时间戳单位设为1 / 8000。 时间戳增量 :相邻两个RTP包之间的时间差(以时间戳单位为基准)。 采样频率 : 每秒钟抽取样本的次数,例如音频的采样率一般为8000Hz 帧率 : 每秒传输或者显示帧数,例如25f/s RTP时间戳课本中的定义: RTP包头的第2个32Bit即为RTP包的时间戳,Time Stamp ,占32位。 时间戳反映了RTP分组中的数据的第一个字节的采样时刻 。在 一次会话开始时的时间戳初值也是随机选择的 。即使是没有信号发送时,时间戳的数值也要随时间不断的增加。 接收端使用时间戳可准确知道应当在什么时间还原哪一个数据块,从而消除传输中的抖动 。 时间戳还可用来使视频应用中声音和图像同步 。 在RTP协议中并没有规定时间戳的粒度,这取决于有效载荷的类型。因此RTP的时间戳又称为媒体时间戳

关于RTP中的时间戳问题

给你一囗甜甜゛ 提交于 2019-12-27 01:38:31
关于RTP中的时间戳问题 时间戳单位:时间戳计算的单位不为秒之类的单位,而是由采样频率所代替的单位,这样做的目的就是为了是时间戳单位更为精准。比如说一个音频的采样频率为8000HZ,那么我们可以把时间戳单位设为1/8000。 时间戳增量:相邻两个RTP包之间的时间差(以时间戳单位为基准)。 如何设定时间戳之间的增量呢? 按照刚才时间戳单位来看,1秒钟按照时间戳单位就是8000,那么一秒钟如果可以播放20帧,也就是发送30帧(帧率),那么可以求出相邻两帧之间的时间差,也就是时间戳增量,那么显而易见是用8000/20,那么这个时间戳增量就为400. 网上大多数列举的一个例子是: 例如MPEG,每帧20ms,采样频率8000Hz,设定时间戳单位1/8000,而每个包之间就是160的增量 这里又该如何理解呢?可以轻易地看出增量是直接8000与20ms相乘的结果,我们可以知道这里两帧之间的时间为20ms,也就是0.02s,这个单位是以秒来衡量的,那么我们要用时间戳单位来表示那么就是8000*0.02=160.所以时间戳增量为160. 还有一点为什么一般都用90000作为视频采样频率呢? 90k是用于视频同步的时间尺度(TimeScale),就是每秒90k个时钟tick。为什么采用90k呢?目前视频的帧速率主要有25fps、29.97fps、30fps等,而90k刚好是它们的倍数

asterisk chan_sip.c代码分析

岁酱吖の 提交于 2019-12-25 16:27:03
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1. 代码简介: Chan_sip.c是SIP协议(RFC3261)的实现代码,它没有实现对S/MIME, TCP and TLS的支持,对应的配置文件是sip.conf,代码所在的分组是:通道驱动类(channel_drivers)。 SIP通道处理各种类型的Sip sessions和dialogs(注意:并不是所有的dialogs都是“电话呼叫”),主要包括: * - Incoming calls that will be sent to the PBX core * - Outgoing calls, generated by the PBX * - SIP subscriptions and notifications of states and voicemail messages * - SIP registrations, both inbound and outbound * - SIP peer management (peerpoke, OPTIONS) * - SIP text messages 在SIP通道中,通常会有一列活跃的SIP dialogs,CLI下的命令sip show channels可以显示出大部分dialogs,除了订阅类的(它们可以用命令sip show

asterisk sip配置说明

女生的网名这么多〃 提交于 2019-12-25 15:50:23
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1. 介绍 extensions.conf中使用sip设备的语法是SIP/devicename,devicename名在下一节中说明。 如果用户在Internet上,可以使用SIP/username@domain形式,同时不要忘记打开DNS SRV功能。 如果定义了一个SIP代理,可以使用SIP/proxyhostname/user或者SIP/user@proxyhostname形式,proxyhostname的定义在下面的章节说明。 2. 在CLI中的查询命令 : u sip show peers 显示所有的SIP peers(包括friends) u sip show users 显示所有的SIP users(包括friends) u sip show registry 显示注册到的主机状态 u sip debug 显示所有的Sip信息 u module reload chan_sip.so 重新装载sip的配置文件 3. 设备命名 命名一个设备之前,要先理解Asterisk是怎么处理呼入电话的: 1) Asterisk取出SIP From: address中的username,使用它来匹配系统中定义的type=user的的设备名。 2) Asterisk检查INVITE请求中的IP地址和端口号

Adding NAL headers to raw H264 stream

痴心易碎 提交于 2019-12-25 10:55:26
问题 In order to add NAL headers to a raw H264 stream, what do I need to do? Ultimately, I want to take the video file and mux it with an audio file. 2 related questions: 1.) I've looked at this post: H.264 conversion with FFmpeg (from a RTP stream) However, when I look at the first two bytes of each frame, I'm seeing 0 and 0 for any frame I record, which doesn't say anything about the NAL contents. Am I looking at the right place? Is there another way I can create and write in NAL headers to a

Xuggler with Red5 Picture is not of the same PixelType as this Coder expected

房东的猫 提交于 2019-12-25 06:38:11
问题 I am writing a Red5 application that will need to use the Xuggler library to capture an rtps stream and convert it to flv. Here is the following code that I'm calling after the Red5 app start method is called. private static void helloXuggler() { String sourceUrl = "rtsp://10.0.1.68:8554/CH001.sdp?AuthMode=Web&AuthValue=6049"; String destinationUrl = "xuggler.m4v"; System.out.printf("transcode %s -> %s\n", sourceUrl, destinationUrl); // create the media reader, not that no BufferedImages need

Syntax of H.264 SPS/PPS in SIP/SDP offer

穿精又带淫゛_ 提交于 2019-12-25 04:04:08
问题 According to RFC 6184: Annex B of H.264 defines an encapsulation process to transmit such NALUs over bytestream-oriented networks. In the scope of this memo, Annex B is not relevant. I see a lot of examplex, including in RFC6236, of SPS/PPS like this a=fmtp:99 packetization-mode=0;profile-level-id=42e011; \ sprop-parameter-sets=Z0LgC5ZUCg/I,aM4BrFSAa However, according to H.264, Annex B, there should be no comma, and a preamble must be added to the beginning of both SPS and PPS (and after

RTCP Transmission Intreval

风流意气都作罢 提交于 2019-12-25 01:55:34
问题 can any body please explain what is the RTCP Transmission Intreval ? I read some material on internet at http://www.ietf.org/rfc/rfc3550.txt but I think I should go for basic concepts,So please if anybody knows some sites to learn this things .Please suggest. 回答1: Not sure how much you understand about RTP in general, so I'll try to get a somewhat complete answer while keeping it simple: RTP (not RTCP) is a protocol send media data, for example small fragments of audio, or small fragment of

PJSIP not running in Windows Phone 8 background process

烈酒焚心 提交于 2019-12-25 01:39:53
问题 I've studied the Windows ChatterBox sample app for Windows Phone 8 and I was able to write a small app to try out PJSIP. However I've run into a problem with the CallInProgressAgent. When creating an outgoing call, I create a VoipPhoneCall object by calling the RequestOutgoingCall method on the VoipCallCoordinator class, thereafter I create the pjsip call by using the pjsua api. It seems pjsip looses all rtp connectivity as soon as I call the RequestOutgoingCall method. My guess is that pjsip