Chinaunix首页 | 论坛 | 博客
  • 博客访问: 440317
  • 博文数量: 127
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 810
  • 用 户 组: 普通用户
  • 注册时间: 2013-07-02 20:51
文章分类

全部博文(127)

文章存档

2018年(6)

2015年(18)

2014年(33)

2013年(70)

分类: 网络与安全

2013-07-26 17:28:25

VOB file (Video Object) is a container format in DVD-Video media. VOB can contain video, audio, subtitle, menu and navigation contents multiplexed together into a stream form. VOB is based on the MPEG program stream format, but with additional limitations and specifications in the private streams. The MPEG program stream has provisions for non-standard data (as used in VOB files) in the form of so-called private streams. VOB files are a very strict subset of the MPEG program stream standard. While all VOB files are MPEG program streams, not all MPEG program streams comply with the definition for a VOB file.


Analogous to the MPEG program stream, VOB file can contain H.262/MPEG-2 Part 2 or MPEG-1 Part 2 video, MPEG-1 Audio Layer IIor MPEG-2 Audio Layer II audio, but usage of these compression formats in a VOB file has some restrictions in comparison to the MPEG program stream. In addition, VOB can contain Linear PCM, AC-3 or DTS audio and subpictures (subtitles). VOB file cannot contain AAC audio (MPEG-2 Part 7), MPEG-4 compression formats and others, which are allowed in MPEG program stream standard.

On the DVD, all the content for one title set (VTS) is contiguous, but broken up into 1 GiB VOB files in the computer compatible file systems for the convenience of the various operating systems. Each VOB file must be less than or equal to one GiB .

 


DVD - MPeg differences

DVD uses a subset of MPeg standards ISO/IEC 11172 (MPeg-1) and ISO/IEC 13818 (MPeg-2).

Restrictions

Streams - 1 video, up to 8 audio

Coding - MPeg-1 vbr/cbr, MPeg-2 MP@ML or SP@ML vbr/cbr

Data rate

MPeg-1 maximum video 1856Kbps, maximum audio 384Kbps

Mpeg-2 maximum video 9800Kbps, maximum audio 912Kbps

note: audio options other than MPeg exist, see extensions

Image size

Mpeg-1 352x240 (NTSC) or 352x288 (PAL/SECAM)

Mpeg-2 720x480, 704x480, 352x480 (NTSC) 

720x576, 704x576, 352x576 (PAL/SECAM)

Frame rate

coded - 24fps progressive, 29.97fps interlaced (NTSC only), 25fps interlaced (PAL/SECAM only)

displayed - 29.97 (NTSC) and 25fps (PAL/SECAM)

Color space

color primaries and transfer characteristics 

NTSC - 4 (ITU-R BT.470 M) or 6 (SMPTE 170 M) 

PAL - 5 (ITU-R BT.470 B or G)

matrix coefficients (RGB to YCbCr) 

5 (ITU-R BT.470 B or G) or 6 (SMPTE 170 M)

Audio sampling rate - 48KHz (MPeg audio only, other audio formats have their own rates)

Aspect ratio - either 4:3 or 16:9

GOP max

MPeg-1 18 frames (NTSC), 15 frames (PAL/SECAM)

MPeg-2 36 fields (NTSC), 30 fields (PAL/SECAM)

note: typical rate is .5 seconds, with one GOP per VOBU 

note: GOP's are NOT optional

pack size - fixed at 2048 bytes, system stream level (one DVD sector)

Low delay - not permitted

Extensions

Private stream 1 (Audio and subpictures)

sub-stream 0x20 to 0x3f are subpictures

sub-stream 0x80 to 0x87 are audio (AC3, DTS, SDDS)

sub-stream 0xA0 to 0xA7 are LPCM audio

Private stream 2 (Navigation) - see PCI packet and DSI packet


 

Audio pack for LPCM
This pack is placed inside an MPEG private_stream_1. ( stream_id of 0xBD )

Byte offset

Field

Number of bits

Value

Description

0

sub_stream_id

8

1010 0***b

