A background:
Users need to watch the video through flash or mobile phone, and most cameras are RTSP protocol, so need to do a relay.
Resources:
http://blog.csdn.net/firehood_/article/details/8813587
http://blog.csdn.net/firehood_/article/details/8783589
These two articles detail the Mp4v2 save the file and the 264 files through the rtmp live, the two aspects of interest can be directly read the two article
to real-time requirements are very high, such as 0.5s or less, this is a good choice. The former mimic Spydroid wrote a proposed RTSP server, in fact, is options,describe,setup,play,pause,teardown these steps, the agreement with the most extensive, on-line introduction is more. To really understand the RTSP protocol, the C + + language is good to see live555.RTMP
The specific parameters in the code meaning, you can go here:
https://wiki.videolan.org/Documentation:WebPlugin/
Looking for half a day, HTML5 can support rtmp but can't play Rtsp,flash also stop in Rtmp, finally colleagues recommended a good East open source VLC, ask Google great God, this goods can be used to make each browser (IE ActiveX mode, Google, FF) to a
configuration, the traditional monitoring industry inside the HD Network Camera IP Camera, NVR and other devices with RTSP protocol output access to the EASYNVR,EASYNVR can be these video source audio and video data to pull, Convert to Rtmp/hls, carry on the whole platform terminal H5 live Broadcast (WEB, Android, IOS), and EASYNVR can send live data of the video source to the third party CDN Network, real
Media Player, this webpage Player has a strong performance: not only does it support the HTTP, RTMP, and HLS supported by the various players mentioned above, it also supports MMS, RTSP, and UDP protocols (all protocols supported by VLC Media Player ).
The source code of ActiveX VLC Player is as follows.
The player effect is shown in the figure. The URL of the video being played is
authentication before using it. In this android RTMP example, we will not only discuss RTMP live streams, but also m3u8 streams (HLS), RTSP streams, and MMS (Microsoft Media Stream ). First, let us reference the Vitamio library in our project.Follow these steps to reference the Vitamio library in Android Studio:
Download Vitamio bundle
Decompress the package
the m3u8 stream (HLS), RTSP Stream, and MMS (Microsoft Media stream). First let's refer to the Vitamio library in our project.The steps for referencing the Vitamio library in Android Studio are as follows:Download Vitamio bundle Https://github.com/yixia/VitamioBundle Unzip and File->import Module on Android Studio To specify the Vitamiobundle path, select the Vitamio folder click Finish to add the dependent item (': Vitamio ') on the Build.gradle (M
following:
#EXTM3U
#EXT-x-stream-inf:program-id=1,
bandwidth=200000
http://ALPHA.example.com/lo/prog_index.
m3u8
#EXT-x-stream-inf:program-id=1,
bandwidth=200000
http://BETA.example.com/lo/prog_index.
m3u8
#EXT-x-stream-inf:program-id=1,
bandwidth=500000
http://ALPHA.example.com/md/prog_index.
m3u8
#EXT-x-stream-inf:program-id=1,
bandwidth=500000
http://BETA.example.com/md/prog_index.
m3u8
In the example above, when the client connects to the primary server Alpha fails, it attempts to connect
based on an ActiveX control. ActiveX-based controls mean that only IE supports the web player and requires that the machine must first install VLC.Thanks to the almost "Magnum" VLC Media Player, the performance of this web player is quite strong: not only does IT support HTTP, RTMP, HLS supported by the various players mentioned above, but also supports MMS, RTSP, and UDP protocols (VLC Media It supports t
First, download the library files that you need to rely on to install Nginx:1.1, select Source DirectorySelected Directory/usr/local/rtmpCd/usr/local/rtmp1.2, installing the Pcre LibraryCd/usr/local/rtmpTo www. pcre. org download pcre-8.37.tar.gz, then copy to/usr/local/hlsTAR-ZXVF pcre-8.37.tar.gzCD pcre-8.37./configureMakeMake install1.3, installing the Zlib libraryCd/usr/local/rtmpTo www. zlib. NET Download zlib-1.2.8.tar.gz, then copy to/usr/local/hlsTAR-ZXVF zlib-1.2.8.tar.gz CD zlib-1.2.8.
Rtps demo (64-bit for Linux and 32-bit for Windows): rtsp_demo.rar
1. First, the server receives a client connection request to produce an rtspclientconnection object. For details about the rtspclientconnection definition, refer to the definition of RTSP server-module from scratch.
int rtsp::v_accept(netconnection * n){ netoperation::v_accept(n); printf("client accept\n\n\n"); RtspClientConnection
: This article mainly introduces how to configure the rtmp Server for NGINX to implement rtmp and hls live broadcast. if you are interested in PHP Tutorial, refer to it. Introduction to NGINX
First configure:
work_processes4;events{ work_connections1024;}http{ include mime.types; default_type application/octet-stream; sendfileon; keepalive_timeout65; server{ listen80; server
version is: Version 1.1.0e. compilingCompiling OpenSSL is simple, if it is on Linux, direct./configure + make can be done. If you want to cross-compile, after the configure corresponding platform, you need to modify the makefile cc AR prefix related variables.
./configure android-armv7 Modify makefile cc ar prefix .... (edited)
After compiling, we can see the LIBSSL.A and Libcrypto.a two lib in the Libs directory. The two Libs support is required for rtmp
Keywords: nignx (http server); Rtmp,hls (Streaming media Services)Thanks for the open source, thanks to the fighting people. Now in some of the work of streaming media services, streaming media server set up online tutorials more into the calf, but look carefully, found a lot of comrades posted tutorials have a little problem, there are some are crawling other people's data to get, typesetting also have problems, let novice confused. This article is a
A simple Rtmp/hls Live server licensed by the MIT protocol, its core value concept is simplicity and efficiency.How to use:TEP 1:build SRSTar XF simple-rtmp-server-*.*.tar.gzCD Simple-rtmp-server-*.*/trunk./configure--with-ssl--with-hlsMakeStep 2:start SRS./objs/simple_rtmp_server-c conf/srs.confStep 3 (Optional): Start Nginx for HLSsudo./objs/nginx/sbin/nginxSte
// The following is the RTSP server.1 # include
The above is RTSP server.
Next, we will create RTSP forwarding server B and forward the RTSP stream of server.
1 # include
The code can be obtained in the directory of the gstreamer GST-RTSP-Server Source code examples, but
1280x720-q rtmp://ip:1935/
Hls/test2
Now our streaming media server has two real-time streaming, one is rtmp, the other is HLS, with a streaming media player, streaming media player can use VLC can also use FFmpeg belt ffplay. The phone is also playable.The addresses of the above two streams are:The first one is the push address: rtmp://serverip:193
socket is placed in freadset, which is used in the select mechanism below. Map the second parameter to Handler-> handlerproc. 2. Prepare for connection execution Code : Env-> taskscheduler (). doeventloop (); The env is the same as the Env in 1. Call: basictaskscheduler0: doeventloop-> basictaskscheduler0: doeventloop. Execute select in the infinite loop of doeventloop to wait for the client to connect. Run the code: int selectresult = select (fmaxnumsockets, readset, null, null, TV _timetode
http://neue.v2ex.com/t/316766Although the browser with JS decoding ' play ' video scheme has a few ... Why not one more ...Basic principle:
The server uses websockify to relay an rtmp Stream.
The browser uses NODE-RTMPAPI to parse the RTMP protocol to complete the handshake and Communication.
Extract the H264 video stream
Send to Broadway decode
Repo:https://github.com/yingdev/web-rtmpAt pr
As mentioned in the previous article, the RTSP (Real Time Streaming Protocol) method is used to implement live video. However, one drawback of the RTSP method is that if the client needs to be accessed through a webpage, you need to embed an ActiveX control in the page, and ActiveX usually requires a signature for normal use. Otherwise, you need to change the browser settings when using ActiveX, and ActiveX
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.