Skip to content

HTTP Live Streaming 구축

조회 수 33148 추천 수 0 2012.02.07 16:34:21

HTTP Live Streaming은 Apple에서 만든 Streaming Protocol입니다.

아래 글은 FFMPEG을 사용해서 TS파일을 HTTP Live Streaming을 할 수있는 형식으로 만드는 방법과 Streaming을 하기위한 방법에 대한 글입니다.

 

1. Open Source Segmenter 컴파일

    - Segmenter 는 TS파일을 HTTP Live Streaming에 맞게 파일을 자동으로 만들어주는 프로그램

       입니다.

    - Segmenter를 컴파일 하기 위해서는 FFMPEG 라이버리가 필요합니다.

     

       * FFMPEG을 다운로드 후 공유 라이버리가 생성 되로록 옵션을 설정 후 컴파일 합니다.

          컴파일 방법 : http://blog.naver.com/shlee7708?Redirect=Log&logNo=120120223039

 

      * 첨부 파일(Open Source Segmenter) 다운로드 해서 make 하시면 됩니다.

           전제 조건이 FFMPEG 관련 라이버리들이 정상적으로 설치되 있어야 함

 

      * 컴파일 끝나면 segmenter 실행 파일이 생성 됩니다.

          ./segmenter <input MPEG-TS file> <segment duration in seconds> <output MPEG-TS

             file prefix> <output m3u8 index file> <http prefix>

 

          예] input MPEG-TS file: h264_chan_0.ts  // source file name

               segment duration in seconds: 10초    //  파일 segment될 시간 간격 , 초단위

               output MPEG-TS file prefix : sample_low  // streaming 될 파일명

               output m3u8 index file: stream_low.m3u8          // http url로 접속 할 파일 명

     http prefix : http://172.16.12.6/livehttp           // http url 주소

     

2. 설치

   위 예 기준으로 할 경우 아래와 같이 입력 합니다.

  ./segmenter ~/h264_chan_0.ts 10 sample_low stream_low.m3u8 http://172.16.12.6/livehttp/

 

   실행 하면 현재 디렉토리에 sample_low-xx.ts 여러개의 파일과 stream_low.m3u8이라는 파일이 생성 됩니다. 그러면 생성된 파일들을 "http prefix" 인자로 넘겨준 위치에 전부 복사 합니다.

 

웹서버가 아파치인 경우 /etc/httpd/conf/httpd.conf 파일에 mine 파입 추가

     AddType application/x-mpegURL .m3u8
     AddType video/MP2T .ts

 

3. 실행

  I-Phone 웹브라우져에서 http://172.16.12.6/livehttp/stream_low.m3u8  실행 하면 동영상이 나올 것입니다.

profile

일요일은 짜빠게뤼~ 먹는날~^^

엮인글 :
http://adminplay.com/76996/e42/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
347 Linux Command 로 Mysql table drop 방법 ADMINPLAY 2014-04-07 5701
346 What are the bandwidth requirements for running a BigB... ADMINPLAY 2013-05-06 5920
345 ctime, mtime, atime 다른 점 설명 ADMINPLAY 2014-02-07 5953
344 리눅스에서 GNU Parted로 4K 섹터 디스크 파티션 정렬하기 ADMINPLAY 2016-06-02 6007
343 gcc Library 경로 지정 ADMINPLAY 2014-04-07 6013
342 Installing NGINX, PHP, and MySQL on Ubuntu 10.04 LTS u... ADMINPLAY 2013-04-11 6020
341 Strace - 시스템콜과 신호 추적 file ADMINPLAY 2014-02-25 6046
340 vimrc 설정 file ADMINPLAY 2014-03-01 6088
339 웹서버 트래픽 시각화 logstalgia l2zeo 2013-05-03 6090
338 특정 데몬의 메모리 점유율 확인하기 ADMINPLAY 2013-05-12 6131
337 CentOS 5.6 + NginX 0.8.54 + Django 1.3 (FastCGI) + Pyt... ADMINPLAY 2014-03-28 6169
336 telnet 과 ssh 의 차이점 ADMINPLAY 2014-03-01 6459
335 ModSecurity 로그파일의 사이즈가 너무 큰데 이를 날짜나 ... file ADMINPLAY 2013-12-29 6536
334 웹 언어별 no-cache 리스트 ADMINPLAY 2013-04-22 6641
333 Hamlet 은 “웹서버 모니터링 오픈소스 솔루션” 입니다. ADMINPLAY 2014-07-07 6696
332 우분투 네트웍크 설정 ADMINPLAY 2012-10-30 6728
331 OS X 매버릭스가 NAS, 윈도우 PC 등 SMB 장비에 연결하지 ... ADMINPLAY 2014-03-04 6740
330 Squid 의 캐시 저장 기간 설정 ( refresh_pattern ) ADMINPLAY 2012-05-18 6873
329 vi 이미 읽은 파일의 인코딩 변경하기 ( euc-kr 로 encodi... ADMINPLAY 2014-05-31 6909
328 ZFS 로 SSD 캐쉬 RAID ISCSI 노하드 서버 쉽게 만들자 ADMINPLAY 2016-05-17 6945

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234