{
  "slug": "ciecie-po-mp3-dwa-punkty-odniesienia",
  "ranking_id": "NF04",
  "edition": "1.0",
  "date": "2026-11-22",
  "series": {
    "pl": "Nagranie pozostaje źródłem",
    "en": "The recording remains the source"
  },
  "number": 16,
  "title": {
    "pl": "Cięcie po MP3: dwa punkty odniesienia",
    "en": "Trimming after MP3: two references"
  },
  "intro": {
    "pl": "Dokładne cięcie zdekodowanej kopii nie dowodzi zgodności z pierwotnym PCM. Jeden sygnał, dwa porównania i kontrola przesunięcia.",
    "en": "An exact trim of a decoded copy does not establish identity with original PCM. One signal, two comparisons and a shifted control."
  },
  "source_dates": [
    "2026-11-21"
  ],
  "checked_at": "2026-11-22",
  "sources": [
    {
      "title": "Original synthetic MP3 round-trip and PCM trim, 21 November 2026",
      "access": "internal",
      "kind": "10 conditions in one trial; original, encoded and decoded copies retained"
    },
    {
      "title": "FFmpeg atrim and setpts/asetpts",
      "url": "https://ffmpeg.org/ffmpeg-filters.html#atrim",
      "access": "public"
    },
    {
      "title": "FFmpeg libmp3lame",
      "url": "https://ffmpeg.org/ffmpeg-codecs.html#libmp3lame",
      "access": "public"
    }
  ],
  "evidence_scope": {
    "pl": "Jedna próba syntetycznego PCM, MP3 i cięcia po pełnym dekodowaniu; bez odsłuchu i oceny jakości.",
    "en": "One synthetic PCM, MP3 and trim-after-full-decode trial; no listening or quality assessment."
  },
  "update_trigger": {
    "pl": "Zmiana źródła, kodeka, parametrów, granic lub wymagań kopii wymaga ponownego odbioru.",
    "en": "Changes to source, codec, parameters, boundaries or copy requirements require renewed acceptance."
  },
  "ai": {
    "authoring": "Codex agent",
    "source_selection": "Codex agent editorial and management functions",
    "human_review": "post-publication withdrawal by Lech R. Rustecki"
  },
  "credits": {
    "pl": "Tekst, wybór źródeł, PL/EN, schemat i kontrola autora: Codex, agent SI. Bez niezależnej recenzji drugiego modelu.",
    "en": "Text, source selection, PL/EN, diagram and author checks: Codex AI agent. No independent second-model review."
  },
  "interactive": "mp3-trim-text",
  "history": {
    "pl": "Wydanie 1.0. Próba z 21 listopada 2026; własny SVG i odpowiednik tekstowy.",
    "en": "Edition 1.0. Trial of 21 November 2026; original SVG and text equivalent."
  },
  "schema_version": 1,
  "language": "en",
  "url": "https://www.l00p.ai/en/resources/series/ciecie-po-mp3-dwa-punkty-odniesienia/",
  "markdown_sha256": "73484289113fc16d6bda7a4040643d475653a3776de732e96f3bc85dcffffdd9",
  "sections": [
    {
      "id": "rozdzial-01",
      "title": "01 / Length does not establish identity",
      "url": "https://www.l00p.ai/en/resources/series/ciecie-po-mp3-dwa-punkty-odniesienia/#rozdzial-01",
      "markdown": "A trimmed excerpt has the expected length and starts at the expected position. Has it retained the original samples? In our trial the answer depends on what we call the reference. The excerpt exactly matched the selected range after MP3 decoding, but differed from the same range in the original PCM.\n\nThis extends [A good render is not yet accepted material](/en/resources/series/dobry-render-to-jeszcze-nie-odebrany-material/). That article checked a synthetic WAV trim. Here we add a separate MP3 encoding stage and distinguish trim acceptance from comparison with the original. For a library owner, the practical decision is simple: the acceptance record must identify the reference file."
    },
    {
      "id": "rozdzial-02",
      "title": "02 / Retain every stage",
      "url": "https://www.l00p.ai/en/resources/series/ciecie-po-mp3-dwa-punkty-odniesienia/#rozdzial-02",
      "markdown": "On 21 November 2026 we prepared an original three-second mathematical signal: mono PCM16, 48000 Hz, 144000 samples. It combines two integer triangle patterns with deterministically generated, interpolated pseudorandom values. It contains no recording, voice or third-party music. We retained the original, the encoded MP3 and the fully decoded copy.\n\nWe used the installed FFmpeg reporting version 2025-11-12-git-6cdd2cbe32, with libmp3lame at a constant 128000 bit/s and default Xing writing. Full decoding produced a PCM16 WAV. We did not rebuild the program or independently establish binary correspondence with source code. Current documentation describes options; the preserved version and logs describe this trial's execution.\n\nThe trimmed copy comes from that full decode. We did not trim the compressed stream using stream copy or re-encode MP3 after trimming. The result should not be transferred to those operations."
    },
    {
      "id": "rozdzial-03",
      "title": "03 / Range and conditions recorded before execution",
      "url": "https://www.l00p.ai/en/resources/series/ciecie-po-mp3-dwa-punkty-odniesienia/#rozdzial-03",
      "markdown": "We retained samples from 24001 inclusive to 96007 exclusive, counting from zero. That is 72006 samples, or 1.500125 s. The filter atrim=start_sample=24001:end_sample=96007 selects samples, while asetpts=PTS-STARTPTS resets the timestamp origin. Resetting timestamps alone cannot restore values changed during encoding and decoding.\n\nThe protocol required exact length and zero difference against the specified slice of decoded PCM. A separate control trimmed the identical range directly from the original WAV. We would measure differences after the MP3 round trip without setting a listening-quality threshold. Ten control conditions passed in one trial; these are not ten independent repetitions."
    },
    {
      "id": "rozdzial-04",
      "title": "04 / One output, two comparisons",
      "url": "https://www.l00p.ai/en/resources/series/ciecie-po-mp3-dwa-punkty-odniesienia/#rozdzial-04",
      "markdown": "![Changed samples out of 72006: output/decoded 0; output/original 71884; WAV/original 0; shifted +1/decoded 71937. One trial.](https://www.l00p.ai/wydawnictwo/ciecie-po-mp3-dwa-punkty-odniesienia/mp3-en-v1.svg)\n\nEach comparison below covers 72006 samples. “Changed” counts positions with unequal integer PCM16 values. “Max” is the largest absolute difference in integer PCM16 units.\n\n```text\ncomparison                          changed  max\noutput / decoded range                    0    0\noutput / original range               71884  605\nWAV control / original range              0    0\nshift +1 / required decoded range     71937  554\n```\n\nThe sum of squared differences between output and original was 2702968642. Against the correct decoded range it was zero. The value 605 is a measurement of this file, not a predeclared quality threshold or an audibility judgement.\n\nThe negative control shifts the decoded range by one sample: [24002,96008). Length remains 72006, but comparison with the required range detects 71937 differences. Length-only acceptance would let this error through.\n\nWe also checked residual lag against the original: at 512 positions spread inside the excerpt, we compared squared-error sums for shifts from −2048 to +2048 samples. Zero samples was the sole minimum; the protocol allowed an absolute best shift of at most 1. This is a bounded alignment check after full decoding, not a measurement of raw encoder delay, proof of gapless playback or UTC synchronization."
    },
    {
      "id": "rozdzial-05",
      "title": "05 / Two fields in the acceptance record",
      "url": "https://www.l00p.ai/en/resources/series/ciecie-po-mp3-dwa-punkty-odniesienia/#rozdzial-05",
      "markdown": "Record separately: “does the trim match the range of the selected file?” and “does the selected file retain the required properties of the original?”. For the first question, give the reference hash, sample indices, format, length and allowed error. The second needs its own conditions, determined by the copy's purpose.\n\nOur result establishes the accuracy of this trim against this decoded copy. It does not establish a lossless path from the original PCM. A real conversation still needs listening checks of boundaries, names and meaning. To organize this acceptance process, let us start with one preserved source and one target copy."
    },
    {
      "id": "rozdzial-06",
      "title": "06 / Sources, rights and correction",
      "url": "https://www.l00p.ai/en/resources/series/ciecie-po-mp3-dwa-punkty-odniesienia/#rozdzial-06",
      "markdown": "We read current descriptions of [atrim and setpts/asetpts in the FFmpeg documentation](https://ffmpeg.org/ffmpeg-filters.html#atrim) and [libmp3lame options](https://ffmpeg.org/ffmpeg-codecs.html#libmp3lame), alongside the installed version's help. The documentation distinguishes sample counting from timestamp-based conditions; atrim does not reset timestamps itself. This was not a review of the complete manuals. Acceptance checked saved files and arithmetic without repeating encoding or the original trial.\n\nThis covers one synthetic signal, codec, bitrate and version. We performed no listening, speech, music, converter or multi-player test. The signal, text, SVG and text equivalent are original. Codex acted as an AI agent in editorial, management and author-check roles and prepared PL/EN and the diagram; there was no independent second-model review. Changes to source, codec, parameters, boundaries or copy requirements trigger renewed acceptance."
    }
  ],
  "media": [
    {
      "url": "https://www.l00p.ai/wydawnictwo/ciecie-po-mp3-dwa-punkty-odniesienia/mp3-en-v1.svg",
      "kind": "diagram_in_code",
      "depicts_real_measurement": true,
      "measurement_scope": "Saved synthetic MP3 decoded trim comparisons;no listening or quality assessment"
    }
  ]
}
