switch default RTSP library to retina

This commit is contained in:
Scott Lamb 2021-06-28 16:38:21 -07:00
parent 7034480cfe
commit 5be69baaa6
3 changed files with 25 additions and 8 deletions

View File

@ -6,6 +6,12 @@ changes, see Git history.
Each release is tagged in Git and on the Docker repository Each release is tagged in Git and on the Docker repository
[`scottlamb/moonfire-nvr`](https://hub.docker.com/r/scottlamb/moonfire-nvr). [`scottlamb/moonfire-nvr`](https://hub.docker.com/r/scottlamb/moonfire-nvr).
## unreleased
* Moonfire NVR defaults to a new pure-Rust RTSP library, `retina`. If you
hit problems, you can switch back via `--rtsp-library=ffmpeg`. Please report
a bug if this helps!
## `v0.6.3` ## `v0.6.3`
* New user interface! Besides a more modern appearance, it has better * New user interface! Besides a more modern appearance, it has better

View File

@ -11,6 +11,7 @@ need more help.
* [Camera stream errors](#camera-stream-errors) * [Camera stream errors](#camera-stream-errors)
* [Problems](#problems) * [Problems](#problems)
* [Server errors](#server-errors) * [Server errors](#server-errors)
* [Problems reading video from cameras](#problems-reading-video-from-cameras)
* [`clock_gettime failed: EPERM: Operation not permitted`](#clock_gettime-failed-eperm-operation-not-permitted) * [`clock_gettime failed: EPERM: Operation not permitted`](#clock_gettime-failed-eperm-operation-not-permitted)
* [`Error: pts not monotonically increasing; got 26615520 then 26539470`](#error-pts-not-monotonically-increasing-got-26615520-then-26539470) * [`Error: pts not monotonically increasing; got 26615520 then 26539470`](#error-pts-not-monotonically-increasing-got-26615520-then-26539470)
* [Out of disk space](#out-of-disk-space) * [Out of disk space](#out-of-disk-space)
@ -85,14 +86,18 @@ Moonfire NVR names a few important thread types as follows:
* `main`: during `moonfire-nvr run`, the main thread does initial setup then * `main`: during `moonfire-nvr run`, the main thread does initial setup then
just waits for the other threads. In other subcommands, it does everything. just waits for the other threads. In other subcommands, it does everything.
* `s-CAMERA-TYPE` (one per stream, where `TYPE` is `main` or `sub`): * `s-CAMERA-TYPE` (one per stream, where `TYPE` is `main` or `sub`): these
These threads read frames from the cameras via RTSP and write them to disk. threads write video data to disk. When using `--rtsp-library=ffmpeg`, they
also read the video data from the cameras via RTSP.
* `sync-PATH` (one per sample file directory): These threads call `fsync` to * `sync-PATH` (one per sample file directory): These threads call `fsync` to
* commit sample files to disk, delete old sample files, and flush the * commit sample files to disk, delete old sample files, and flush the
database. database.
* `r-PATH` (one per sample file directory): These threads read sample files * `r-PATH` (one per sample file directory): These threads read sample files
from disk for serving `.mp4` files. from disk for serving `.mp4` files.
* `tokio-runtime-worker` (one per core): these threads handle HTTP requests. * `tokio-runtime-worker` (one per core, unless overridden with
`--worker-threads`): these threads handle HTTP requests.
When using `--rtsp-library=retina`, they also read video data from cameras
via RTSP.
* `logger`: this thread writes the log buffer to `stderr`. Logging is * `logger`: this thread writes the log buffer to `stderr`. Logging is
asynchronous; other threads don't wait for log messages to be written asynchronous; other threads don't wait for log messages to be written
unless the log buffer is full. unless the log buffer is full.
@ -219,6 +224,13 @@ W20210309 00:28:55.527 s-courtyard-sub moonfire_nvr::streamer] courtyard-sub: sl
### Server errors ### Server errors
#### Problems reading video from cameras
Moonfire NVR is switching its RTSP handling from ffmpeg to a pure-Rust
library developed by Moonfire NVR's author. If it doesn't read camera
data successfully, please try restarting with `--rtsp-library=ffmpeg` to see
if the problem goes away. Then please file a bug!
#### `clock_gettime failed: EPERM: Operation not permitted` #### `clock_gettime failed: EPERM: Operation not permitted`
If commands fail with an error like the following, you're likely running If commands fail with an error like the following, you're likely running

View File

@ -71,11 +71,10 @@ pub struct Args {
trust_forward_hdrs: bool, trust_forward_hdrs: bool,
/// RTSP library to use for fetching the cameras' video stream. /// RTSP library to use for fetching the cameras' video stream.
/// Moonfire NVR is in the process of switching from `ffmpeg` (the current /// Moonfire NVR is in the process of switching from `ffmpeg` (used since
/// default, used since the beginning of the project) to `retina` (a /// the beginning of the project) to `retina` (a pure-Rust RTSP library
/// pure-Rust RTSP library developed by Moonfire NVR's author). `retina` /// developed by Moonfire NVR's author).
/// is still experimental. #[structopt(long, default_value = "retina", parse(try_from_str))]
#[structopt(long, default_value = "ffmpeg", parse(try_from_str))]
rtsp_library: crate::stream::RtspLibrary, rtsp_library: crate::stream::RtspLibrary,
} }