조회 수 1978 추천 수 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. 유튜브 영상 삽입방법

    오브젝트 가로 폭 반응형 형태 <style type="text/css"> .video-container { margin: 0;padding-bottom: 75%; max-width: 100%; height: 0; position: relative;overflow: hidden;} .video-container iframe, .video-container object, .video-container embed...
    Date2016.02.05 By행복아이 Views8240
    Read More
  2. 유튜브 라이브 테스트

    모니터를 보냄 jw로 jwplayer('mediaplayer').setup({ file: 'http://youtu.be/YfnTz987ZHg', width: "100%", height: 406 });
    Date2014.10.15 By행복아이 Views1801
    Read More
  3. 윈도우7 wimboot 테스트

    jwplayer RTMP HTTP jwplayer("mediaplayer2").setup({ primary: "flash", width: "100%", height: 406, playlist: [{ sources: [ { file: "rtmp://one2.kr/mp4/mp4:lec/win7wimboot.mp4" }, { file: "http://one2.kr/mp4/lec/win7wimboot.mp4" } ] }] });
    Date2015.08.27 By행복아이 Views8158
    Read More
  4. 스마트폰 녹화 mp4테스트

    jwplayer("mediaplayer2").setup({ primary: "flash", width: 720, height: 406, playlist: [{ sources: [ { file: "rtmp://one2.kr/mp4/mp4:smart/SCR_20150115_151558.mp4" }, { file: "http://one2.kr/mp4/smart/SCR_20150115_151558.mp4" } ] }] });
    Date2015.01.15 By행복아이 Views270
    Read More
  5. 모나서버

    ㅇㅇㅇ jwplayer RTMP HTTP jwplayer("mediaplayer2").setup({ primary: "flash", width: 720, height: 406, playlist: [{ sources: [ { file: "rtmp://one2.kr:48600/mp4:mm/test.mp4" }, { file: "http://one2.kr/mp4/lec/win7wimboot.mp4" } ] }] });
    Date2015.10.27 By행복아이 Views6855
    Read More
  6. videojs HLS 2

    스타일 시트 사용. 역시 모바일에서 보이기. <script src="/videojs/video.js"></script> <script src="/videojs/videojs-media-sources.js"></script> <script src="/videojs/videojs.hls.min.js"></script> <video id="my_video_1" class="video-js vjs-defa...
    Date2015.07.31 By행복아이 Views434
    Read More
  7. videoJS HLS

    <video id=example-video width=600 height=300 class="video-js vjs-default-skin" controls> <source src="http://one2.kr:8080/hls/nav.m3u8" type="application/vnd.apple.mpegurl" /> </video> <script src="/videojs/video.js"></script> <script src="/...
    Date2015.07.31 By행복아이 Views654
    Read More
  8. videojs

    Date2015.10.12 By행복아이 Views6530
    Read More
  9. video-js http streaming 테스트

    요건 오픈 소스랜다. 그리고 브라우저 기반이란다. RTMP 지원하고, 자막지원하고, 모바일에서도 끄떡없다는데. RTMP로 쓸 경우 주소끝에 type='rtmp/mp4' 로 주어야한다. http일경우는 'video/mp4' VideoJS.setupAllWhenReady(); Download Video: MP4
    Date2014.09.04 By행복아이 Views196
    Read More
  10. video-js 3

    nginx RTMP 단독서버로 http 스트리밍 HTML5 +fallback flash (flowplayer, http) VideoJS.setupAllWhenReady();
    Date2014.09.11 By행복아이 Views262
    Read More
  11. umplayer mp4 stream2

    embedPlayer('player-container', { flashvars : { 'rtmp' : 'rtmp://one2.kr/vod/nut720.mp4' }, size : { width: 720, height: 406 }, playerStyle : 'quick' });
    Date2014.08.26 By행복아이 Views156
    Read More
  12. test

    http://one2.kr/live.htmdd
    Date2019.06.18 By행복아이 Views775
    Read More
  13. RTMP 서브폴더 테스트

    nginx rtmp 서브폴더 되나. /vod/sub/nut720.mp4 임. embedPlayer('player-container', { flashvars : { 'rtmp' : 'rtmp://one2.kr/vod/mp4:sub/nut720.mp4' }, size : { width: 720, height: 406 }, playerStyle : 'quick' });
    Date2014.08.26 By행복아이 Views171
    Read More
  14. RTMP HLS2 1935 실시간

    1935포트 jwplayer('mediaplayer2').setup({ width: "100%", androidhls:true, aspectratio: "16:9", primary: "flash", sources:[ { file: "rtmp://one2.kr:1935/hls/nav" }, { file: "http://one2.kr:8080/hls/nav.m3u8"} ] });
    Date2015.07.31 By행복아이 Views264
    Read More
  15. 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행복아이 Views1978
    Read More
  16. 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행복아이 Views213
    Read More
  17. 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행복아이 Views463
    Read More
  18. Media Element.js

    $('audio,video').mediaelementplayer({ success: function(player, node) { $('#' + node.id + '-mode').html('mode: ' + player.pluginType); } });
    Date2014.09.11 By행복아이 Views264
    Read More
  19. jwplayer6 캡션 설정

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

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