
Technical guide by Roberto Ruggeri, forensic audio specialist. Last substantive review: 28 August 2026.
Codec lineage is a practical way of describing the sequence of encoding, decoding, transcoding, export and re-encoding stages that may have shaped an audio file before examination.
The central question is not simply “which codec is this file using now?” but what technical history is still supported by the file that exists today. A current AAC, MP3, Opus, PCM or FLAC stream may be the first encoded generation, a later export, a platform-produced derivative, a decoded working file, or the result of several transformations.
In this guide, codec lineage is used as a descriptive analytical term. It is not presented as the name of a standalone ENFSI test, a universal classification system or a method that can determine authenticity by itself. Its value lies in reconstructing technically supportable stages of file history and identifying what remains known, what is only compatible with the evidence, and what can no longer be recovered.
Codec Lineage, Provenance and Authentication Are Different Questions
Three ideas are often mixed together even though they answer different questions.
| Question | What it addresses |
|---|---|
| Codec lineage | Which encoding or transformation stages are technically supported by the current file and available comparisons. |
| Provenance | The documented or reported history of where the file came from, how it was transferred and which systems handled it. |
| Audio authentication | The broader forensic assessment of whether the recording and its technical traces are consistent with the stated recording history or contain unexplained indicators of post-processing or discontinuity. |
A codec-lineage observation can contribute to an authenticity examination, but the two should not be treated as synonyms. If the actual question concerns cuts, splices, insertions, unexplained discontinuities or whether a particular recording has been altered, the dedicated Audio Authentication page covers that broader scope.
What Can Be Reconstructed From an Audio File?
Reconstruction starts from the current digital object. The examiner may be able to establish its container, audio stream type, codec, sample rate, channel configuration, bitrate behavior, frame structure, accessible metadata and other format-specific properties.
Those observations describe the present generation. Earlier stages must be inferred cautiously from traces that survived later processing, from other versions of the same recording, or from documented contextual information.
A useful lineage reconstruction therefore separates three levels:
- Observed: directly measurable in the current file.
- Supported or compatible: a previous technical stage is consistent with the observations and available reference information.
- Unresolved: later processing has removed too much information to determine the earlier stage reliably.
This distinction is important because repeated decoding, transcoding and platform processing can overwrite container information, replace metadata and add new coding artifacts while leaving only partial traces of previous generations.
Container, Codec, Bitstream and Derived File
A container is the structure that stores one or more media streams and related information. MP4, MOV, M4A and WAV are examples of containers or file formats. A codec defines how the audio signal is represented or compressed, for example PCM, AAC, MP3, Opus or FLAC.
The same codec can appear in different containers, and changing the container does not necessarily mean that the compressed audio stream itself was re-encoded. Conversely, a file can retain a familiar extension while its audio has undergone a new encoding stage.
This creates an important forensic distinction between re-wrapping and transcoding:
- Re-wrapping: the encoded audio stream may be copied into another compatible container without re-encoding the audio payload.
- Transcoding: the audio is decoded and encoded again, either into another codec or into a new generation of the same codec.
- Decoding to PCM: a compressed source may be decoded into WAV/PCM for analysis; the new WAV is a derived representation and does not become the native recording merely because it is uncompressed.
Where the specific issue is the separation of audio from a video container, including the difference between stream extraction and creation of a new exported audio file, see Audio Extracted from Video: Stream Copy vs Re-Encoding. That article owns the video-extraction question; this guide addresses the broader history of encoding stages.
Examples of Different Codec-Lineage Paths
| Example path | Technical meaning |
|---|---|
| M4A/AAC → MP4/AAC | May be a re-wrap if the AAC bitstream is preserved; container-level metadata or timing information can still change. |
| AAC → WAV/PCM | The compressed audio has been decoded. The WAV contains PCM samples derived from the AAC source; information discarded by AAC is not restored. |
| WAV/PCM → MP3 → WAV/PCM | The final WAV is uncompressed but the signal may still retain effects of the previous lossy MP3 stage. |
| Opus → AAC | A new lossy encoding stage can replace previous framing and metadata while adding a second generation of coding effects. |
| Native file → messaging platform → downloaded copy | The result depends on the platform and workflow: the file may be passed through unchanged, rewrapped, recompressed or otherwise rewritten. |
These examples describe possible technical routes, not automatic forensic conclusions. The actual sequence must be supported by the material examined.
Technical Traces Used to Evaluate Codec Lineage
No single trace reconstructs a complete history. Different classes of information are considered together, depending on the format and the question.
File and Container Structure
Chunks, atoms, stream layout, duration fields, codec configuration records and other structural elements can describe how the current file was written. Some structures may be consistent with particular software families or export workflows, but they should not be treated as unique software fingerprints without suitable reference material.
Codec, Framing and Bitrate Behavior
Codec type, profile, bitrate mode, frame organization, channel configuration and other encoding parameters can help distinguish the present generation from an alleged native format. A mismatch can justify further investigation, but it does not identify who performed the transformation or why it occurred.
Metadata and Encoder Information
Encoder strings, application fields, creation information and other metadata can sometimes document a later processing stage. Metadata are useful when internally consistent and supported by context, but many fields are editable, removable or rewritten automatically and should not be treated as proof of origin on their own.
Resampling Traces
Digital resampling can introduce inter-sample dependencies or other measurable effects. ENFSI includes resampling among the post-processing traces that may be examined in digital audio authenticity work. Applicability depends on the file type, resampling process, available data and validation of the method; detecting a trace of resampling does not, by itself, explain why the resampling occurred.
Double-Encoding Traces
Lossy audio that is decoded and subsequently encoded again can acquire effects associated with more than one coding generation. ENFSI specifically discusses double-encoding traces as a class of post-processing evidence and notes method-dependent work involving MP3 and AAC. This should not be converted into the simplistic claim that every twice-encoded file can always be identified or that every apparent spectral pattern proves double encoding.
Spectral and Temporal Effects
Lossy coding can affect bandwidth, transient representation, noise texture and other time-frequency characteristics. These effects are useful only when interpreted against the codec, bitrate, source material and possible alternative causes. A visible cut-off or spectral texture should not be assigned automatically to a particular encoder or previous generation.
The mechanisms and perceptual consequences of compression artifacts are treated separately in Audio Artifacts in Forensic Recordings: Causes and Interpretation. This page uses such effects only insofar as they contribute to reconstructing file history.
Why a WAV File Is Not Necessarily an Original Recording
One of the most important practical misconceptions is that an uncompressed WAV file must be “original” or must contain all information that existed before it.
A WAV file may be native to a recorder, but it may also have been created by decoding MP3, AAC, Opus or another compressed source. Once information has been discarded by a previous lossy codec, decoding to PCM does not recover it. The result can be perfectly valid as a working file while still being a later generation.
For that reason, the forensic description should distinguish between a native recording file, an earliest available generation and a derived PCM working file rather than assigning originality from the extension alone.
Reference Files and Controlled Reconstruction
Where a device, application, platform or claimed conversion path is known, controlled reference files can be useful. The objective is to determine whether features observed in the questioned file can be reproduced through an ordinary workflow.
Reference testing is strongest when the relevant conditions are comparable: application version, operating system, codec settings, export route and platform behavior may change over time. A result obtained with a different software version or an undocumented configuration should not automatically be projected onto the questioned file.
SWGDE also documents the use of FFmpeg stream hashing to check whether certain decoding or re-wrapping operations have preserved the decoded audio stream. Such verification can establish transparency of a specific transformation; it does not reconstruct every stage that preceded the source file used in the test.
Common Interpretation Errors
- “Re-encoded means manipulated.” No. Re-encoding can result from ordinary export, forwarding, conversion or platform processing.
- “Same extension means same generation.” No. A file can be rewritten or re-encoded while retaining the same extension.
- “WAV means original.” No. A WAV may be a decoded or otherwise derived file.
- “A frequency cut-off identifies the previous codec.” Not by itself. Bandwidth can depend on source material, codec, bitrate, encoder, filters and earlier stages.
- “An encoder string uniquely identifies the software that created the file.” Not necessarily. Strings may be generic, copied, editable or omitted.
- “No double-encoding trace means the file was encoded only once.” Not necessarily. Earlier traces can be weak, absent, overwritten or outside the validated conditions of the method used.
What Codec Lineage Cannot Establish by Itself
Codec-lineage analysis has strict boundaries. By itself it cannot establish:
- whether a transformation was intentional, deceptive or routine;
- who performed an export, conversion or re-encoding;
- the exact recording date from codec information alone;
- a complete earlier history when later stages have removed the relevant traces;
- that a cut, splice or insertion occurred merely because re-encoding is present;
- legal admissibility, evidential weight or responsibility.
The correct output may therefore be a partial lineage: for example, the current file may clearly be a later encoded generation while the exact intermediate stages remain unresolved.
How Codec Lineage Fits Into a Forensic Examination
Codec lineage is most useful when it answers a narrow question: is the current technical state of the file compatible with the transformation history that has been described?
If the answer reveals an unexplained stage, that finding can become one input to a wider examination. The broader assessment may then consider metadata, file structure, recording traces, signal continuity, contextual information and alternative hypotheses. Those wider methods belong to Audio Authentication, while general preservation, working-copy and reporting principles remain on the Forensic Audio Methodology and Best Practice References page.
This separation is deliberate: codec lineage explains transformation history; it does not duplicate the full authentication workflow.
Technical and Primary References
- ENFSI — Best Practice Manual for Digital Audio Authenticity Analysis, FSA-BPM-002— recording traces, post-processing traces, resampling, double encoding, contextual comparison and interpretation.
- SWGDE — Best Practices for Forensic Audio— handling, transfer and limits on unnecessary transcoding or resampling.
- SWGDE — Technical Notes on FFmpeg for Forensic Audio Examination— stream handling, conversion and validation procedures including stream hashing.
- ISO/IEC 14496-12:2026 — ISO base media file format— structural basis for ISO Base Media File Format containers.
- ISO/IEC 11172-3:1993 — MPEG audio coding.
- ISO/IEC 13818-7:2006 — Advanced Audio Coding (AAC).
- RFC 6716 — Definition of the Opus Audio Codec.
Scope note: This guide is informational and concerns the technical reconstruction of encoding and transformation history. It does not provide a conclusion about the authenticity of any specific recording. Case-specific questions about possible alteration require examination of the actual files and available provenance.