조회 수 1975 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부

RTMP 1936 HLS 8080

NginX RTMP 에서 아래와 같이 설정하여야한다.

 

nginx.conf

 

 

#user  nobody;
worker_processes  1;

error_log  logs/rtmp_error.log debug;
pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    allow all;
    deny all;

    access_log         logs/rtmp_access.log;
    include           mime.types;
    default_type      application/octet-stream;
    sendfile            on;
    keepalive_timeout      65;
        
    server {
        listen        8080;
        server_name    one2.kr;

    location /rtmp {
    alias F:/mp4;
    #autoindex on;
        }


        # rtmp stat
        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }
        
        location /stat.xsl {
            # you can move stat.xsl to a different location
            root html;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

 

    # Client (VLC etc.) can access HLS here.
             location /hls {
                # Serve HLS fragments
                types {
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
                }
            root F:/tmp;
               add_header Cache-Control no-cache;
             }

 

    }

 

}

 

 

 

rtmp {
    server {
        listen 1936;
        chunk_size 8192;

        application live1 {
            live on;
        exec F:\ffmpeg_x64\bin\ffmpeg -i rtmp://one2.kr:1936/hls/nav -strict -2 -b:a 32k  -c:v libx264 -b:v 128K -f flv rtmp://one2.kr:1936/hls/nav;

        }

        application vod {
        play F:/mp4;
        }

# You should send x.264/aac RTMP Stream via ffmpeg to this application
        application hls {
            allow play all;
            live on;
                 hls on;
                   hls_path F:/tmp/hls;
             }

 

    }

 

}

 

윈도우용  FFMpeg가 필요하고 경로 맞게 빨간색 형식으로 지정해준다.

 

F:\tmp폴더를 만들어둔다.

 

rtmp소스를 m3u8 hLS를 위해 트랜스코딩을 해준다.

============================================================================

OBS 설정

사용자지정 주소로 하고

obs1.png

 

와 같이 해준다.

 

 

아래 jwplayer에서는 PC서는 rtmp로 재생. 모바일에서는 Flash재생이안되므로 HTML5재생을 위하여  http로 hls 로재생을 하게된다.

 

소스는 아래와 같이 해준다. 위 nginx rtmp스트리밍주소대로 

<script src="/jwplayer/jwplayer.js"></script>

<div id="mediaplayer2"> </div>
<script>
jwplayer('mediaplayer2').setup({
width: "100%",
androidhls:true,
aspectratio: "16:9",
primary: "flash",
sources:[
{ file: "rtmp://one2.kr:1936/hls/nav" },
{ file: "http://one2.kr:8080/hls/nav.m3u8"}
]
 });
 

 

정리를 하자면 이와같다.

 

1. FFMpeg 구비 하여 Nginx로 포팅 (FFMpeg 트랜스위한 임시폴더 생성마련.)

2. NginX RTMP로 웹및 rtmp서버구동

3. OBS에서 NginX서버로 방송송출

4. 유저는 웹, 모바일로 시청

 

rtmp는 5초정도 딜레이. hls는 트랜스코딩때문인지 20~30초 정도 딜레이

 

