First step: first introduce the relevant technology usedNote: The Jwplayer plug-in used in the project does not support the RTSP protocol, so use the following techniques to turn the art
FFmpeg is an open-source computer program that can be used to record, convert digital audio, video, and turn it into a stream. Here I only use its video format conversion function, the RTSP protocol to the stream i
IOS RTMP -based video push streamFirst, the basic introductioniOS live a birth, immediately fiery not, a variety of live platforms springing up, because of this, also led to the rapid development of live broadcasting technology, in the IT industry proficient in live technology monkeys are very valuable. Broadcast technology involves a wide range of knowledge, the most important is probably the following: soft and hard decoding. H264, beauty processing
()
Rtmp_enablewrite ()
Rtmp_connect ()
rtmp_write () rtmp_pause () Rtmp_seek ()
rtmp_read
() rtmp_close () Rtmp_free ()
rtmp Push Stream
At the end of this article, the Android-side data has been transferred to JNI for conversion, then H.264 encoded and read Sps,pps frame information, now we need to encapsulate the data into RTMP packet, and then push!
://localhost:1935/rtmplive/room
EffectPush stream fast integrated live push streamPrerequisites:
Go to GitHub to download the latest Meow project.
Configure the NGINX+RTMP server according to the tutorial above.
Originally prepared to achieve their own live streaming, but today in the technology group chat, a friend recommended Youku Tudou 来疯直播 shortly before the open source
Many friends will ask how RTSP through the RTMP protocol push to the server, just a while ago developed this feature written here, and you share.The first thing I want to say is that ffmpeg can achieve this function. The FFMPEG supports the RTSP protocol and also supports RTMP. In this case, RTSP is the input,RTMP is the output, FFmpeg realizes the function of tr
One, RTMP, RTSP, HTTP protocolThese three protocols belong to the Application layer protocol in the Internet TCP/IP five layer architecture. Theoretically these three kinds can be used for video broadcast or on-demand. But usually, live broadcast with RTMP, RTSP. And on-demand with HTTP.The following are the characteristics of the following three respectively. The 1,RTM
restrictions. Allow it to also support other protocol video playback (such as the RTMP protocol).
The relevant judgment in the IJKDEMOINPUTURLVIEWCONTROLLER.M can be commented out.
1
if ([Scheme isequaltostring:@ "http"] | | [Scheme isequaltostring:@ "https"]) {
[Ijkvideoviewcontroller presentfromviewcontroller:self withtitle:[nsstring stringwithformat:@ "URL:%@", url] URL:url completion:^{
[Self.navigationcontroller Popvi
Configuration referenceHttps://github.com/simple-rtmp-server/srs/wiki/v2_CN_LowLatencyLatency Impact factorsEncoders: Different encoders (free or open source), the delay is also different.Streaming Media server: SRS2Streaming protocol: For example: RTMP is real-time high, http_flv is also high-real-time, HLS is not, the official said 60s can tolerate ...Player: VLC is slower than Ffplayer and player.Network
: This article mainly introduces the nginx Reverse proxy TCP to fetch the RTMP stream. if you are interested in the PHP Tutorial, refer to it. Nginx Reverse proxy TCP, get RTMP stream
I. descriptionNginx only supports HTTP reverse proxy by default. to support TCP reverse proxy, you must add the tcp proxy module nginx_
Objective:
Using the javacv1.2 version, refer to the code on the Internet, encountered a number of very serious problems, the last one to eliminate the solution. The main issues to be addressed are:
Problem one, ffmpeg default is the way to use UDP, often the problem of packet loss, you need to change the UDP to TCP can be resolved, the following is the content of the error:
Input #0, RTSP, from ' RTSP://ADMIN:123123@192.168.1.64:554/STREAMING/CHANNELS/1 ': Metadata:title:Media Presentation dur
I have written an article "converting FLV stream to standard h264 and ACC in rtmp", link address
Http://www.cnblogs.com/chef/archive/2012/07/18/2597279.html
. The extraction of h264 from rtmp is analyzed.
In flash projects with audio/video interaction, the audio encoding can only be in speex format.
This articleArticleIt is divided into three parts. These
1, the project needs to use FFmpeg push rtmp stream to Crtmpserver, and then live./usr/bin/ffmpeg-re-loop 1-i tmp/234.jpg-r 10-f flv rtmp://127.0.0.1:8085/live/phone-2342, download Crtmpserver source code, official website (http://www.rtmpd.com/) often not go, to GitHub downloadHttps://github.com/j0sh/crtmpserver3, need to install CMake and then compile.Yum Insta
Previous open-Source Videocore improvements: 1) added a beauty filter; 2) added the librtmp to replace the original too simple rtmpclient;Later listen to friends said, in Videocore above OpenGL modification, add new filter More trouble, iOS filter best to calculate gpuimage.I decided to the multi-filter open-source gpuimage to achieve the rtmp live streaming push;Implementation of the scenario:1,gpuimagemoviewriter the output of the RGBA video data.By
speex encoding, they are fixed and invalid data in the Protocol. The encoding sampling rate is 16 kHz, single channel, 16 bit/sample.
The remaining data is the audio frame data, which can be a set of multiple frames, depending on the framesperpacket mentioned above. The default value in Flex is 2, so each audio package has two frames of data. Note: When the VAD function is enabled, the two data frames can be two actual data frames, or two 10-byte data frames, or each occupies one frame.
Iii. H
During this period of time, the work needs are converted from FLV stream to standard h264 and aac on rtmp. The server is an open-source project crtmpserver, client flex writing, video encoding h264, and audio encoding AAC, some protocol-related items are recorded as follows.
1. Analyze FLV data
Let's take a FLV file to analyze the FLV data format.
FLV standard document http://www.cnblogs.com/chef/a
This time, the work of the need, on the rtmp to do the FLV stream to the standard H264, AAC conversion, the server is open source project Crtmpserver, client flex writing, Video coding H264, Audio coding AAC, now some of the agreements related to the following things record.
I. Analysis of FLV data
Let's take an FLV file to briefly analyze the format of the FLV data
FLV standard document Download address h
Take a UAV project, responsible for video playback this piece, choose is video.js this video plug-in, this thought can open happy heart development, who how material online about this part of the information so little, give me this hand party gave a great pressure. Okay, don't talk nonsense.The project needs to achieve a four-way player, can play the drone shot real-time screen, and can do local refresh without affecting the entire page, and to be able to dynamically switch the source of the vid
Standard Flash Player ACTIONSCRIPT3 statement that plays a flash publish rtmp stream,Netconnection--->netstream--->play--->attachnetstreamThe project, however, has been in a state of stalling.Later added a sentenceNsplayer.buffertime = 0.1;I don't even have a card.The help document says:The default value is 0.1 (One-tenth of a second). To determine the number of seconds currently in the buffer with the Buff
Source on GitHubThis exception is thrown when the video stream in Flash Media server is drawn using Bitmapdata.draw ():
Cannot access rtmp://xxxxx. No policy files granted access. At Flash.display::bitmapdata/draw ()
This error occurs because the client (SWF) does not have permission to replicate the original video data in NetStream. To see a hint, a policy file is needed.However, in the FMS
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.