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/d1e/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
367 도메인 Status 상태별 설명 안내 ADMINPLAY 2012-12-28 4832
366 dpkg 사용법 ADMINPLAY 2013-04-03 4930
365 HDD Guardian (a graphical user interface for smartctl) ADMINPLAY 2013-09-22 4951
364 ubuntu 10.04 에서 Nginx, Mysql, PHP5 ADMINPLAY 2013-02-28 5124
363 HP 서버 disk 증설 (hpacucli 사용) ADMINPLAY 2015-08-05 5126
362 top 화면 내용중 load average와 PRI : priority(우선순위... ADMINPLAY 2013-12-24 5138
361 리눅스 메모리 관리, 왜 메모리 여유공간이 없을까? (top ... ADMINPLAY 2013-04-25 5241
360 make 정리 ADMINPLAY 2013-05-12 5264
359 ZFS 파일에 ACL 설정 ADMINPLAY 2014-02-03 5271
358 windows smartctl ADMINPLAY 2013-09-22 5273
357 EXT4 파일 시스템을 Btrfs 파일 시스템으로 변환하기 ADMINPLAY 2015-07-07 5339
356 SSL 패스워드 삭제 하기 ADMINPLAY 2014-04-27 5347
355 tar 압축을 실수로 디렉토리 생성 안하고 풀었을때 대처법 ADMINPLAY 2013-09-22 5386
354 ll 명령시 날짜 전체가 보이도록 하기 ADMINPLAY 2014-01-02 5431
353 hddtemp와 mrtg를 이용한 하드디스크 온도 체크 file ADMINPLAY 2013-12-19 5450
352 python과 mysql 연동시 libmysqlclient_r.so.* 에러가 날 ... ADMINPLAY 2014-03-27 5519
351 error: Hm, kex protocol error: type 30 seq 1 [preauth]... file ADMINPLAY 2016-05-20 5535
350 linux 커널 파라메터 수정 ADMINPLAY 2013-05-12 5554
349 우분투(Ubuntu) ssh 설정하기 ADMINPLAY 2013-02-27 5597
348 운영중인 Linux 서버에서 NTFS 파일 시스템 삭제하기 ADMINPLAY 2013-01-16 5673

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234