0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

YTT (SRV3) 自前リファレンス

Last updated at Posted at 2024-08-23

随時確認・追記する。
疑問符のついた記載は未確認・推測。

head タグ

pen タグ

pens

SRV3 JSON3 YouTube の字幕オブションでの名前
id なし(インデックスで処理) ID
b bAttr 太字
i iAttr 斜体
u uAttr 下線
et etEdgeType 縁タイプ 文字装飾スタイル / Character edge style
of offset? 垂直方向オフセット(vertical-align)
bc bcBackColor 背景色 背景色 / Background color
ec ecEdgeColor 縁色
fc fcForeColor 前景色 フォントの色 / Font color
fs fsFontStyle フォントスタイル フォント ファミリー / Font family
sz szPenSize pen サイズ フォント サイズ / Font size
bo boBackAlpha 背景アルファ 背景の透過度 / Background opacity
fo foForeAlpha 前景アルファ フォントの透過度 / Font opacity
rb rbRuby ルビ
hg hgHorizGroup 縦中横
te? teTextEmphas? 圏点?

b 属性

font-weight
0 なし
1 bold 太字

i 属性

font-style
0 なし
1 italic 斜体

u 属性

text-decoration
0 なし
1 underline 下線

et 属性

text-shadow YouTube の字幕オブションでの名前
1 rgb(?, ?, ?) Xpx Xpx(, rgb(?, ?, ?) X+Npx X+Npx...) 浮き彫り / Raised
2 rgb(?, ?, ?) Xpx Xpx, rgb(?, ?, ?) -Xpx -Xpx; 沈み彫り / Depressed
3 rgb(?, ?, ?) 0px 0px Xpx, rgb(?, ?, ?) 0px 0px Xpx, rgb(?, ?, ?) 0px 0px Xpx, rgb(?, ?, ?) 0px 0px Xpx, rgb(?, ?, ?) 0px 0px Xpx; アウトライン / Outline
4 rgb(?, ?, ?) Xpx Xpx Ypx, rgb(?, ?, ?) Xpx Xpx Y+1px, rgb(?, ?, ?) Xpx Xpx Y+2px; ドロップ シャドウ / Drop Shadow

of 属性

vertical-align
0 sub 下付き文字
1 なし
2 super 上付き文字

bc 属性

#FFFFFF ユーザー設定のデフォルト
#****** 背景色

ec 属性

#****** 縁色

fc 属性

#FFFFFF ユーザー設定のデフォルト
#****** 前景色

fs 属性

font-family YouTube の字幕オブションでの名前
0 ユーザー設定のデフォルト
1 "Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace 等幅セリフ / Monospaced Serif
2 "Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif プロポーショナル セリフ / Proportional Serif
3 "Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace 等幅サンセリフ / Monospaced Sans-Serif
4 "YouTube Noto", Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif プロポーショナル サンセリフ / Proportional Sans-Serif
5 "Comic Sans MS", Impact, Handlee, fantasy カジュアル / Casual
6 "Monotype Corsiva", "URW Chancery L", "Apple Chancery", "Dancing Script", cursive 草書体 / Cursive
7 "Carrois Gothic SC", sans-serif-smallcaps(おそらく環境によって?は "Arial Unicode Ms", Arial, Helvetica, Verdana, "Marcellus SC", sans-serif スモール キャピタル / Small Capitals

7 のとき、font-variant が small-caps になる。

sz 属性

0- フォントサイズ(デフォルト 100

実際のサイズは 100 + (sz - 100) / 4 か?

bo 属性

255 ユーザー設定のデフォルト
0-254 背景透過度

fo 属性

255 ユーザー設定のデフォルト
0-254 前景透過度

rb 属性

0 なし
1
2
3
4
5

hg 属性

0 なし
1 縦中横

text-combine-upright が all 、text-orientation が mixed になる。
加えて wspd 属性が 3 のとき、更に transform がかかる。

縦書き内で動作。

te 属性?

0 なし
1
2
3
4
5

wp タグ

wpWinPositions

SRV3 JSON3
id なし(インデックスで処理) ID
ap apPoint アンカーポイント
cc ccCols 列カウント?(ウィンドウ幅?)
ah ahHorPos アンカーポイント水平位置
rc rcRows 行カウント?(ウィンドウ行数?)
av avVerPos アンカーポイント垂直位置

ap 属性

位置
0 左上
1
2 右上
3
4 中央
5
6 左下
7
8 右下

ah 属性

位置
0 - 100 左起点の水平位置

av 属性

位置
0 - 100 上起点の垂直位置

ws タグ

wsWinStyles

SRV3 JSON3 YouTubeの字幕オブションでの名前
id なし(インデックスで処理) ID
mh mhModeHint ウィンドウモード
ju juJustifCode 文字揃え
pd pdPrintDir プリント方向
sd sdScrollDir スクロール方向
wfc wfcWinFillColor ウィンドウ塗りつぶし色 ウィンドウの色 / Window color
wfo wfoWinFillAlpha ウィンドウ塗りつぶしアルファ ウィンドウの透過度 / Window opacity

ju 属性

文字揃え
0 始端揃え
1 終端揃え
2 中央揃え
3 均等割付

pd 属性

0 なし(横書き LTR)
1 (HTML) dir="rtl" 横書き RTL
2 writing-mode: vertical-rl; text-orientation: upright; 正立 縦書き LTR
3 writing-mode: vertical-rl; transform: rotate(180deg); 横倒 縦書き LTR

3 は、transform を用いた奇妙な実装により、和文が完全に倒立する。

sd 属性

writing-mode 上書き
0 なし(右縦書き)
1 vertical-lr 左縦書き

縦書きの pd 属性が必須。

body タグ

events

p タグ

SRV3 JSON3
t tStartMs タイムスタンプ(ミリ秒)
d dDurationMs デュレーション(ミリ秒)
p pPenId pen ID
ws wsWinStyleId ws ID
wp wpWinPosId wp ID
w wWinId w ID
a aAppend 自動字幕のパティング?

a 属性

0 なし
1 有効

自動字幕の改行時に現れるようだ。

s タグ

segs

SRV3 JSON3
t tOffsetMs 親からの相対タイムスタンプ(ミリ秒)
p pPenId pen ID
ac acAsrConf 自動音声認識信頼度

ac 属性

0 - 255 自動音声認識信頼度

一定の値以下の場合にセグメントが消される?

w タグ

SRV3 JSON3
id id ID
t tStartMs 子からの相対?タイムスタンプ(ミリ秒)
ws wsWinStyleId ws ID
wp wpWinPosId wp ID

通常、各 p はそれ自体でウィンドウを持つが、最初に w タグがある場合、それらをリンクすると見られる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?