Admin관리자   |    Posting포스트   |    LogOut로그아웃
:+:하늘을닮은호수:+: | Trac | 블로그   |    위치로그   |    태그로그   |    방명록


하늘을 닮은 호수
http://sunsson.iptime.org
Category
전체 (966)
[Standard] (59)
[OS] (119)
[Develope] (77)
[IT Trend] (347)
[Music] (101)
[삶의 질] (262)
Tag List
trac   3GPP   IPTV   svn   2MB   RTP   VoIP   c99   PSS   mysql   memory_leak   H.263   awk   팔봉산   손예진   FLV   ffmpeg   grep   cdn   avc   AutoConf   egrep   SVC   노무현   SIP   textcube   fgrep   trac_authentication   추억   포지션  
FLV File Format
Category : [Standard]/etc
Date : 2007/11/07 18:05

FLV File Format

A Flash Video file (.FLV) consists of a short header, and then interleaved audio, video, and metadata packets. The audio and video packets are stored very similarly to those in SWF, and the metadata packets consist of AMF data.

FLV Header

Field Data Type Example Description
Signature byte[3] “FLV” Always “FLV”
Version uint8 “\x01” (1) Currently 1 for known FLV files
Flags uint8 bitmask “\x05” (5, audio+video) Bitmask: 4 is audio, 1 is video
Offset uint32_be “\x00\x00\x00\x09” (9) Total size of header (always 9 for known FLV files)

FLV Stream

Field Data Type Example Description
PreviousTagSize uint32_be “\x00\x00\x00\x00” (0) Always 0

Then a sequence of tags followed by their size until EOF.

FLV Tag

Field Data Type Example Description
Type uint8 “\x12” (0×12, META) Determines the layout of Body, see below for tag types
BodyLength uint24_be “\x00\x00\xe0” (224) Size of Body (total tag size - 11)
Timestamp uint24_be “\x00\x00\x00” (0) Timestamp of tag (in milliseconds)
TimestampExtended uint8 “\x00” (0) Timestamp extension to form a uint32_be. This field has the upper 8 bits.
StreamId uint24_be “\x00\x00\x00” (0) Always 0
Body byte[BodyLength] ... Dependent on the value of Type

Previous tag size

Field Data Type Example Description
PreviousTagSize uint32_be “\x00\x00\x00\x00” (0) Total size of previous tag, or 0 for first tag

FLV Tag Types

Tag code Name Description
0×08 AUDIO Contains an audio packet similar to a SWF SoundStreamBlock plus codec information
0×09 VIDEO Contains a video packet similar to a SWF VideoFrame plus codec information
0×12 META Contains two AMF packets, the name of the event and the data to go with it

FLV Tag 0x08: AUDIO

The first byte of an audio packet contains bitflags that describe the codec used, with the following layout:

Name Expression Description
soundType (byte & 0×01) » 0 0: mono, 1: stereo
soundSize (byte & 0×02) » 1 0: 8-bit, 1: 16-bit
soundRate (byte & 0x0C) » 2 0: 5.5 kHz, 1: 11 kHz, 2: 22 kHz, 3: 44 kHz
soundFormat (byte & 0xf0) » 4 0: Uncompressed, 1: ADPCM, 2: MP3, 5: Nellymoser 8kHz mono, 6: Nellymoser

The rest of the audio packet is simply the relevant data for that format, as per a SWF SoundStreamBlock.

FLV Tag 0x09: VIDEO

The first byte of a video packet describes contains bitflags that describe the codec used, and the type of frame

Name Expression Description
codecID (byte & 0x0f) » 0 2: Sorensen H.263, 3: Screen video, 4: On2 VP6, 5: On2 VP6 Alpha, 6: ScreenVideo 2
frameType (byte & 0xf0) » 4 1: keyframe, 2: inter frame, 3: disposable inter frame

In some cases it is also useful to decode some of the body of the video packet, such as to acquire its resolution (if the initial onMetaData META tag is missing, for example).

TODO: Describe the techniques for acquiring this information. Until then, you can consult the flashticle sources.

FLV Tag 0x12: META

The contents of a meta packet are two AMF packets. The first is almost always a short uint16_be length-prefixed UTF-8 string (AMF type 0×02), and the second is typically a mixed array (AMF type 0×08). However, the second chunk typically contains a variety of types, so a full AMF parser should be used.

