Containers, metadata, subtitles; no decoding. A managed .NET library for media containers, with no dependency beyond the .NET base class library. It reads and writes containers, edits metadata, repairs damaged files and rebuilds cut-off recordings, and covers subtitles and captions, capture facts, telemetry, timed events and a privacy strip. OneMedia is unaffiliated with other products or companies named OneMedia.
The goal is the depth of libavformat, GPAC, mkvtoolnix, MediaInfo and ExifTool in one library you can call from C#: demux and mux, lossless tag editing, evidence-backed capture time and place, subtitles and captions, repair, and HLS/DASH packaging. It never decodes or encodes an audio or video sample; audio decoding is handed to OneAudio through the RecursiveAI.OneMedia.Audio adapter.
Version 1.0.2: reading every container below (MP4/MOV/3GP, Matroska/WebM, MPEG-TS/PS and elementary streams, ASF, AVI, DV, Ogg, FLAC, FLV, MP3/ADTS/AC-3/AMR, WAV/AIFF/CAF), writing MP4/MOV/3GP/fragmented MP4/CMAF, Matroska/WebM, MPEG-TS/M2TS and WAV/BWF/RF64, remux (including to transport streams and WAV), faststart, trim, split and concat without re-encoding, tag editing, browser playability (CanPlay, MakePlayable, now with AAC and FLAC audio targets), a privacy strip for location and device identifiers, capture-date writes, and repair (rebuilding the indexes of damaged Matroska/WebM, AVI, MP4/MOV, fragmented MP4 and MPEG-TS files, and reconstructing truncated MP4/MOV/3GP recordings, always into a new file with a report), and HLS/DASH packaging (CMAF and transport-stream segments with HLS playlists and a DASH MPD, video on demand or live). Also in this release, each with the limits stated below: packaging, HLS/DASH presentations and growing files as sources, capture facts as evidence, telemetry, timed events, and subtitles and captions (sidecars, container text tracks, CEA-608/708, SCC, teletext, bitmap subtitles). Packaging has not passed a validator: Apple mediastreamvalidator was not run (it needs an Apple ID sign-in) and the DASH-IF conformance tool v3.1.0 ran once (two findings, fixed) and then fails in its own base-URI handling; packaging is verified by packet equality with ffprobe and by playback in hls.js and dash.js in Chromium, Firefox and WebKit plus native HLS in macOS WebKit (docs/packaging.md). Sources have limits: live DASH is not reloaded, HLS subtitle renditions are not read, a segment is held whole in memory up to MediaLimits.MaxSegmentBytes, and keyed segments are reported Protected and not decrypted (docs/streaming-sources.md). The tables below list what works and how it was checked; gaps are listed, not hidden.
using RecursiveAI.OneMedia;
using RecursiveAI.OneMedia.Audio; // package RecursiveAI.OneMedia.Audio
using var media = Media.Open("clip.mov");
Console.WriteLine($"{media.Duration} {media.Video?.Codec} {media.Audio?.Codec}");
Console.WriteLine($"{media.Tags.Title} {media.CaptureTime}"); // a fact prints its best value, or "none"
if (media.Location.TryGetValue(out var place)) // absent facts have no value: no 0,0 stand-in
Console.WriteLine($"{place.Latitude}, {place.Longitude}");
foreach (var candidate in media.CaptureTime.Candidates) Console.WriteLine(candidate);
using var pcm = media.Audio!.Decode(); // the audio track, decoded by OneAudioonemedia info <file> (or --json) prints tracks, codecs (RFC 6381 strings), tags and facts with their candidate sources.
| Format | Read | Write | Tag edit | Packets vs ffprobe 7.0.2 | Probe + metadata I/O (local reads), OneMedia vs ffprobe / MediaInfo / ExifTool | Documented deviations |
|---|---|---|---|---|---|---|
| MP4, MOV, 3GP/3G2, M4A/M4V, fragmented MP4 | ✓ demux, codec headers, native tags (udta, ilst, mdta, 3GPP, XMP, Nero chapters), common tags, basic facts |
✓ mux (moov-first/last, fragmented, CMAF), remux, trim/split/concat, faststart | ✓ common tags, udta, ilst, mdta keys, XMP uuid |
121 corpus files, 744,306 packets, 0 unexplained | 4.38 GB file with the index at the end: 165,681 B in 34 reads vs 1,741,689 B / 32 (ffprobe), 23,628,223 B / 138 (MediaInfo), 1,103,868 B / 139 (ExifTool) | docs/isobmff.md: edit-list repeats and drops, last-packet durations, negative composition offsets, fragmented durations are structural (no fragment scan) |
| Matroska, WebM (MKV, MKA, MK3D) | ✓ demux (seekable and live/forward-only), codec headers, tags with targets, attachments, basic facts | ✓ mux (seekable and live), remux, trim/split/concat | ✓ tags with targets | 92 corpus files, 464,934 packets, 0 unexplained | 4.45 GB file: 69,806 B in 20 reads vs 4,877,532 B / 16 (ffprobe), 72,168,087 B / 493 (MediaInfo), 79,600 B / 11 (ExifTool) | docs/matroska-differential.md: attachments are not streams, RealAudio is not de-interleaved, RealVideo timestamps as stored |
| MPEG-TS, M2TS/MTS (AVCHD), PS/VOB, elementary video (Annex B, MPEG-1/2, AV1 OBU), IVF | ✓ demux (seekable and forward-only), PSI/SDT/EIT names, AVCHD MDPM, codec headers | — | — | 149 corpus files, 54,785 packets, 0 unexplained (SDT-stripped copies for the pinned ffprobe) | 2.37 GB transport stream: 1,576,976 B in 4 reads vs 5,460,112 B / 170 (ffprobe), 17,402,896 B / 266 (MediaInfo), 509,424 B / 64 (ExifTool) | docs/mpeg.md: leading/trailing fragments, damaged-packet policy, DTS/Opus-in-TS not framed, AVCHD CPI/MPL sidecars listed not decoded |
| ASF, WMV, WMA | ✓ demux (seekable, forward-only), native asf tags in the common view, cover art, DRM files reported Protected (metadata only) |
— | ✓ Content Description, Extended Content Description (Metadata/Library objects not edited) | 55 corpus files, 82,454 packets, 0 unexplained (50 equal; 5 DRM files not demuxed, as designed) | 2.33 GB WMV: 36,950 B in 3 reads vs 5,079,040 B / 155 (ffprobe), 3,204,929 B / 51 (MediaInfo), 41,324 B / 8 (ExifTool). Media Foundation and Shell check on Windows 11 (18 ASF files): streams 62/67 agree (all 26 files, MP4 included), durations 24/25 exact, protection 18/18, samples 20/26 ASF streams equal with each difference explained (docs/asf.md) | docs/asf.md: written clean-room from public descriptions and observed files; WMA audio does not decode |
| MP3 (ID3v1/v2, APE, Lyrics3), ADTS AAC, AC-3/E-AC-3, AMR/AMR-WB files | ✓ demux, Xing/Info/LAME tags, priming and padding, native tags in the common view | — | ✓ ID3v2, ID3v1, APEv2 | 134 corpus files, 10,544,449 packets, 0 unexplained (2 free-format MP3 that ffprobe cannot open) | 2.2 GB MP3: 151,783 B in 12 reads vs 163,968 B / 5 (ffprobe), 147,616 B / 4 (MediaInfo), 96,159 B / 16 (ExifTool) | docs/audio-es.md: duration of streams without a frame count is an estimate; AC-3/E-AC-3 do not decode through .Audio |
| Ogg (Vorbis, Opus, FLAC, Theora, Speex), native FLAC | ✓ demux of all logical streams, chained files, Vorbis comments and FLAC blocks as tags, pictures | — | ✓ Vorbis comments, FLAC blocks (picture dimensions written as 0) | 72 corpus files, 246,857 packets, 0 unexplained | 2.2 GB FLAC: 69,666 B in 3 reads vs 229,376 B / 7 (ffprobe), 65,696 B / 2 (MediaInfo), 38,783 B / 8 (ExifTool) | docs/ogg.md, docs/flac.md, docs/vorbis-comment.md |
| FLV | ✓ demux (Enhanced FLV codecs), onMetaData tags |
— | — | 30 corpus files, 217,868 packets, 0 unexplained | 3.63 GB file: 69,632 B in 2 reads vs 2,228,087 B / 47 (ffprobe), 5,830,707 B / 115 (MediaInfo), 30,448 B / 5 (ExifTool) | docs/flv.md |
| AVI (OpenDML), DV | ✓ demux of AVI, OpenDML, DV in AVI and raw DV; LIST INFO and IDIT tags |
— | — (LIST INFO editing is not implemented) |
AVI 70 files, 164,648 packets, 0 unexplained; DV 14 files, 5,073 packets (ffprobe lists the audio inside DV frames as extra streams) | 4.65 GB OpenDML file: 172,065 B in 10 source reads (9 range requests over HTTP; 7 read system calls for a plain probe) vs 1,308,840 B / 29 (ffprobe), 11,416,591 B / 176 (MediaInfo), 71,408 B / 11 (ExifTool) | docs/avi.md, docs/dv.md: DV audio is not de-shuffled, so DV type 1 and raw DV have no audio track |
| WAV/BWF/RF64/W64, AIFF/AIFC, CAF | ✓ demux (PCM and compressed), LIST INFO, bext, iXML, ID3 chunks, cue points |
— | ✓ WAV/RF64 LIST INFO, bext, iXML, ID3 chunk; AIFF; not W64, CAF |
225 corpus files, 2,204,392 packets, 0 unexplained (222 equal; 3 NIST SPHERE files named .wav are not RIFF and not read) |
4.4 GB RF64 file: 4,216 B in 9 reads vs 884,816 B / 27 (ffprobe), 1,048,576 B / 16 (MediaInfo), 22,256 B / 5 (ExifTool) | docs/pcm-files.md: one AIFF-C layout (digit0v0.aiff) is misread as empty; .Audio does not decode PCM or ADPCM |
Bytes and request counts for every corpus file of every family, over HTTP range requests and local reads, are in docs/io-results.txt (method in docs/harness.md). Audio tracks of MP4/3GP equal OneAudio's own MP4 reader packet for packet (250,469 packets over 64 files). Tags and facts agree with ExifTool 13.60 and MediaInfo 26.10 on 116 files, with every difference explained in docs/tags.md; the field mapping is docs/tag-mapping.md. The audio adapter is described in docs/audio-adapter.md, the comparison method in docs/harness.md, and the benchmarks in docs/bench.md.
Every operation copies compressed data unchanged and streams in constant memory; each returns a report of what it dropped, changed or refused. Method and results are in the linked pages.
| Operation | What it does | How it was checked |
|---|---|---|
Mux (IsoMuxer, MatroskaMuxer; docs/muxing.md, docs/muxing-matroska.md) |
MP4/M4A/MOV/3GP/fragmented MP4/CMAF (moov-first, moov-last, fragmented, sidx, mfra, co64); Matroska and WebM (Cues, SeekHead, optional CRC-32, live mode). MPEG-TS and M2TS (docs/muxing-ts.md: PAT/PMT, PES with PTS and DTS, PCR, Annex B and ADTS repackaging, captions, teletext, DVB subtitles and timed ID3/SCTE 35 carried; written strictly forward, constant memory). Typed refusals for codecs a target cannot hold; TS refuses Opus and AAC whose layout is in a program config element, and writes a decode-order Matroska VFW H.264 track with PTS equal to DTS (limits in docs/muxing-ts.md); WAV, BWF and RF64 (docs/muxing-wav.md; one track, and the output must be able to seek; automatic RF64 past 4 GiB; bext, cart, iXML and INFO chunks) |
Output packets read back through ffprobe 7.0.2 (size, hash, times, flags), MP4Box -info, mkvalidator 0.6.0; a 4.38 GB MP4 written in 64 MB |
Remux (Media.Remux; docs/remux.md) |
Any readable file into MP4, M4A, MOV, 3GP, fMP4, CMAF, Matroska, WebM, MPEG-TS, M2TS or WAV/BWF/RF64 (one audio track); Annex B to avcC/hvcC, ADTS to raw AAC; track selection and language/disposition/rotation edits; carries tags and pictures; a RemuxReport lists everything that did not carry over |
MP4: 698 files, 962,615 packets, 0 differences (284 files a target cannot hold are refused with a reason); Matroska: 647 files, 1,301,013 packets, 419 differences all in one AVCHD file whose declared field rate disagrees with its picture spacing; WebM: 47 files, 0 differences |
Faststart (Media.Faststart) |
Moves the movie box in front of the media data of a progressive MP4/MOV/3GP, every other byte unchanged | moov-first output, packets equal to the input's, plays in Chromium |
Trim, split, concat (Media.Trim, Split, Concat; docs/trim.md) |
Frame-accurate (edit list hides lead-in frames) or keyframe-only; split on keyframes; join of matching tracks, refused with NeedsReencode otherwise |
ISO: 288 of 288 trims equal in decoded frame MD5, first frame at 0 and audio to the sample (+15 on other layouts); Matroska: 172 trims equal, 116 frame-accurate H.264/HEVC cuts refused by design (ffmpeg-based players cannot play the lead-in); 5.06 GB trim at 50.6 MB peak (ISO) and 78.5 MB (Matroska) |
CanPlay(profile) (docs/playability.md) |
Verdicts per mode with typed blockers for Chrome, Chromium, Firefox, Safari, WebKit on Linux, iOS Safari, Android Chrome and generic MP4, as static data | 5 profiles x 91 observations (75 files, 16 also through MediaSource) played in Chromium 140, Firefox 141 and WebKit 26: OneMedia's prediction equals what was observed in all 455. Safari, iOS and Android rows rest on published codec guides, not on those devices |
MakePlayable (docs/make-playable.md) |
Faststart or remux into a container the profile plays; audio re-encoded (through .Audio and OneAudio 1.7.0) to Opus, AAC-LC or FLAC, whichever the profile prefers, when that is the only other blocker; video blockers reported with codes |
Matrix 75 files and a 48-file corpus sample in three browsers: every written output plays except one WebKit input that plays no better un-copied; untouched streams 91, 0 unexplained; a 1.13 GB MKV to WebM and Opus at 92 MB peak. With AAC and FLAC targets the generic MP4, Safari and iOS Safari profiles make files they used to refuse: for the generic MP4 profile the matrix goes from 11 made and 55 refused to 30 made and 36 refused, all 39 outputs play in Firefox 141, and 14 of 14 generated audio files are made and play; the Safari and iOS Safari profiles get AAC where they got Opus, played in WebKit 26 (docs/make-playable.md). Real Safari and Chrome on devices were not run; channel counts above two are not covered. WMA, AC-3, E-AC-3 and ALAC have no decoder and are refused |
Tag editing (CommonTags setters, TagEdits, onemedia tags; docs/tag-writing.md) |
Common-view and native edits in the systems in the table, with a write-back report | 445 untouched round trips byte-identical; payload hash unchanged across sweeps of 8 families; reads back in ExifTool and ffprobe. Review and its findings: docs/writer-review.md |
| Feature | What it does | How it was checked, and what was not |
|---|---|---|
Capture facts as evidence (media.CaptureTime, Location, Device; IFactResolver; docs/facts.md) |
Every candidate keeps its source, raw value, time-zone certainty and byte range; a documented precedence picks the best; the resolver is replaceable; device profiles are data; embedded Exif; XMP, Sony clip XML and DJI SRT sidecars count as evidence | Checked against ExifTool 13.60 and MediaInfo 26.10 on 193 freely licensed device recordings (iPhone, Pixel and other Android phones, GoPro, DJI, AVCHD and Sony camcorders, Nikon/Olympus/Canon/Panasonic/Fujifilm compact cameras, screen recorders; docs/device-corpus.md): capture time with zone certainty 189 of 189, location presence 18 of 18, rotation 128 of 128, Make 129 and Model 84 matched, plus published samples and files I generate. Not covered: Samsung phones, iPhone Dolby Vision, spatial and slow-motion video, Sony XAVC, dashcam originals; treat the zone rules for devices not in the corpus or the device profiles as unverified |
Telemetry (MediaFile.Telemetry; GoPro GPMF, Google CAMM, QuickTime mebx, DJI text and djmd, AVCHD MDPM GPS; docs/telemetry.md) |
Typed per-sample channels (GPS, accelerometer, gyroscope, orientation, camera settings, raw items with byte ranges), pulled without allocating per sample | 10 published GoPro clips (HERO5 to HERO8, Fusion, MAX, Karma) against ExifTool (equal counts, values within 1e-13) and against GoPro's own gpmfdemo release binary (every key equal after the axis remap); CAMM and mebx fixtures against ExifTool and ffprobe. Not compared value by value: HUES, FACE, SCEN, MFGI, VPTS. CAMM time_gps_epoch is read as the GPS time scale, ExifTool reads Unix time, and no real CAMM device file was available to settle it. Real device recordings (docs/device-corpus.md): a GoPro HERO10 (every GPMF stream equal to ExifTool and gpmfdemo), a DJI Osmo Pocket 3 (djmd, 40 of 40 samples equal to ExifTool) and iPhone mebx (counts equal to ExifTool); one recording each, so other DJI protocols rest on the tag documentation |
Privacy strip (Media.StripLocation, Media.StripDeviceIds, onemedia strip; docs/strip.md) |
Strips the location and device identifiers listed in docs/strip.md and names in its report everything else it found and has no rule for (vendor boxes, chunks and objects, opaque values, pictures with metadata, data tracks, trailers). It does not search free text. New file by default; ISO files keep their layout; media payload bytes unchanged | The project's own review, not an external audit (docs/strip-review.md): 10 GoPro files stripped to 0 position or serial bytes (two coincidental 4-byte hits in accelerometer data) and 20 of 20 audio/video payload hashes identical; on a 65-file adversarial set 39 files were fully clean and 26 still held a secret in a form the strip does not look for (free text, unlisted names, unread placements, two cases it now reports); 0 outputs worse than their input in ffprobe 7.0.2 and MP4Box 26.07. Do not rely on it as proof that a file is clean |
Capture-date writes (Media.SetCaptureTime, onemedia tags --capture-time; docs/date-writes.md) |
Sets the recording time in every date field a file carries, each in its own notation and zone, with a report of what was written, what was left and which dates still disagree | Read back in ExifTool 13.60, MediaInfo 26.10 and ffprobe 7.0.2. Windows Explorer and Photos (Windows 11) and macOS AVFoundation were checked: they show the mvhd date, not ©day or Apple's creationdate. Apple Photos and Google Photos display checks are pending (they need a GUI session and an account) |
Timed events (MediaFile.Events, onemedia events; docs/events.md) |
tmcd timecode with exact SMPTE mapping, SCTE 35 splice information in MPEG-TS and emsg, timed ID3 in MPEG-TS and emsg |
tmcd equals ffprobe's timecode tag on 24 ffmpeg-written files and their remuxes; SCTE 35 equals TSDuck 3.44 on a generated stream (11 sections) and a real capture (18 sections); timed ID3 in TS equals ffprobe packets on 6 of 6; emsg equals MP4Box on 4 of 4. The SCTE 35 standard needs an account and was not available, so the section layout rests on public descriptions and TSDuck's output; ffprobe 7.0.2 shows the SCTE 35 stream with no packets, so it cannot be a packet oracle |
Media.Repair(input, output[, reference]) and onemedia repair <in> <out> [--reference <file>] write a new file and return a RepairReport (status, every structure rebuilt, fixed, dropped or guessed with its input byte range and a confidence, per-track packets kept and dropped, warnings). The input is never modified, payload bytes are copied unchanged, and a healthy file is reported NothingToRepair.
| Case | What it does | Limits |
|---|---|---|
| Damaged index of Matroska/WebM, AVI/OpenDML, MP4/MOV, fragmented MP4, MPEG-TS (docs/repair.md) | Rebuilds SeekHead, Cues, durations and cluster sizes (Matroska); idx1, OpenDML indexes and counts (AVI); stco/co64, durations and a cut-off mdat (MP4); mfra, mehd and a single sidx (fMP4); drops damaged PES packets and renumbers continuity counters (TS) |
Checked on damaged variants made from healthy files (Matroska 17, AVI 16, MP4 13, fragmented MP4 14, TS 12 per source file) against ffprobe 7.0.2, with packets compared. A TS file cut at 90 % keeps one cut frame (observed in two sweep cases; see the limits in docs/repair.md). M2TS (192-byte packets) has no oracle sweep: ffmpeg 7.0.2 crashes on those files. ASF, FLV and Ogg are not repaired |
| Truncated MP4/MOV/3GP, movie box missing or cut (docs/reconstruction.md) | Walks the media data and cuts it into samples with the codecs' own framing (H.264, HEVC, AV1, AAC, AMR, MP3, AC-3, PCM, GoPro metadata); writes the playable prefix, with each track's confidence and the input ranges its samples came from | PCM audio, and video without in-stream parameter sets, need a reference file from the same device. 5.1 AAC is dropped (the frame probe does not take more than two channels). Without a reference the AAC sample rate is a guess (44.1 kHz first) and the track is reported at Low confidence; audio times may then be off. AAC through the happy path needs the .Audio entry AacReconstructionProbe.Repair or the CLI; Media.Repair in the core package has no AAC probe. Irregular frame durations of the original cannot be told from the stream. Fragmented files and an mdat split into several boxes are walked only up to the first mdat |
Checked on generated files, published samples, 10 GoPro clips and 12 device models from the device corpus (docs/device-corpus.md: iPhone, Pixel, Xiaomi and another Android phone, a Sony camcorder, Nikon, Olympus and Canon compact cameras; each cut at 60 % and rebuilt with no reference, a recording of the same model and the file itself). With a reference, every recovered sample's bytes and key flags equal the original's except one PCM packet at a cut (Pixel AAC with another recording as reference recovers 348 of 348 packets since 1.0.1); without a reference only files with parameter sets in the stream recover, and the others are refused with a request for a reference. Cut-off copies were made at 11 cut points of healthy files (some with the mdat size field or the moov zeroed), reconstructed with and without a reference, and compared with the original's packets (bytes, key flags, times) and ffmpeg 7.0.2 and MP4Box 26.07; the method is in docs/reconstruction.md. Real device recordings may have layouts the framing rules do not cover.
Media.PackageHls, Media.PackageDash, Packager and onemedia package cut a file (or, live, a forward-only stream) into CMAF segments (HLS also as transport-stream segments) with HLS media and multivariant playlists and a DASH MPD, as video on demand or live with a sliding window, one file per segment or one per track with byte ranges, a bit-rate ladder from several inputs, WebVTT subtitle renditions and timed events. The playlists and manifests are public models (HlsPlaylist, DashMpd) that read and write. PresentationSource and Media.Open read a local HLS playlist or DASH manifest as one media file, and GrowingFileSource reads fragmented MP4, live Matroska, MPEG-TS and FLV while they are written (docs/packaging.md, docs/streaming-sources.md).
Limits, and what checked it:
- No validator has passed the output. Apple
mediastreamvalidatorwas not run (it needs an Apple ID sign-in). The DASH-IF conformance tool v3.1.0 ran once (two findings, both fixed) and then fails in its own base-URI handling on every run. - What did check it: packet equality with the input through ffprobe (28 CMAF and 19 transport-stream inputs, 0 unexplained), TSDuck continuity on 38 of 38 transport-stream segment sets, and playback in hls.js 1.7.4 and dash.js 5.2.1 in Chrome 155, Firefox 141 and Playwright WebKit 26 (one failure: HEVC in transport-stream segments through hls.js in Chrome, not investigated) plus native HLS in macOS WebKit (7 of 7).
- Packaging: encryption is not written; live mode takes one input and holds the current segment in memory (a 2-hour soak plateaued at 106 MiB; a 10-minute real-time run stayed under 73 MiB).
- Sources: live DASH is not reloaded; HLS subtitle renditions are not read; a segment is held whole in memory, up to
MediaLimits.MaxSegmentBytes(256 MiB); segments underEXT-X-KEYorContentProtectionare reportedProtectedand not decrypted; a progressive MP4 withmdatfirst cannot be read until it is finished. Packet-equal to ffprobe 8.1.3 on 34 generated presentations except for documented ffprobe behaviours.
One cue model (SubtitleDocument, exact MediaTime, styling spans, placement, word timing, bitmap images) with conversions that return a loss report, Subtitles.Read/Write/Convert, MediaFile.Subtitles (one list across container tracks, teletext pages, CEA-608 channels and CEA-708 services), and onemedia subs. Reading the container tracks costs no media reads; finding teletext and captions reads the video once on first access (docs/subtitles.md). Speed: subtitle parse and convert at 20,000 and 100,000 cues, against SubtitlesParser and Subtitle Edit's library, come out, in the 0.8 run, at a geometric mean of 0.53× for parsing and 0.40× for conversion on x64 (0.51× and 0.42× on arm64) of the fastest comparator, worst row 1.16× (x64, SRT at 100,000 cues) and 1.07× (arm64); SRT and large ASS parsing are close to Subtitle Edit's time, not ahead (x64, arm64; the earlier 0.5 run is in 0.5-x64 and 0.5-arm64). The CTA-608/708 and SCTE 35 standards were not available (they need an account): caption parts rest on the ATSC A/53 and A/72 documents, the US regulation 47 CFR 79.101 and black-box ccextractor and ffmpeg output, and the open points are listed in docs/captions.md.
| Format | Read | Write | Checked against, and agreement | Documented deviations and gaps |
|---|---|---|---|---|
| SRT, WebVTT, ASS/SSA, LRC sidecars | ✓ | ✓ with a loss report (fidelity table) | ffmpeg 7.0.2: its output read by OneMedia's reader and OneMedia's output converted by it, compared as cues; WebVTT also loaded as <track> in Chromium 140, Firefox 141 and WebKit 26 and the cues read back |
ASS/LRC are rounded to 10 ms; LRC has no end time, and enhanced word tags are word timing for OneMedia and text for ffmpeg; ffmpeg shows ruby inline |
| TTML/DFXP/IMSC1 text, SBV | ✓ | ✓ | no oracle reads them: round trips only | written as the IMSC1 text profile; no image profile |
Container text tracks: tx3g, QuickTime text, wvtt, stpp, Matroska SRT/ASS/WebVTT |
✓ (without reading media data to list them) | ✓ in MP4/MOV and Matroska, with losses reported on remux | files written by ffmpeg 7.0.2, MP4Box 26.07 and mkvmerge 103.0 read back; WebKit 26 lists and loads tx3g, wvtt and Matroska SRT tracks, Chromium and Firefox expose no in-band text tracks |
ISO/IEC 14496-30 is not available: the order of vttc children, vsid, ctim for split cues and sample-relative times in stpp are open (docs/text-tracks.md); ffmpeg 7.0.2 cannot mux wvtt in MP4 |
CEA-608/708 in H.264, HEVC and MPEG-2 video, c608 tracks; SCC sidecar |
✓ | SCC ✓; captions written back into H.264/HEVC SEI on remux (CaptionSeiFeed); passed through on remux |
ccextractor 0.96.6 release binary (banner 0.96.5) and ffmpeg 7.0.2, on six published PixelTools MPEG samples and generated files; the special-character table checked against both | oracles date an SCC pop-on caption at its line's timecode, OneMedia at the end-of-caption pair; roll-up windows are emitted per scroll by OneMedia and once full by ccextractor; ccextractor does not read HEVC SEI captions; 708 window and pen semantics rest on oracle output alone; the SCTE 20 layout is read from sample bytes; the SCTE 20 and SCTE 128 documents were not used; TS caption muxing is in the MPEG-TS writer and WebVTT subtitle segments are written by packaging |
| DVB teletext subtitles (MPEG-TS, PS) | ✓ | — | 8 real DVB captures, 75 (file, PID, page) tracks: against ccextractor 0.96.5 on 51 tracks, 132 cues equal in text and start (OneMedia 148, ccextractor 146), starts within 1 ms, ends within one frame; ffmpeg 8.0.1 on one Polish multiplex: 15 cues against OneMedia's 23, 10 matched by text | ccextractor writes junk for mosaic cells and garbles Polish and Cyrillic pages; one G0 set only, no mosaics, DRCS or X/27 links; ffmpeg 7.0.2 crashes on teletext in TS, so ffmpeg 8.0.1 stood in; PS carriage exercised with generated streams only |
Bitmap subtitles: PGS (.sup, Matroska, M2TS), VobSub/DVD (.idx/.sub, Matroska, VOB), DVB subtitles in TS |
✓ decoded to RGBA with position and timing | — | crafted streams re-wrapped by ffmpeg and mkvmerge: DVD pictures 3 of 3 pixel-identical, PGS and DVB 3 of 3 within 1 level per channel; published samples: PGS 1 of 1 and VobSub 3 of 3 pixel-identical, a 685-event idx/sub with all times, alpha and geometry equal | no CLUT in SubTitleHD.ts: OneMedia uses the standard default CLUT and ffmpeg renders those pixels differently (not settled); DVB CLUT entry 0 is transparent for OneMedia and black for ffmpeg; PGS cropping is inferred; an idx without a palette line uses a grey ramp; no OCR |
Timed events. See the metadata table above: tmcd, SCTE 35 and timed ID3 are read, and tmcd tracks are carried by remux between MP4 and MOV; emsg boxes are reported as not written.
Saving. Save() writes a temporary file and renames it over the original: 500 kill -9 rounds left no half-written target. Power loss has not been tested. It makes a new file: new inode, the saver's owner and group, and the original's extended attributes, ACLs and hard links are not kept. SaveAs writes a new file. SaveInPlace works only inside existing padding (free, skip, Void, ID3 or FLAC padding) and otherwise refuses with PaddingRequired and the file untouched; it is not atomic (300 kill rounds: 3 torn with the current two-pass writer, 7 with the first version).
Removed tag values and leftovers. On 0.3.0-preview.1, removing the last frames of an ID3v2 tag in place removed nothing: the frames stayed in the file as valid frames that readers still showed. 0.3.0-preview.2 fixed the removal, but saving an already affected file again did not remove the frames. From 0.3.0-preview.3, any save of an MP3 (Save, SaveAs, SaveInPlace, with edits or none) also zeroes leftover bytes and frames in the ID3v2 padding, a safeguard: I know of no sequence of calls in preview.1 or preview.2 that leaves removed values there. onemedia tags <file> --check (TagWriter.CheckResidue) reports such leftovers without printing them; it does not look at fields still in the tag. A field that preview.1 failed to remove is still an ordinary frame of the tag, which no version can tell from one you want to keep: open the file with this version, remove those fields again, save, and run onemedia tags <file> --check --absent comment,composer, which exits 1 and names each listed field still present in any tag system.
Known limits. Writing ASF is not implemented; the MP4 muxer writes one sample description per track, so joining files with different codec setups is refused; the Matroska muxer does not carry AAC priming, rotation, interlace or stereo mode; the Matroska trim drops tags, chapters and attachments; a common Date write keeps other date tags in the file and says so in TagWriteReport.Warnings (Media.SetCaptureTime writes every date field); editing ASF Metadata/Library objects, XMP outside ISO files, W64 and AVI is not implemented.
Writer limits fixed in the 0.3 previews (docs/writer-review.md section 6, docs/writer.md). Padding is generated as zero runs and an in-place save writes only the bytes that changed: a 3-byte ID3 title edit in a tag with 200 MiB of padding allocates 138 KB and writes 3 bytes (before: 419.5 MB and 209.7 MB), and SaveAs tag edits of files over 4 GB peak at 46 to 53 MiB. A growing edit leaves 1,024 bytes of padding so the next edit can be saved in place (TagWriteOptions.Minimal turns that off). Temporary files carry a recognisable name and stale ones are removed on the next save. SaveInPlace kill tests: 3 torn files in 300 rounds, which is why it stays documented as not atomic. What is tested for Save is kill -9 (500 rounds, 0 corrupt targets); a power loss is not tested. The file is fsynced before the rename, but the folder cannot be (the .NET base library cannot flush a directory), so after a power loss the rename may not be durable and the old name may still point at the old file.
Speed against the fastest managed library per task (ratio = OneMedia time ÷ theirs, steady state, median; lower is better). The 0.8 run covers every row below on both machines, as exclusive bench jobs; full tables with allocations, peak memory, first-open times and the native tools' times are in docs/bench-results/0.8-x64.md and 0.8-arm64.md, the method in docs/bench.md.
| Task | Compared with | x64 (Ryzen 9 7950X3D) geomean / worst file | arm64 (Apple M2) geomean / worst file |
|---|---|---|---|
| MP4 demux, every packet | SharpMP4 | 0.10× / 0.23× | 0.08× / 0.19× |
| MP4 audio track only | OneAudio Mp4PacketSource |
0.47× / 0.72× | 0.51× / 0.56× |
| MP4 probe (tracks, duration) | MetadataExtractor, TagLib#, ATL.NET | 0.11× / 0.42× | 0.12× / 0.28× |
| Matroska demux | Matroska (NEbml) | 0.26× / 0.38× | 0.25× / 0.33× |
| Matroska probe | NEbml element reader | 0.71× / 0.88× | 0.56× / 0.72× |
| MP3 tags (ID3v1/v2, APE) | TagLib#, ATL.NET | 0.50× / 0.63× | 0.61× / 0.87× |
| FLAC and Ogg tags | TagLib#, ATL.NET | 0.56× / 0.78× | 0.73× / 1.13× |
| ASF/WMA tags | TagLib#, ATL.NET | 0.56× / 0.65× | 0.72× / 0.94× |
| WAV/AIFF/CAF open and tags | TagLib#, ATL.NET | 0.51× / 0.74× | 0.61× / 0.88× |
| AVI probe | MetadataExtractor, TagLib# | 0.52× / 0.67× | 0.57× / 0.69× |
| MP4 mux (AAC track, in memory) | SharpMP4 | 0.15× / 0.35× | 0.09× / 0.18× |
| MP4 remux (AAC track) | SharpMP4 | 0.12× / 0.20× | 0.09× / 0.17× |
| ID3 tag write | TagLib#, ATL.NET | 0.33× / 0.37× | 0.30× / 0.35× |
| FLAC tag write | TagLib#, ATL.NET | 0.33× / 0.39× | 0.32× / 0.32× |
MP4 ilst tag write |
TagLib#, ATL.NET | 0.50× / 0.57× | 0.34× / 0.37× |
| WAV tag write | TagLib#, ATL.NET | 0.58× / 0.66× | 0.37× / 0.38× |
| Matroska tag write (one file; the comparators fail on the other) | TagLib# | 0.90× / 0.90× | 0.76× / 0.76× |
| Subtitle parse (SRT, WebVTT, ASS, TTML; 20,000 and 100,000 cues) | SubtitlesParser, Subtitle Edit core (bench only) | 0.53× / 1.16× | 0.51× / 1.07× |
| Subtitle convert (SRT to WebVTT, ASS, TTML) | Subtitle Edit core | 0.40× / 1.14× | 0.42× / 0.90× |
Over all 91 (x64) and 84 (arm64) per-file and per-workload ratios the geometric mean is 0.39× and 0.40×; the worst single ratios are 1.16× (x64, SRT parse at 100,000 cues) and 1.13× (arm64, one Ogg file). The arm64 machine reported a one-minute load average of 3 to 6 on its 8 cores while its queue was empty (macOS counts system activity); the figures are recorded in each table. Readers with no managed comparator (MPEG-TS/PS, ASF, AVI and FLV demux, index repair, HLS packaging, Matroska mux) have their absolute times in the same tables and pass. ATL.NET cannot read AVI and TagLib# cannot read CAF, so those files have no ratio against them.
Reading pulls packets with zero allocations per packet on every reader measured (41 files, 24 readers; the owned-path figure is 24 bytes per packet), and the working set stays flat from a small file to one past 4 GiB for demux, remux, repair and tag edits (peak 35–85 MiB); packaging peaks at 112–130 MiB on the two 4 GiB test files at 6 s segments (it follows the segment size, about 29 MiB plus 2.5 times the largest segment, and is bounded by MediaLimits.MaxSegmentBytes, not by the file size; it was 173–189 MiB before 0.8 closed). Tables: docs/bench-results/0.8-allocations-memory-io.md.
The first open in a process includes JIT time: about 17–25 ms for MP4 and 12–17 ms for Matroska, against about 8–50 ms and about 3 ms for those libraries (each table lists it per file).
Real-device recordings (docs/device-corpus.md): 193 freely licensed recordings from phones, action cameras, drones, camcorders, compact cameras and screen recorders, compared with ffprobe, ExifTool and MediaInfo. Still open (docs/device-corpus.md): the Olympus MOV1/MOV2 layouts (no sample) and the device classes not yet covered (Samsung phones, iPhone Dolby Vision, spatial and slow-motion video, Sony XAVC, dashcam originals, more GoPro and DJI telemetry). 1.0.1 fixed what the corpus showed in 1.0.0: strip now removes the serial number from DJI djmd samples of protocols outside the table of known layouts (the Osmo Pocket 3 recording carried a serial number and no position there), telemetry tracks no longer set the file duration, the AAC channel count follows the decoder configuration, a Pixel recording reconstructs with a sibling reference, leading pictures survive reconstruction of Nikon D5300 and Olympus TG-4 files, and Fujifilm AVI and Panasonic firmware fields are read. 1.0.2 fixed a privacy gap that 1.0.1 left: strip now removes the camera serial number from the strd chunk of a Fujifilm AVI (1.0.1 left it and its report did not say so), and the report names every vendor box, chunk, object, data track and trailer it has no rule for, so nothing is skipped silently (docs/strip.md).
Gaps in this table, stated plainly. Probe and metadata reads of transport streams stop their search for program tables at 6 MB: the four unusual streams that used to read up to 25 MB of a 30 MB file now read 6.3 to 7.1 MB (most: foxksaz.ts, 7,080,536 B in 26 requests of its 30.5 MB; ffprobe reads 6.0 to 14.3 MB on the same files), and the median transport stream is 476,352 B in 3 requests (docs/io-results.txt, docs/mpeg.md). Probing an AVI makes 7 to 9 read calls on the file instead of 85 to 94 (the 0.8.0-preview.1 change notes said 48; that figure was wrong) and over HTTP the median AVI probe is now 114,509 B in 9 requests (before: 4,559 B in 32), about 172 KB in 9 requests for the 4.65 GB OpenDML file; fewer round trips cost more bytes. The arm64 numbers were taken on the Mac mini that has no multi-gigabyte corpus files and no MPEG transport streams, so its MPEG and over-4 GiB rows are absent.
Every parser is fuzzed (600 seconds per target when its code last changed; for this release the targets whose code changed since 0.6.0-preview.1, the manifest and presentation targets among them, were run again for 600 seconds, no open crash); damaged input is reported as typed defects with byte offsets and never surfaces as an untyped exception. Reading pulls packets with zero allocations per packet and constant memory at any file size.
One page per tool maps its common calls or flags to OneMedia calls and lists the behaviour differences (typed defects, evidence lists,
lossless writes, reports). No shims. Every snippet is compiled and run by samples/OneMedia.Samples, which also holds the happy-path
tasks, one or two lines each.
| Package | What it is |
|---|---|
RecursiveAI.OneMedia |
the library; depends on nothing but .NET |
RecursiveAI.OneMedia.Audio |
adapter that hands audio tracks to OneAudio; depends on the core package and RecursiveAI.OneAudio |
RecursiveAI.OneMedia.Tool |
the onemedia command-line tool (dotnet tool install) |
Target framework is net10.0. The library is NativeAOT, trimming and browser-WebAssembly clean.
dotnet build -c Release
dotnet test -c Release
dotnet pack -c Release
To run part of the suite, use the runner's own filters, for example dotnet test --project tests/OneMedia.Tests -c Release --filter-class '*XiphFlvTests' (also --filter-method, --filter-namespace with a full name, --filter-query). The VSTest-style --filter is not understood by this runner: dotnet test then reports "Handshake failures" and exit code 5 with zero tests.
Build output goes to artifacts/ in the repository root (ignored by git). To build somewhere else, set ONEMEDIA_SCRATCH to a directory; output then goes to $ONEMEDIA_SCRATCH/artifacts. Test files are written under the system temporary directory (TMPDIR).
smoke/OneMedia.AotSmoke is published with NativeAOT and fails on any trim or AOT warning; smoke/OneMedia.WasmSmoke runs the same checks under the browser-wasm runtime (wasm-tools workload; run the built AppBundle/main.mjs with node), and tests/OneMedia.Tests.Browser runs the unit-test suite in headless Chromium (tools/wasm-suite/run.sh, docs/platforms.md). tools/ holds the differential and I/O harness and the corpus scripts, fuzz/ the fuzz targets and bench/ the benchmarks; none of them ship.
- Clean room: the code is written from published specifications and from observing the behaviour of other tools as black boxes. The source of other media libraries and tools is not consulted.
- Every public type and member has an XML doc comment; warnings are errors.
unsafecode,Unsafe.*,MemoryMarshaland intrinsics are not used.
MIT OR Apache-2.0, at your option. Copyright (c) Recursive AI, LLC. See LICENSE-MIT and LICENSE-APACHE. Test media provenance and third-party notices are in THIRD-PARTY-NOTICES.md.