generated stream addresses are:
Rtmp stream Address is (FMLE push stream without HLS address): Rtmp://192.168.1.170/live/livestream
After transcoding the rtmp stream address is: RTMP://192.168.1.170/LIVE/LIVESTREAM_FF
The HLS stream after transcoding address is: http://192.168.1.170/live/livestream_ff
Google, the answer has been tried again, the bug is still the sound. Finally there is no way, brew list look at all the installed modules, only to find that their own manual knocking command, will nginx-full become nginx -full .On the solution:Unloadingnginxuninstall nginxInstall againnginxinstall nginx-full --with-rtmp-module
Installing FFmpeg
Execute commandinstall ffmpegffmpegthe installation time will be a little
. Configuration of rtmp
Now we're going to modify the nginx.conf configuration file and configure the RTMP
Copy nginx configuration file location
/usr/local/etc/nginx/nginx.conf
Turn on the Finder Shift + command + G to go and open the nginx.conf with the Notepad tool
HTTP {
...
}
After the HTTP node, add the rtmp configuration:
of the nginx.conf file.Brew Info Nginx-full8. Edit the nginx.conf, add the rtmp configuration after the HTTP node #在http节点后面加上rtmp配置 rtmp { server { listen 1935; Application Rtmplive { live on; Record Off;}}} 9. View Nginx Version numberNginx-v10. Replace with your own Nginx version number, res
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 only supports IE kernel browsers, chrome and FireFox require the IE Plug-in to run, which
RTMP is a TCP protocol that Flash player receives video from a video server. Adobe has released most of the RTMP protocol, although some details have not been disclosed, but for our own development of a rtmp server is enough, even if not open, many open-source projects have already made a lot of details of the agreemen
://ivi.bupt.edu.cn/hls/cctv5phd.m3u8CCTV6 HD: http://ivi.bupt.edu.cn/hls/ Cctv6hd.m3u8 Apple offers test feeds (on demand): Http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear2/prog_ Index.m3u8third, playback software recommendation: VLCTo play a live video stream, or to test whether a live video address is available. VLC Media Player is recommended here. Powerful and cross-platform. Support for Windows, Mac OS, Linux, Android, I
; #### the speed limit starts after the flv video file is downloaded for 5 MB.
Limit_rate 512 k; #### speed limit: 512 K
Index index.html;
Charset UTF-8;
Location ~ \. Flv {
Flv;
}
Location ~ \. Mp4 $ {
Mp4;
}
Error_page 500 502 503 x.html;
Location =/50x.html {
Root html;
}
}
}
5. start nginx
Check nginx. conf file configuration before Startup
/Usr/local/nginx/sbin/nginx-t-c/usr/nginx/conf/nginx. conf
Or
/Usr/nginx/sbin/nginx-t
If an error occurs, correct the error based on the number of lines
display full screen.
The playback view will be adaptive to the mobile phone horizontal, vertical two of states.
2, sample code
Import Uikit
Import Ijkmediaframework
Class Viewcontroller:uiviewcontroller {
var player:ijkffmovieplayercontroller!
Override Func Viewdidload () {
Super.viewdidload ()
Let options = Ijkffoptions.optionsbydefault ()
Video Source Address
Let URL = Nsurl (string: "Rtmp://live.hkstv.hk.lxdn
;
}
}
}
Five, start Nginx
detect nginx.conf file configuration before starting
/usr/local/nginx/sbin/nginx-t-c/usr/nginx/conf/nginx.conf
or
/usr/nginx/sbin/nginx-t
If errors are corrected according to the number of error lines.
If error: [ERROR]: Invalid PID number "in"/var/run/nginx.pid "
usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf
nginx Boot
/usr/local/nginx/sbin/nginx-s Reload
Test
http://192.168.1.105/player.swf?type=httpfile=test1.flv
(where player.swf
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
SRS is a Chinese development of a video server, the use of support rtmp and HLS protocol, can be made into a container, let the client push the stream, or can be combined with ffmpeg own initiative to pull the stream, detailed instructions can view the SRS wiki:Https://github.com/ossrs/srs/wiki/v2_CN_HomeSrs:http://ossrs.net/srs.release/releases/index.htmlSRS Web Player: http://www.ossrs.net/players/srs_pla
by Adobe Systems.It has three variants:
1) The PlainText protocol working on TCP, using port 1935;
2) rtmpt package in the HTTP request, can pass through the firewall;
3) Rtmps similar to rtmpt, but using HTTPS connection;
The RTMP protocol (Real time Messaging Protocol) is used by Flash for object, video, and audio transmission. This protocol is based on the TCP protocol or the polling HTTP protocol.The
process found video.js this plug-in, code hosted on the GitHub, open source. However, it does not directly support playback of the HLS protocol. Need to use Videojs-contrib-hls but I did not succeed in how to test, can not play. Everyone has the test pass can contact me. After some of the search, GitHub on a visit, Huang Tian, find this library fz-live I think he is also based on Video.js. HTML code
Directly write the video tag, in the source of SRC to the path can be, there is a requirement
Order: Up to Jul 8th,2013 official release of the latest Nginx RTMP module Nginx-rtmp-module instructions detailed.
Core rtmpSyntax: rtmp {...}Context: Root
Description: Saves blocks for all RTMP configurations.
ServerSyntax: server {...}Context: rtmpDescription: Declares an instance of RTMP.rtmp {server {}
}
ListenSyn
working on TCP, using port 1935;
2) rtmpt package in the HTTP request, can pass through the firewall;
3) Rtmps similar to rtmpt, but using HTTPS connection;
The RTMP protocol (Real time Messaging Protocol) is used by Flash for object, video, and audio transmission. This protocol is based on the TCP protocol or the polling HTTP protocol.The RTMP protocol is like a container for data packets, wh
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.