{
  "id": 4525009,
  "title": "Sampling rate is a correctness property, not a performance knob",
  "url": "https://urgent.news/2026/08/30/sampling-rate-is-a-correctness-property-not-a-performance-knob",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-30T23:33:18.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/edycutjong/sampling-rate-is-a-correctness-property-not-a-performance-knob-47p7"
  },
  "original_language": "en",
  "account": "In 1997, a Pokémon episode aired in Japan with a four-second red-and-blue strobe, causing 685 children to rush to the hospital. Following this incident, regulations were put in place, such as Ofcom Broadcasting Code 2.12 and ITU-R BT.1702, requiring broadcast deliveries to pass a photosensitive-epilepsy check before transmission. The author built a screening tool to check for such violations. The tool is available at flashframe-production.up.railway.app and github.com/edycutjong/flashframe. The story is not about the tool itself, but about the author encountering two different bugs that were actually the same bug and not recognizing it the second time around.\n\nThe regulation states that there should be no more than three flashes in any one second. This is not a video-processing problem, but a time-series query. Per-frame luminance goes into ClickHouse, and the detection is done using windowed SQL. The window size is fps - 1 rows, because one second of frames depends on how many frames per second were sampled. The parameter of interest is fps, which determines whether a clip passes or fails the check.\n\nBug one occurred when a safe clip failed the extraction at 10 fps. The clip alternated 5 times per second, which is under the limit and should have passed. However, it came back with a violation. This happened because the samples landed at a beat frequency against the actual flashing, causing an aliasing effect similar to the wagon-wheel effect. The fix was not to sample everything at 60 fps, but to resample only the span whose verdict was uncertain. When the clip resolved to 2.82 flashes/sec, it passed the check, while at 10 fps, it failed.\n\nBug two was when the model couldn't recognize a genuine strobe read at 6.25 Hz when sampled at 10 fps. The model was given a default sampling rate of 1 fps, and the strobe appeared as a still frame, making it undetectable. When the sample rate was increased to 24 fps, the model correctly identified the strobe. This bug highlighted the importance of checking the sampling rate, as undersampling can lead to missed hazards.\n\nIn conclusion, the author emphasizes that sampling rate is a correctness property, not a performance knob. When dealing with time-series data, such as video frames or sensor readings, it is crucial to sample at a rate that is at least twice the highest frequency of interest to avoid inaccurate results. This simple rule can prevent false failures and ensure the safety and reliability of compliance reports.",
  "summary": "In 1997 a Pokémon episode aired in Japan with a four-second red-and-blue strobe. 685 children went to hospital that night. The regulations that followed — Ofcom Broadcasting Code 2.12, ITU-R BT.1702 — are why UK and Japanese broadcast deliveries have to clear a photosensitive-epilepsy check before transmission. I built a screening tool for that check. Live at flashframe-production.up.railway.app…",
  "key_points": [
    "Sampling rate is a correctness property, not a performance knob",
    "Regulation requires no more than three flashes per second",
    "Undersampling can lead to missed hazards and false failures"
  ],
  "editors_take": "Treating sampling rate as a performance issue rather than a correctness requirement can lead to inaccurate results, false failures, and potential safety risks in time-series data analysis, particularly in regulated applications.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}