*** = Audio stream number

1

number_of_frame_headers

8

0xnnnn

Number of audio frames whose first byte is in this pack

2

first_access_unit_pointer

16

0xnnnn

Pointer to the first byte of the first frame that the PES PTS applies to.

4

audio_emphasis_flag

1

0 = off, 1 = on

 

 

audio_mute_flag

1

0 = off, 1 = on

 

 

reserved

1

 

 

 

audio_frame_number

5

 

Frame number within Group of Audio frames.

5

quantisation_word_length

2

0 = 16, 1 = 20, 2 = 24, 3 = reserved

Bits per sample

 

audio_sample_frequency

2

0 = 48, 1 = 96, other = reserved

Sampling frequency in kHz.

 

reserved

1

 

 

 

number_of_audio_channels

3

X + 1

0 = 1ch, 1 = 2ch etc.

6

dynamic_range X

3

X

High 3 bits of byte.

 

dynamic_range Y

5

Y

Lower 5 bits of byte

 

 

 

 

linear gain = 2^(4-(X+(Y/30)))

 

 

 

 

in dB gain = 24.082 - 6.0206 X - 0.2007 Y

 


Audio Substream Headers

All substreams in private stream 1 begin with the substream number. The header described here immediately follows the substream number. This header is not part of either MPEG or the respective audio format standard. These are unique to DVD.

All methods

byte 0

byte 1

byte 2

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

FrmCnt
number of frames which begin in this packet

FirstAccUnit
offset to frame which corresponds to PTS value 
offset 0 is the last byte of FirstAccUnit, ie add the offset of byte 2 to get the AU's offset 
The value 0000 indicates there is no first access unit

                                               
AC3 specific

AC3 has no additional information which is DVD specific.

example

offset

value

meaning

01f

80h

AC3 substream number (audio stream 0)

020

02

this packet contains the beginning of 2 audio frames

021

0001

the frame corresponding to PTS begins at packet offset 023

023

0B77

AC3 frame begins here (0B77 = AC3 sync word)

 Additional info

AC3 frames are 32ms in length, or 2880 ticks of the 90KHz clock. The resulting frame rate is 31.25 fps.

Description of 

DTS specific

DTS has no additional information which is DVD specific.

example

offset

value

meaning

01f

88h

DTS substream number (audio stream 0)

020

01

this packet contains the beginning of 1 audio frame

021

0001

the frame corresponding to PTS begins at packet offset 023

023

7FFE8001

DTS frame begins here (7FFE8001 = DTS sync word)


Additional info

DTS frames are 10.67ms in length, or 960 ticks of the 90KHz clock. This is exactly one third the duration of an AC3 frame.

DTS frames are engineered to fit almost exactly into DVD sectors, therefore they do not span packets. Instead the PES header is padded by 3 or 4 bytes (following PTS). 

Brief description of 

LPCM specific

byte 3

byte 4

byte 5

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

emphasis

mute

reserved

FrmNum
modulo 20 frame number of first frame

Quantization
0 = 16bps, 1 = 20bps, 2 = 24bps, 3 = illegal

Sample rate
0 = 48Ksps
1 = 96Ksps

reserved

channels-1

DynamicRange

                                               

 example

offset

value

meaning

01f

A0h

LPCM substream number (audio stream 0)

020

07

this packet contains the beginning of 7 audio frames

021

0004

the frame corresponding to PTS begins at packet offset 026

023

00

emphasis off, mute off, frame 0

024

01

16-bit, 48K sample rate, stereo

025

80h

dynamic range 128 (neutral)

026

0000

first channel 0 (left) sample

 Additional info

LPCM frames are 150 ticks of the 90KHz clock long (1.67ms), giving a frame rate of 600 fps
Frame size in bytes = (sample rate)*(quantization)*(number of channels)/4800. 
At 48K sample rate there are 48000/600 = 80 samples per frame. For 16-bit stereo this equals 320 bytes per frame. 
see also 

 



References:

1. 

2. 

3. 

4. 

5. 

 

External Links:

 

阅读(1648) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~