?

  1. dddd

    Date2014.10.14 By행복아이 Views248
    Read More
  2. ee

    https://youtu.be/3e5cyno4lJA
    Date2019.12.16 By행복아이 Views1025
    Read More
  3. ehplayer JW6

    Date2014.09.04 By행복아이 Views157
    Read More
  4. flow http HTML5

    <link href="/flowplayer/skin/minimalist.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .flowplayer { width: 720px; height:406px } </style> <script src="/flowplayer/jquery.min.js" type="text/javascript"></script> <script src...
    Date2014.09.05 By행복아이 Views286
    Read More
  5. flow rtmp ums 0.3.0 서버

    $f("player", "/flowplayer2/flowplayer-3.2.18.swf", { clip: { url: 'rtmp://155.230.54.42:5119/mp4/nut720.mp4', autoplay: false, provider: 'rtmp' }, plugins: { rtmp: { url: "/flowplayer2/flowplayer.rtmp-3.2.13.swf", } } });
    Date2014.09.06 By행복아이 Views389
    Read More
  6. flowplayer 6.0.3 html5

    6.0.3 이 최근입니다. 다운로드 하여 서버단에 넣고 다음과같이 줍니다. <!-- ~~>부분은 주석입니다. <!--스킨부분--> <link rel="stylesheet" href="/flowplayer/skin/functional.css" /> <!--j쿼리부분--> <script src="/flowplayer/jquery-1.11.2.min.js"><...
    Date2015.10.12 By행복아이 Views6233
    Read More
  7. flowplayer+ums RTMP 서브폴더

    $f("player", "/flowplayer2/flowplayer-3.2.18.swf", { clip: { url: 'rtmp://155.230.54.40:5119/vod/mov/2014/20140808GC/20140808GC_FunTime_Full.mp4', autoplay: false, provider: 'rtmp' }, plugins: { rtmp: { url: "/flowplayer2/flowplayer.rtmp-3....
    Date2014.09.04 By행복아이 Views678
    Read More
  8. HLS테스트

    모바일만, 즉 http만 있으므로 PC에서는 아마 안보일것. jwplayer("my-video").setup({ file: "http://one2.kr/hlsmp4/TEST2.m3u8"", width: "100%", androidhls:true, aspectratio: "16:9", primary: "flash" } ); 모바일(http) + PC rtmp (flash)가 둘다 잇...
    Date2015.01.15 By행복아이 Views280
    Read More
  9. HTML5 Flash RTMP에 대한 생각

    HTML5 Video 태그는 아주 단순하다.javascript를 사용할 필요가 전혀없다. 모바일도 대부분 지원한다. 단점은 IE 9 이상의 브라우저에서 사용가능하다. 이하에서는 영상이 보이질 않는다. 어쩔수없이 IE8등에서 접근시에는 flash로 재생되도록 fullback 옵션 ...
    Date2014.09.12 By행복아이 Views310
    Read More
  10. jw html5

    ㅇㅇ <script src="http://static.videoninja101.com/jwplayer/jwplayer.js"></script> <div id="mediaplayer"></div> <script type="text/javascript"> jwplayer("mediaplayer").setup({ id: 'player1', width: '512', height: '288', autostart: false, ski...
    Date2014.09.04 By행복아이 Views187
    Read More
  11. jw HTML5 flash 테스트

    <script src="http://static.videoninja101.com/jwplayer/jwplayer.js"></script> <div id="mediaplayer"></div> <script type="text/javascript"> jwplayer("mediaplayer").setup({ id: 'player1', width: '320', height: '240', autostart: false, skin: "ht...
    Date2014.09.04 By행복아이 Views359
    Read More
  12. JW+Unreal media server 서버폴더

    44 test jwplayer("mediaspace2").setup({ flashplayer: "/jwplayer/jwplayer.flash.swf", file: "rtmp://daegunavigators.or.kr:5119/vod/mov/2014/20140808GC/20140808GC_FunTime_Full.mp4", height: 406, width: 720 });
    Date2014.09.04 By행복아이 Views169
    Read More
  13. jw6 rtmp 테스트

    모바일에서 HTML5로 재생은 될려고 하나 여전히, 다운로딩 방식이 되고 있다.. jw6이 RTMP를 HTML5로도 재생 잘 해주면 좋은데 모바일에선 브라우저에서 rtmp가 먹히질 않는다. 희안한지고,, unreal player는 먹히는데 전체화면시 녹색이 생기는 이런 장단이 ...
    Date2014.09.05 By행복아이 Views233
    Read More
  14. jwplayer 6

    <script src="/JWPLAYER/jwplayer.js"></script> <div id="mediaspace2">test</div> <script> jwplayer("mediaspace2").setup({ flashplayer: "/jwplayer/jwplayer.flash.swf", file: "rtmp://주소/mp4파일.mp4", height: 406, width: 720 }); </script> r...
    Date2014.08.28 By행복아이 Views251
    Read More
  15. JWPlayer6 RTMP FLASH HTML5

    PC에서는 FLASH, 모바일에서는 HTML5로 재생되는 JWplayer6 아래와 같이 file 부분에 두가지를 주면 되는것 같다. 원 소스는 rtmp만 있었는데 우선적으로 jw는 primary값과 같이 flash로 동작하며 ,모바일에서 보여지기 위해서 HTML로 동작은 jw가 알아서 하기...
    Date2014.09.04 By행복아이 Views472
    Read More
  16. jwplayer6 캡션 설정

    트랙옵션을 준다. 자막의 경로는 정확히 주어야한다. http://서버주소/자막파일.srt 이런식으로주던가 상대경로로 주던가.. tracks: [{ file: "/subtitle/nut.srt", label: "korean", kind: "captions", "default": true }] 자막을 여러개 넣을 경우 tracks: [...
    Date2014.09.04 By행복아이 Views210
    Read More
  17. Media Element.js

    $('audio,video').mediaelementplayer({ success: function(player, node) { $('#' + node.id + '-mode').html('mode: ' + player.pluginType); } });
    Date2014.09.11 By행복아이 Views263
    Read More
  18. mp4 1080 flowplayer

    flowplayer 1080p영상 $f("player", "/flowplayer2/flowplayer-3.2.18.swf", { clip: { url: 'rtmp://one2.kr/vod/bnb1080.mp4', provider: 'rtmp' }, plugins: { rtmp: { url: "/flowplayer2/flowplayer.rtmp-3.2.13.swf" } } });
    Date2014.08.26 By행복아이 Views462
    Read More
  19. mp4 rtmp umplayer 1

    umplayer 1080p 영상. embedPlayer('player-container', { flashvars : { 'rtmp' : 'rtmp://one2.kr/vod/bnb1080.mp4' }, size : { width: 720, height: 406 }, playerStyle : 'quick' });
    Date2014.08.26 By행복아이 Views212
    Read More
  20. OBS RTMP 웹 HLS모바일 생방송 테스트

    RTMP 1936 HLS 8080 NginX RTMP 에서 아래와 같이 설정하여야한다. nginx.conf #user nobody; worker_processes 1; error_log logs/rtmp_error.log debug; pid logs/nginx.pid; events { worker_connections 1024; } http { allow all; deny all; access_log l...
    Date2015.07.30 By행복아이 Views1975
    Read More
Board Pagination Prev 1 2 Next
/ 2