docs(fvi): pretty-print JSON blocks in FVI format spec
Reformat all three JSON code blocks (section 8 ext example, Appendix A Header schema, Appendix A Record schema) with consistent 2-space indentation and valid syntax. No field or semantic changes.
This commit is contained in:
+37
-25
@@ -1,7 +1,8 @@
|
|||||||
# FVI — Freemkv Video Index Format
|
# FVI — Freemkv Video Index Format
|
||||||
|
|
||||||
**Specification version:** 1.0 (DRAFT)
|
**Specification version:** 1.0 (DRAFT)\
|
||||||
**File extension:** `.fvi` **Media type:** `application/vnd.freemkv.fvi+jsonl`
|
**File extension:** `.fvi`\
|
||||||
|
**Media type:** `application/vnd.freemkv.fvi+jsonl`\
|
||||||
**Status:** Draft for review. This document is the normative reference for the FVI
|
**Status:** Draft for review. This document is the normative reference for the FVI
|
||||||
format; implementations and downstream tools cite it by section.
|
format; implementations and downstream tools cite it by section.
|
||||||
|
|
||||||
@@ -25,13 +26,6 @@ FVI is **not** a container, a codec, or a copy of the bitstream. It indexes; it
|
|||||||
never stores coded samples. It is the serialized form of an indexer's per-picture
|
never stores coded samples. It is the serialized form of an indexer's per-picture
|
||||||
truth — carried from the demuxer, **never reconstructed** (§9).
|
truth — carried from the demuxer, **never reconstructed** (§9).
|
||||||
|
|
||||||
### 1.1 Relationship to prior art
|
|
||||||
|
|
||||||
Legacy MPEG-only project-index formats from the AviSynth frameserving ecosystem
|
|
||||||
solve a narrow version of (1) and (2) for MPEG-1/2 only, in a bespoke,
|
|
||||||
single-tool text encoding. FVI generalizes that idea: codec-agnostic, JSON-based,
|
|
||||||
provenance-native, and openly specified so any tool may read or write it.
|
|
||||||
|
|
||||||
## 2. Conformance
|
## 2. Conformance
|
||||||
|
|
||||||
The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**,
|
The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**,
|
||||||
@@ -179,8 +173,21 @@ registered set per codec profile (e.g. MPEG-2 §7.1), or (b) placed under an
|
|||||||
`ext` object keyed by codec id for richer/optional data:
|
`ext` object keyed by codec id for richer/optional data:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{"n":42,"type":"P","key":false,"src":{"sector":17,"byte":924},
|
{
|
||||||
"ext":{"hevc":{"temporal_id":0,"nal_type":1}}}
|
"n": 42,
|
||||||
|
"type": "P",
|
||||||
|
"key": false,
|
||||||
|
"src": {
|
||||||
|
"sector": 17,
|
||||||
|
"byte": 924
|
||||||
|
},
|
||||||
|
"ext": {
|
||||||
|
"hevc": {
|
||||||
|
"temporal_id": 0,
|
||||||
|
"nal_type": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
New codecs and members are added through Appendix B (codec registry) without a
|
New codecs and members are added through Appendix B (codec registry) without a
|
||||||
@@ -238,13 +245,13 @@ Header:
|
|||||||
{
|
{
|
||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["format","fvi_version","stream","source","timescale"],
|
"required": ["format", "fvi_version", "stream", "source", "timescale"],
|
||||||
"properties": {
|
"properties": {
|
||||||
"format": {"const": "freemkv/video-index"},
|
"format": { "const": "freemkv/video-index" },
|
||||||
"fvi_version": {"type": "integer", "minimum": 1},
|
"fvi_version": { "type": "integer", "minimum": 1 },
|
||||||
"timescale": {"type": "integer", "minimum": 1},
|
"timescale": { "type": "integer", "minimum": 1 },
|
||||||
"stream": {"type": "object", "required": ["codec","width","height","scan"]},
|
"stream": { "type": "object", "required": ["codec", "width", "height", "scan"] },
|
||||||
"source": {"type": "object", "required": ["medium"]}
|
"source": { "type": "object", "required": ["medium"] }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -255,15 +262,20 @@ Record:
|
|||||||
{
|
{
|
||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["n","src","type","key"],
|
"required": ["n", "src", "type", "key"],
|
||||||
"properties": {
|
"properties": {
|
||||||
"n": {"type": "integer", "minimum": 0},
|
"n": { "type": "integer", "minimum": 0 },
|
||||||
"type": {"enum": ["I","P","B"]},
|
"type": { "enum": ["I", "P", "B"] },
|
||||||
"key": {"type": "boolean"},
|
"key": { "type": "boolean" },
|
||||||
"src": {"type":"object","required":["sector","byte"],
|
"src": {
|
||||||
"properties":{"file":{"type":"integer"},
|
"type": "object",
|
||||||
"sector":{"type":"integer","minimum":0},
|
"required": ["sector", "byte"],
|
||||||
"byte":{"type":"integer","minimum":0}}}
|
"properties": {
|
||||||
|
"file": { "type": "integer" },
|
||||||
|
"sector": { "type": "integer", "minimum": 0 },
|
||||||
|
"byte": { "type": "integer", "minimum": 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user