HTTP Streaming

It is possible to semi-stream flv over http using a trick which sends the normal headers then skips forward to a desired point in the file and moves the timestamps forward accordingly.

The FLV Metadata injector is a free closed-source tool which can inject this information into a FLV file. A sample php script and fla is available at FlashComGuru

Another tool that you can use to stream flv files using http is using Flv4PHP this tool is both a FLV Metadata injector and a stream tool, using php 4.x. this Project is GPL.

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)
2007/11/07 18:05 2007/11/07 18:05
Top

블로그코리아에 블UP하기
Digital TV의 양대 규격 ATSC & DVB
Category : [Standard]/etc
Date : 2007/11/07 13:54
DVB vs ATSC
같은 HDTV혹은 SDTV의 신호를 송출(Encoding & Decoding) 하는 방식에서 표준을 세운다는 것은 기술적으로나 상업적으로나 매우 중요한 일이다. 그래서 이미 미국의 유명 가전메이커 들이 주축이 된 표준과 유럽선진 각국을 중심으로 한 표준으로 크게 양분되어 있는데 , 미국의 표준방식인 ATSC (Advanced Television Systems Committee) 와 유럽의 DVB(Digital Video Broadcasting)방식이 그것이다.
Brief History
1960년대 초기 유럽과 일본이 추진한 Analog방식의 HDTV는 디지털의 장점에는 못미칠뿐 아니라 NTSC 나 PAL 방식의 Analog컬러TV과 비교해 비싼 가격 때문에 당시로서는 새로운 변화인 화면 비율(16:9)이나 화질임에도 불구하고 주류로써 선도하는 표준이 되기는 힘들었다. 미국으로써는 유럽과 일본이 연합으로 개발하는 차세대 고선명TV의 개발에서 선점권을 놓친 상황이었으므로 , 그들만의 새로운 표준을 제정하기 위해 유수의 기업과 대학을 위시해 1996년 ATSC방식을 표준으로 제정하기에 이른다.
이 때 주개발세력으로 참여한 업체는 AT&T, General Instrument Corporation, Massachusetts Institute of Technology, Philips Consumer Electronics, David Sarnoff Research Center, Thomson Consumer Electronics and Zenith Electronics Corporation으로 현재에도 디지털TV의 핵심기술을 선도하고 있다.
ATSC는 북미지역의 지형특성상 광활한 대지가 많아 지상파위주의 서비스와 품질위주에 초점을 두고 개발된 것이 특징이다.
반면 유럽쪽에서는 1991년부터 가전메이커, 망사업자 , 컨텐트 사업자 등 다양한 분야의 사업자들이 협력하여 DVB표준을 제정하게 되었는데, ATSC보다 많은 멤버들로 구성된 DVB로써는 DVB-S , DVB-T 특성상 산악지형이 많아 위성서비스에 초점을두고 개발되어 왔다.
Brief 규격(방식)비교
- ATSC characteristics
북미 표준, 기존의 NTSC방식과 공존이 가능하다는 특징,
Mpeg-2 Video, 돌비AC-3 Audio 규격사용
지상방송용8VSB , 유선방송용 16VSB변조방식 채용
주로 지상파, 유선방송용 표준으로 자리매김
http://www.atsc.org

- DVB
유럽 표준, PAL등 기존의 방식보다는 DTV 고유의 부가기능에 촛점
다양한 포맷의 Modultation 및 Encoding 지원.
Mpeg-2 Video/Audio 규격사용
COFDM , QPSK , QAM 등의 변조방식사용
주로 디지털 위성방송의 표준으로 자리매김.
http://www.dvb.org
구분
비디오
오디오
신호수신율
주파수대역
주파수
고스트현상
단일주파수 방송망
하드웨어복잡도
채널수
VSB
MPEG-2
Dolby AC-3
비교적 높음
기존 TV대역
6Mhz
영향을 많이 받음
어려움
높음
4 채널
CDFDM
MPEG-2
MPEG-2
높지만 복잡한 구조
기존 TV대역
8.7Mhz
비교적 높음
용이
높음
4 채널
From Now on
ATSC와 DVB 모두 각기 장/단점이 있다.
DVB의 경우 다채널화에 초점을 맞춰가는 경향이 있어, Digital TV 고유의 특성인 고화질, 고음질화된 HDTV에 대해 상대적으로 미비한 지원이 지적되었고,ATSC의 경우 8VSB 방식이 DVB의 COFDM 방식에 비해 다양한 경로로 전달되는 전파를 수신할 경우 문제점이 많다는 점이 지적되었었다.

