W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2011

[whatwg] SRT research: timestamps

From: Ralph Giles <giles@mozilla.com>
Date: Fri, 07 Oct 2011 10:27:29 -0700
Message-ID: <4E8F3681.6010802@mozilla.com>
On 06/10/11 01:58 AM, Simon Pieters wrote:

> I don't know how many have negative interval, I'd need to run a new
> script over the 52,000,000 lines to figure out. (If you want me to check
> this, please contact me with details about what you want to count as
> "negative interval".)

I had in mind something like:

cat *.vtt | awk '/-->/ {
  ns = split($1, start, "[:.,]");
  ne = split($3, end, "[:.,]");
  if (ns != ne) print "timestamp field counts differ";
  if (end[1] -start[1] < 0) print "negative interval";
}
BEGIN { negs = 0; misses = 0; }
END { print negs, "negative intervals";
      print misses, "cues skipped because field counts were different";
}'

Which will probably still miscount some garbage lines, but gives a rough
idea.

> leading id e.g.
> 10300:11:53,891 --> 00:11:56,155
> 
> 33

OTOH, sounds like the leading id issue is vanishingly uncommon, so I'm
just curious if there are any other queues which would be rejected that way.

 -r
Received on Friday, 7 October 2011 10:27:29 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC