rtp

《FreeSWITCH: VoIP实战》:SIP 模块

谁说我不能喝 提交于 2019-12-02 21:00:39
SIP 模块是 FreeSWITCH 的主要模块,所以,值得拿出专门一章来讲解。   在前几章时里,你肯定见过几次 sofia 这个词,只是或许还不知道是什么意思。是这样的,Sofia-SIP 是由诺基亚公司开发的 SIP 协议栈,它以开源的许可证 LGPL 发布,为了避免重复发明轮子,FreeSWITCH 便直接使用了它。   在 FreeSWITCH 中,实现一些互联协议接口的模块称为 Endpoint。FreeSWITH 支持很多的 Endpoint, 如 SIP、H232等。那么实现 SIP 的模块为什么不支持叫 mod_sip呢?这是由于 FreeSWITCH 的 Endpoint 是一个抽象的概念,你可以用任何的技术来实现。实际上 mod_sofia 只是对 Sofia-SIP 库的一个粘合和封装。除 Sofia-SIP 外,还有很多开源的 SIP 协议栈,如 pjsip、osip 等。最初选型的时候,FreeSWITCH 的开发团队也对比过许多不同的 SIP 协议栈,最终选用了 Sofia-SIP。FreeSWITCH 是一个高度模块化的结构,如果你不喜欢,可以自己实现 mod_pjsip 或 mod_osip 等,它们是互不影响的。这也正是 FreeSWITCH 架构设计的精巧之处。   Sofia-SIP 遵循 RFC3261 标准,因而 FreeSWITCH

How to stream live video in HTML5?

只愿长相守 提交于 2019-12-02 20:47:21
I'm looking for a way to broadcast a live video taken from a webcam or camera rooted to a PC. The broadcast should be displayed in a HTML5 page using the tag (which support rtp, and rtsp I think). The user viewing the stream should not have to install any plug-in or video player such as QuickTime. I need the video to be in mp4 format such as: rtsp://www.mywebsite/streaming/video.mp4 This would be the link I'd put as the src of the html 5 video tag. So I'd like to know if it's possible, what are my options to do such things. Karl Laurentius Roos It's possible. But you will have major problems

Streaming Video From Android

心不动则不痛 提交于 2019-12-02 17:39:06
I'm trying to stream video from the Android phone, which should be watched in an mediaplayer. I've been looking at http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system which seems to be a dead end since it send the raw file data, and not a streamable format. Then I tried using some code from SipDroid, more specific; parts of VideoCamera.java, RtpPacket.java and RtpSocket.java, which gives a stream on UDP, however these is not playable in i.e. mplayer(can't detect the codec). Wireshark tells that it is a UDP packet and not a RTP packet so

H.264 conversion with FFmpeg (from a RTP stream)

不羁的心 提交于 2019-12-02 17:11:27
Environment: I have an IP Camera, which is capable of streaming it's data over RTP in a H.264 encoded format. This raw stream is recorded from the ethernet. With that data I have to work. Goal: In the end I want to have a *.mp4 file, which I can play with common Media Players (like VLC or Windows MP). What have I done so far: I take that raw stream data I have and parse it. Since the data has been transmitted via RTP I need to take care of the NAL Bytes, SPS and PPS. 1. Write a raw file First I determine the type of each frame received over Ethernet. To do so, I parse the first two bytes of

H.264 over RTP - Identify SPS and PPS Frames

為{幸葍}努か 提交于 2019-12-02 16:00:39
I have a raw H.264 Stream from an IP Camera packed in RTP frames. I want to get raw H.264 data into a file so I can convert it with ffmpeg . So when I want to write the data into my raw H.264 file I found out it has to look like this: 00 00 01 [SPS] 00 00 01 [PPS] 00 00 01 [NALByte] [PAYLOAD RTP Frame 1] // Payload always without the first 2 Bytes -> NAL [PAYLOAD RTP Frame 2] [... until PAYLOAD Frame with Mark Bit received] // From here its a new Video Frame 00 00 01 [NAL BYTE] [PAYLOAD RTP Frame 1] .... So I get the SPS and the PPS from the Session Description Protocol out of my preceding

Decode RTP over UDP with Scapy

孤人 提交于 2019-12-02 09:44:04
问题 How can I decode (and manipulate) RTP over UDP with Scapy 2.3.2? I have a capture file called rtp.pcap which contains an RTP audiostream to 224.0.1.11:5016. Wireshark correctly decodes the stream when you enable the RTP over UDP protocol (default off). However, I want to do automatic packet manipulation, so I would like to decode it with Scapy. Currently, Scapy does not recognize RTP, although there is an RTP layer: >>> from scapy.all import RTP # shows that RTP layer is installed in my

Decode RTP over UDP with Scapy

爱⌒轻易说出口 提交于 2019-12-02 06:28:51
How can I decode (and manipulate) RTP over UDP with Scapy 2.3.2? I have a capture file called rtp.pcap which contains an RTP audiostream to 224.0.1.11:5016. Wireshark correctly decodes the stream when you enable the RTP over UDP protocol (default off). However, I want to do automatic packet manipulation, so I would like to decode it with Scapy. Currently, Scapy does not recognize RTP, although there is an RTP layer: >>> from scapy.all import RTP # shows that RTP layer is installed in my version >>> pkts = sniff(offline="rtp.pcap", filter="udp dst port 5016") >>> pkts[0].show() [...] ###[ UDP ]

Android: Send .wav to SIP-Phone via RTP (G.711 PCMU) very noisy, crackling sound based on SipDroid/MjSIP

风流意气都作罢 提交于 2019-12-02 01:18:52
I want to transmit(send-only) a .wav file from my android to a softphone (x-lite) so that the called person on x-lite can hear the sound of the .wav file. The scenario is as follows: Android and x-lite are both in the same WLAN and both connected to FreeSwitch. I can call x-lite from the android phone. If the call is accepted on the x-lite the android sends the .wav file and I can see in wireshark that RTP pakets (G.711 PCMU) are send from the phone to x-lite. I can hear some sound but not the one I would expect. Instead its crackling, noisy and some beeps. So is there a problem in the SDP I

H264 profile-iop explained

微笑、不失礼 提交于 2019-12-01 18:19:58
Identify h264 profile and level from profile-level-id in sdp? How does one identify what the constraints actually mean? For example I have a profile-type-id: 42801e that translates to: How am I to relate that to the features defined in the table here ? The above reference identified that the Constraint_set0_flag: 1 means that it's the Constrained Baseline Profile . But how to relate the flag to the three different NO's (from the table) that differentiate the Baseline profile from the Constrained Baseline Profile ? Update Can't confirm that the above, about identifying the Constrained Baseline

Kurento Media WebRTC to RTP

偶尔善良 提交于 2019-12-01 12:55:26
I am using kurento's master git to make a WebRTC to RTP bridge. MediaPipeline pipeline = kurento.createMediaPipeline(); WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build(); HttpGetEndpoint httpEndpoint=new HttpGetEndpoint.Builder(pipeline).build(); org.kurento.client.Fraction fr= new org.kurento.client.Fraction(1, 30); VideoCaps vc= new VideoCaps(VideoCodec.H264,fr); httpEndpoint.setVideoFormat(vc); AudioCaps ac= new AudioCaps(AudioCodec.PCMU, 65536); httpEndpoint.setAudioFormat(ac); webRtcEndpoint.connect(httpEndpoint); However inspite of this the output video playing