ATSC를 선택할 것인가 DVB를 선택할 것인가 하는 문제는, 각 나라마다의 특성에 따라 많은 변수가 있기 마련이다. 가령 , 넓은 평야가 위주인 국가에서는 아무래도 지상파에 초점을 맞춘 방식이 유리한 면을 보일것이고, 복잡한 지형과 높은 산악지대가 많은 국가에서는 위성을 이용한 방식이 유리할 것이다. 물론, 지형을 가지고 모든 것을 결정할 수는 없다.
과거로부터 사용해온 방식과의 공존여부와 국민의 성향을 , 현단계의 방송시스템의 현실을 명확히 파악 하는데에서부터 결정해 나아가야 할 것이다.
뿐만아니라 ATSC 와 DVB는 서로 경쟁하면서 각기 보완해 나가고 있으며 제 2세대로 보완되어져 가면서, 단점의 수정과 안정화에 노력하고 있다.

한국의 경우 결정은 ATSC로 되어 있다. 이제는, ATSC가 어떠한 한계를 가지고 있든간에 방식의 한계를 극복할 수 있는 시청자 위주의 서비스 수단으로 발전시켜 나가야 할 것이다.
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

"[Standard] / etc" 분류의 다른 글

FLV File Format2007/11/07
Media Server/Service를 위한 Curriculum2007/10/26
2007/11/07 13:54 2007/11/07 13:54
Top

블로그코리아에 블UP하기
Media Server/Service를 위한 Curriculum
Category : [Standard]/etc
Date : 2007/10/26 14:57

* 전송 *

  • 3GPP(www.3gpp.org) http://www.3gpp.org/specs/numbering.htm
    1. 22233-630 :
      Transparent End-to-End Packet-switched Streaming Service; Stage
    2. 26233-600 :
      End-to-End transparent streaming service;
      General Description
    3. 26234-450 :
      Transparent End-to-End Packet-switched Streaming Service(PSS);
      Protocols and codecs
    4. 26244-630 :
      Transparent End-to-End Packet-switched Streaming Service(PSS);
      3GPP File Format(3GP)
    5. 26245-610 :
      Transparent End-to-End Packet-switched Streaming Service(PSS);
      Timed text format
    6. 26246-600 :
      Transparent End-to-End Packet-switched Streaming Service(PSS);
      3GPP SMIL language profile

[참고]3GPP의 스펙은 *****-xyz의 형식으로 되어 있다. *****은 주제(subject)에 따른 스펙의 버젼(시리즈넘버. 앞의 두자릿 수)을 나타내고, x는 information, approval등의 큰 변경이 있을 때, y는 내용의 증가 및 수정등의 업데이트가 있을 때, 그리고 z는 문서 안에서 편집이 이루어졌을 때 변경 되는 정보이다.


* 파일 포맷(미디어 파일) *

    1. Reference MediaFileFormat -- Media File's various Formats
    2. ISO/IEC 14496-12 ISO base media file format
      14496-14 MP4 file format
      14496-15 AVC file format
    3. Windows ASF file format
    4. WMV file format
    5. QuickTime? QTFF(QuickTime? File Format) - 14496-12 표준의 기초가 됨
    6. etc AVI file format
      ...


* Codec (Optional) *

H.263
H.264
MPEG4(Audio/Visual)
AMR/EVRC
...


* YUV & RGB *

더 자세한 내용은 제 개인 Study Trac (http://sunsson.iptime.org/projects/juliet/wiki/curriculum)를 통해 확인할 수 있습니다.

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

"[Standard] / etc" 분류의 다른 글

FLV File Format2007/11/07
Digital TV의 양대 규격 ATSC & DVB2007/11/07
2007/10/26 14:57 2007/10/26 14:57
Top

블로그코리아에 블UP하기
Creative Commons License
블로그 내에 모든 저작물은 크리에이티브 커먼즈코리아 저작자표시 - 비영리 - 변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
최근 덧글
펼치기
최근 트랙백
펼치기
Today :
15
Yesterday :
108
Total :
78805
Powered by :
Textcube
ver :
1.7.5 : Risoluto
skin by :