Skip to content

Commit

Permalink
v0.7.18: support H.265
Browse files Browse the repository at this point in the history
There's no transcoding, so if the browser/player doesn't support these
formats, they don't play. But it will record and allow downloads, and
it seems to be working with Chrome on macOS at least.

Fixes #33
  • Loading branch information
scottlamb committed Jan 28, 2025
1 parent dd30d5b commit b4836f3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ upgrades, e.g. `v0.6.x` -> `v0.7.x`. The config file format and
[API](ref/api.md) currently have no stability guarantees, so they may change
even on minor releases, e.g. `v0.7.5` -> `v0.7.6`.

## unreleased
## v0.7.18 (2025-01-28)

* support recording H.265 ([#33](https://github.com/scottlamb/moonfire-nvr/issues/33)).
Browser support may vary.
* bump minimum Rust version to 1.82.
* improve error message on timeout opening stream.
* use `jiff` for time manipulations.
Expand Down
26 changes: 12 additions & 14 deletions server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ members = ["base", "db"]

[workspace.dependencies]
base64 = "0.22.0"
h264-reader = "0.7.0"
h264-reader = "0.8.0"
itertools = "0.12.0"
jiff = "0.1.8"
nix = "0.27.0"
Expand Down Expand Up @@ -62,7 +62,7 @@ password-hash = "0.5.0"
pretty-hex = { workspace = true }
protobuf = "3.0"
reffers = "0.7.0"
retina = "0.4.11"
retina = "0.4.12"
ring = { workspace = true }
rusqlite = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion server/db/upgrade/v5_to_v6.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
)
})?;
let sps = ctx
.sps_by_id(h264_reader::nal::pps::ParamSetId::from_u32(0).unwrap())
.sps_by_id(h264_reader::nal::sps::SeqParamSetId::from_u32(0).unwrap())
.ok_or_else(|| {
err!(
Unimplemented,
Expand Down
6 changes: 4 additions & 2 deletions server/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fn params_to_sample_entry(
.with_aspect_ratio(aspect)
.build()
.map_err(|e| err!(Unknown, source(e)))?,
rfc6381_codec: "avc1.4d401e".to_string(),
rfc6381_codec: params.rfc6381_codec().to_owned(),
width,
height,
pasp_h_spacing: aspect.0,
Expand All @@ -192,7 +192,9 @@ impl RetinaStreamInner {
let video_i = session
.streams()
.iter()
.position(|s| s.media() == "video" && matches!(s.encoding_name(), "h264" | "jpeg"))
.position(|s| {
s.media() == "video" && matches!(s.encoding_name(), "h264" | "h265" | "jpeg")
})
.ok_or_else(|| {
err!(
FailedPrecondition,
Expand Down

0 comments on commit b4836f3

Please sign in to comment.