Current location - Quotes Website - Collection of slogans - Why do rtmpt and rtmp increase the port number for one and not the other?
Why do rtmpt and rtmp increase the port number for one and not the other?
This application mainly converts HTTP stream (not HLS or DASH) into RTMP protocol and sends it to the media server of Adobe Flash Media Server or Wowza Media Server.

According to Wikipedia: "Real-time Message Protocol (RTMP) was originally a proprietary protocol developed by macromedia, which was used to transmit audio, video and data between Flash players and servers through the Internet. Macromedia is now owned by Adobe, which has released an incomplete version of the protocol specification for public use. "

RTMP protocol has the following parameters:

RTMP: TCP port 1935 was originally adopted.

RTMPS: the security mechanism for loading RTMP into SSL is similar to HTTPS.

RTMPE: adopts the encrypted version provided by Adobe for RTMP.

RTMPT:he RTMP protocol is attached to RTMP, encapsulated in HTTP request, and can pass through firewall. This is a very good protocol, using TCP ports 80 and 443 to bypass the company firewall. Encapsulated sessions can be carried in pure RTMP, RTMPS or RTMPE packets.

RTMP R.

VLC can support RTMP protocol in version 2.0.x, but it can't be executed in some environments, such as 2.0.2, 2.0.3, 2.0.4 and 2.0.6, and it can't be executed on the server of Windows 2008 Server 64. You can open VLC first, and then open the network streaming media, such as "rtmp://aaa.bbb.com:1935/live/streamingsource" to see if it can be opened. Mainly VLC 2.0.x uses ffmpeg/libav library, but some packages don't support it. So you have to make sure first. RTMPS is only useful when librtmp support is enabled in ffmpeg/libav.

The examples of VLC and RTMP are mainly used to capture and transcode a single stream generated by an application. Assigned to multiple clients through another application. This is very important in Wowza. Although Wowza also supports VLC to receive streams in UDP/RTP/RTSP mode, it is very unstable in many cases.

The LC is directly connected to a new RTMP stream, such as WOWZA, and does not listen to incoming requests. Therefore, it is impossible to see the RTMP River directly from VLC. WOWZA needs to be connected to watch the stream. VLC can do this:

$ VLC rtmp://rtmp.server.com:1935/path/to/stream One thing must be reminded. Sending RTMP serial stream from VLC to Wowza server is not always stable. There are some time-related "bugs" that cause Wowza to close the connection. Such problems are related to "audio" and "video" timestamps. It is not a good idea to integrate RTMP with the Audio Synchronization option, but it can be constantly adjusted and modified.

Webcam RTMP streaming media

The following is about the application of webcam. Others are applications, such as acquisition equipment, equipment and video files.

Examples of windows

The acquisition devices under windows all use DirectShow interface. VLC modules also use this interface, which is called "DirectShow" or "dshow". Here is an example:

$ VLC dshow://"-sout ' # transcode { vcodec = h264,vb=300,fps=25,scale= 1,acodec=mp4a,ab=64,channels=2}:std{access=rtmp,mux=ffmpeg{mux=flv}, Dst = rtmp://rtmp.server.com:1935/path/to/stream}' DirectShow option can also be used in QT interface.

An example of Linux

Generally, the acquisition device of linux adopts "Video for Linux" (V4L2) interface. An example of using command mode to collect RTMP streams sent by network camera devices (or "v4l2 devices") is as follows:

$ VLC v4 L2://-v4 L2-fps=25-sout ' # transcode { vcodec = h264,vb=300,fps = 25,scale= 1,acodec=mp4a,ab=64,channels=2}:std{access=rtmp, Mux = ffmpeg {mux = flv}, DST = rtmp://rtmp.server.com:1935/path/to/stream}' This example can automatically detect other parameter options such as video standard (PAL, NTSC), chroma, width and length, etc. You can set them yourself. It must be noted that these parameter settings are related to your own equipment. When we use debug mode (-vvv), VLC's own video for linux (v4l2) module will display numerical information when it is executed. The V4l2 module provides the following optimization options:

–V4L2-dev =: Specify a specific device to collect.

–-v4 L2-standard =: Which video standard is used, such as SECAM, PAL, NTSC, etc.

–-v4l 2-width =: the width of the video presentation (in pixels)

–-v4 L2-height =: the length of the video presentation (in pixels)

The above is the description of v4l2 related parameter options. Complete v4l2 module information can be inquired through the following instructions.

$ vlc -H -p v4l2-advanced The following is another video server that transcodes http serial stream into RTMP, such as Adobe Flash Media Server or Wowza Media Server.

cvlc-I dummy-sout-mux-caching = 5000-sout = ' # transcode { venc = x264 { keyint = 60 },vcodec=h264,vb=800}:std{access=rtmp,mux=ffmpeg{mux=flv}, dst = rtmp://destination IP address: 1935/live/stream file } } ' & amp; This is the method of ffmpeg:

ffmpeg-I-vcodec libx 264-VB 800k-acodec libfaac-ab 64k-f flv rtmp://destinationip address: 1935/live/stream file