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/1b5/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
267 time.bora.net 시간 동기화후 dovecot 데몬이 죽는 현상 해결 ADMINPLAY 2009-04-27 23894
266 [Linux] too many files 에러가 날때 ADMINPLAY 2009-09-20 23833
265 DRBD(Distributed Replicated Block Device) 에 대해서 ADMINPLAY 2012-01-16 23737
264 [Linux]RedHat Enterprise Linux 5 계열 VNC Server 설정 ADMINPLAY 2009-09-25 23712
263 리눅스에서 실수로 삭제한 파일을 복구 ADMIN 2008-12-10 23594
262 kernel: nf_conntrack: table full, dropping packet. ADMINPLAY 2009-11-26 23587
261 리눅스 로그파일 관리 [로그파일 삭제하는 방법] ADMINPLAY 2009-07-31 23532
260 리눅스 쓸데없는 파일,로그파일 주기적으로 삭제하기 ADMINPLAY 2009-07-02 23524
259 libphp4.so: cannot restore segment prot after reloc: P... ADMINPLAY 2011-02-07 23518
258 리눅스에서 베드섹터 검사명령어 ADMINPLAY 2009-08-18 23513
257 포트 포워딩 도구 ipmasqadm file ADMINPLAY 2009-09-08 23496
256 vi 이용한 파일내용 일괄변경 ADMINPLAY 2010-08-10 23491
255 eAccelerator설치와 PHP 성능 향상 분석 ADMINPLAY 2011-06-22 23472
254 서버 점검 : 자원 및 apache, mysql ADMIN 2008-12-10 23466
253 LVS 기능 및 장점과 설치프로그램 및 적용사이트 ADMINPLAY 2009-11-04 23389
252 Linux 파일 오픈 갯수 확인 ADMINPLAY 2009-05-10 23386
251 X-window 설치 ADMINPLAY 2010-03-24 23361
250 single mode readonly 파티션 rw로 다시 마운트 ADMINPLAY 2008-12-10 23302
249 인터넷 속도 단위 (bps, cps) ADMINPLAY 2009-08-03 23301
248 FreeBSD SSH 접속 안되요 ADMINPLAY 2009-07-14 23279

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234