使用nginx和rtmp插件搭建視頻直播和點播服務器 [論壇 - Ubuntu 哈啦]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



使用nginx和rtmp插件搭建視頻直播和點播服務器
會員二級
註冊日期:
7/1 0:41:34
所屬群組:
已註冊使用者
等級: 5
HP : 20 / 104
MP : 13 / 44
EXP: 19
離線
那位大大,可以告訴我。如何使用………如何下指令……
rtmp {
server {
listen 1935;
chunk_size 4096;

application live {
live on;
record off;
}

application live2 {
live on;
record off;
}

# video on demand
application vod {
play /var/flvs;
}

application vod_http {
play http://192.168.31.185/vod;
}

application hls {
live on;
hls on;
hls_path /tmp/hls;
}
}
}

# HTTP can be used for accessing RTMP stats
http {

server {

listen 8080;

# This URL provides RTMP statistics in XML
location /stat {
rtmp_stat all;

# Use this stylesheet to view XML as web page
# in browser
rtmp_stat_stylesheet stat.xsl;
}

location /stat.xsl {
# XML stylesheet to view RTMP stats.
# Copy stat.xsl wherever you want
# and put the full directory path here
root /path/to/stat.xsl/;
}

location /hls {
# Serve HLS fragments
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /tmp;
add_header Cache-Control no-cache;
}

location /dash {
# Serve DASH fragments
root /tmp;
add_header Cache-Control no-cache;
}
}
}

附件:


docx 15.docx 大小: 22.91 KB; 下載次數: 20

7/29 22:11:42
應用擴展 工具箱
回覆: 使用nginx和rtmp插件搭建視頻直播和點播服務器
會員二級
註冊日期:
7/1 0:41:34
所屬群組:
已註冊使用者
等級: 5
HP : 20 / 104
MP : 13 / 44
EXP: 19
離線
worker_processes 1;

events {
worker_connections 1024;
}
rtmp { #RTMP服務
server {
listen 1935; #//服務端口
chunk_size 4096; #//數據傳輸塊的大小

application live { #//第一直播流
live on;
record off;
}

application live2 { #//第二直播流
live on;
record off;
}

# video on demand
application vod {
play /var/flvs; #//影片存放位置
}

application vod_http {
play http://192.168.43.78/vod;
}

application hls {
live on;
hls on;
hls_path /tmp/hls;
}
}
}

# HTTP can be used for accessing RTMP stats
http {

server {

listen 8080;

# This URL provides RTMP statistics in XML
location /stat {
rtmp_stat all;

# Use this stylesheet to view XML as web page
# in browser
rtmp_stat_stylesheet stat.xsl;
}

location /stat.xsl {
# XML stylesheet to view RTMP stats.
# Copy stat.xsl wherever you want
# and put the full directory path here
root /path/to/stat.xsl/;
}

location /hls {
# Serve HLS fragments
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /tmp;
add_header Cache-Control no-cache;
}

location /dash {
# Serve DASH fragments
root /tmp;
add_header Cache-Control no-cache;
}
}
}

已經可以推琉到ubuntu裡面了

大大可以告訴我,我要用VLC如何寫

http://192.168.43.78:8080.......m3u8

附件:


docx 16.docx 大小: 476.88 KB; 下載次數: 15

8/1 22:53:09
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.