Skip to content

feat(media): read Dahua DVR .dav recordings through FFmpeg - #665

Merged
KnifeLemon merged 2 commits into
mainfrom
formats/dav
Oct 27, 2026
Merged

KnifeLemon merged 2 commits into
mainfrom
formats/dav

Conversation

@KnifeLemon

@KnifeLemon KnifeLemon commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

What does this change?

Adds .dav (Dahua and similar DVR / NVR recordings) as a read-only video format. FFmpeg's dhav demuxer reads it; probing finds the DHAV chunks on its own, so no -f dhav is needed. It converts to every video and audio target like the other read-only containers (.usm, .m4s). Settings schema 50 teaches existing video donuts .dav (custom claims stay put). README format counts go from 266 to 267.

Schema 49 went to the text extensions in #663, so this takes 50.

Closes #594

Type of change

  • Bug fix
  • New feature or improvement
  • New format or engine
  • Translation
  • Documentation
  • Build, CI or dependencies

How was it tested?

  • dotnet format --verify-no-changes
  • dotnet test (Filee.Core.Tests: 634 passed, 3 skipped; the DAV / M4S / USM tests in MediaTests pass with Filee's FFmpeg 9.0.2 installed)
  • Tried it with the reporter's sample (Dahua, H.264 1920x1080 25 fps + AAC 16 kHz mono, 5 s) on Windows 11: ffprobe reports format dhav, and filee-cli convert … --to mp4 made an MP4 with all 120 video frames and the sound (video copied, 5.72 s). The sample is not in the repo.

New tests:

  • DavFormatTests (Core): .dav is detected as read-only video on the video donut; schema 49 → 50 adds it once.
  • MediaTests.Dav_recordings_are_read_but_never_written: route dav → mp4 is one FFmpeg step, nothing converts to dav.
  • MediaTests.A_dahua_dav_recording_converts_to_mp4: FFmpeg has no DHAV muxer, so the test writes a DHAV recording from FFmpeg-made H.264 frames and G.711 A-law sound, checks ffprobe sees dhav, then converts it to MP4 (H.264 160x120, 50 frames, AAC, ~2 s). Skipped without FFmpeg, like the other conversion tests.

Screenshots (UI changes)

None, no UI changes.

Checklist

  • New UI strings are in all src/Filee.App/Assets/i18n/*.json files (no new UI strings)
  • New third-party code or binaries are listed in THIRD-PARTY-NOTICES.md (none added)
  • The PR does one thing (unrelated changes go in a separate PR)

🤖 Generated with Claude Code

.dav is a read-only video format, read by FFmpeg's dhav demuxer (found by the
DHAV chunks, no -f needed) and converted to every video and audio target. A
reporter's Dahua recording (H.264 1080p + AAC) probes as dhav and converts to
MP4. Settings schema 49 teaches existing video donuts .dav.

The engine test builds a DHAV recording from FFmpeg-made H.264 and A-law
sound, since FFmpeg has no DHAV muxer; no sample file is committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the feature New features label Oct 27, 2026
…tensions (#663)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KnifeLemon added a commit that referenced this pull request Oct 27, 2026
…schema 51

Schema 49 is #663's text extensions on main and 50 is kept for #665 (.dav), so the
"Edit pictures" step is now v51.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon
KnifeLemon merged commit 3f790fb into main Oct 27, 2026
8 checks passed
KnifeLemon pushed a commit that referenced this pull request Oct 27, 2026
Schema 50 is .dav (#665) on main now; Edit pictures stays v51.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0164CyGuw3uFmErecYsXqr26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Format]: .dav

1 participant