Re: meta-data in the VTT file header, a strawman proposal

On Fri, Apr 20, 2012 at 4:58 PM, David Singer <singer@apple.com> wrote:
>
> On Apr 20, 2012, at 15:05 , Silvia Pfeiffer wrote:
>
>>> As I say, it's essentially what is used for mail message bodies in SMTP, plus the minimum extra needed for our application (blank-line suppression).
>>
>> Not really. You don't have any name-value fields in a SMTP body, so
>> there is no need to distinguish between a single-line and a multi-line
>> name-value field.
>
> True.  I am treating each name-value pair as something to code, rather than the whole block.
>
>>
>> Your proposal is simply to introduce special markers that identify the
>> start and end of a multi-line name-value field.
>
> …which is like handling a message-body.
>
>>>  Maybe there is an existing system like this that includes blank-line management;  anyone think of one?
>>
>> YAML looked pretty neat - did you look at what I suggested earlier?
>
>
> Seems like most of the value of YAML is that it handles structured values.  If someone needed a structured value, then sure, it'd be a strong candidate for representing the value of that attribute.  But worse, just like 822, one has to indent every line of the text, as I read it; block termination is an un-indented line (that has to look like a key-value pair).  YAML allows blank lines, but alas, we don't need them (unless we drop the backwards-compatible "blank line means end of attributes" rule).
>
> So, interesting, for sure.  Maybe overkill, though having a standard syntax for structured value might be valuable, and maybe 'intrusive' (all the required indenting), but it is reversible.


Maybe we can pick some ideas from there though.

How about the "|" sign as the single value of a metadata field says
that from there on the next lines are a multi-line value. Then we can
end it with a single line that just has a "." on it (like SMTP bodys)
(or again a "|" if you prefer). I think that could work out quite
readable.

For example:

Kind:  captions
Initial-Timestamp: 1000
Style: |
p {
 font-size: 100px;
}
.class {
 text-color: red;
}
.
NexField: whatever

Then as we need more features from YAML, we can include them. E.g. the
use of ">" instead of "|" to signify a multi-line that should be
concatenated. And indentation to provide hierarchical structure
(should we ever need them).

Cheers,
Silvia.

Received on Friday, 20 April 2012 07:11:20 UTC