RFC 2326の時刻形式

RFC 2326の時刻形式

[1] RFC 2326 (RTSP) は、3つの日付・時刻形式を定義しています。 このうち時刻だけを表現する2つの形式をここで取り上げます。 3つ目の形式は日付と時刻の両方を表現出来ます。 RFC 2326の日付形式を参照して下さい。

smtpe-time

RFC 2326 (RTSP) 3.5 SMPTE Relative Timestamps

A SMPTE relative timestamp expresses time relative to the start of the clip. Relative timestamps are expressed as SMPTE time codes for frame-level access accuracy. The time code has the format hours:minutes:seconds:frames.subframes, with the origin at the start of the clip. The default smpte format is "SMPTE 30 drop" format, with frame rate is 29.97 frames per second. Other SMPTE codes MAY be supported (such as "SMPTE 25") through the use of alternative use of "smpte time". For the "frames" field in the time value can assume the values 0 through 29. The difference between 30 and 29.97 frames per second is handled by dropping the first two frame indices (values 00 and 01) of every minute, except every tenth minute. If the frame value is zero, it may be omitted. Subframes are measured in one-hundredth of a frame.

[2] SMPTE 相対時刻印は clip の開始からの相対時刻を表現します。 相対時刻印は枠位接近正確性の SMPTE 時刻符号として表現します。 時刻符号は :::.小枠 の形式で clip の開始から起算します。既定の smpte 形式は 「SMPTE 30 drop」形式で、枠率は 29.97 枠毎秒です。他の SMPTE 符号 (「SMPTE 25」など) は「smpte time」の代替使用を使って対応しても構いません。 時刻値の「枠」欄は 0 から 29 の値を取ると仮定します。 30 枠毎秒と 29.97 枠毎秒の違いは、 (各十秒を除いた) 各秒の最初の2枠の索引 (値 0001) を落として扱うことです。 枠値が零なら、省略しても構いません。 小枠は1枠の百分の一ではかります。

  • [3] smpte-range = smpte-type "=" smpte-time "-" [ smpte-time ]
  • [4] smpte-type = "smpte" | "smpte-30-drop" | "smpte-25" ; other timecodes may be added 他の時刻符号を追加可能
  • [5] smpte-time = 1*2DIGIT ":" 1*2DIGIT ":" 1*2DIGIT [ ":" 1*2DIGIT ] [ "." 1*2DIGIT ]

Examples: 例:

  • [6] smpte=10:12:33:20-
  • [7] smpte=10:07:33-
  • [8] smpte=10:07:00-10:07:33:05.01
  • [9] smpte-25=10:07:00-10:07:33:05.01

npt-date

RFC 2326 (RTSP) 3.6 Normal Play Time

Normal play time (NPT) indicates the stream absolute position relative to the beginning of the presentation. The timestamp consists of a decimal fraction. The part left of the decimal may be expressed in either seconds or hours, minutes, and seconds. The part right of the decimal point measures fractions of a second.

[10] 通常演奏時刻 (NPT) は、表現のはじめからの流れ絶対位置を示します。 時刻印は小数値で構成します。 小数点の左の部分は秒又は時・分・秒を表します。 小数点の右の部分は秒の小数点以下の値をあらわします。

The beginning of a presentation corresponds to 0.0 seconds. Negative values are not defined. The special constant now is defined as the current instant of a live event. It may be used only for live events.

[11] 表現のはじめが 0.0 秒に相当します。負の値は未定義です。 特別な定数 now (今) は生中継催事の現在の瞬間として定義します。 これは生中継催事にのみ使用しても構いません。

NPT is defined as in DSM-CC: "Intuitively, NPT is the clock the viewer associates with a program. It is often digitally displayed on a VCR. NPT advances normally when in normal play mode (scale = 1), advances at a faster rate when in fast scan forward (high positive scale ratio), decrements when in scan reverse (high negative scale ratio) and is fixed in pause mode. NPT is (logically) equivalent to SMPTE time codes." [5]

[12] NPT は DSM-CC にあるように定義されます。「直感的には、 NPT は表示がプログラムと関連付けられた時計です。 VCR にデジタル的に表示されることもあります。 NPT は通常演奏状態 (比率 = 1) では普通に進み、早送り (大きな正の比率) では高速で進み、巻き戻し (大きな負の比率) では減り、停止状態では止まっています。 NPT は (必然的に) SMPTE 時間符号と同値になります。」

  • [13] npt-range = ( npt-time "-" [ npt-time ] ) | ( "-" npt-time )
  • [14] npt-time = "now" | npt-sec | npt-hhmmss
  • [15] npt-sec = 1*DIGIT [ "." *DIGIT ]
  • [16] npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT ]
  • [17] npt-hh = 1*DIGIT ; any positive number
  • [18] npt-mm = 1*2DIGIT ; 0-59
  • [19] npt-ss = 1*2DIGIT ; 0-59

Examples: 例:

The syntax conforms to ISO 8601. The npt-sec notation is optimized for automatic generation, the ntp-hhmmss notation for consumption by human readers. The "now" constant allows clients to request to receive the live feed rather than the stored or time-delayed version. This is needed since neither absolute time nor zero time are appropriate for this case.

[23] 構文は ISO 8601 に適合します。 npt-sec 記法は自動生成に最適化されており、 ntp-hhmmss 記法は人間が見るのに最適化されています。 "now" 定数により、クライアントが蓄積されている版や遅延版ではなく生中継版を受信したいと要求することが出来ます。 絶対時刻も零時刻もこの場合には不適切なので、この値が必要です。

RFC の部分の License

RFCのライセンス

メモ