Repository navigation
Conversation
Synchronized recordings can be streamed at 1/2, 1/4 or 1/8 of the recorded resolution while the recording keeps full resolution frames. Frames are scaled with the Jetson hardware JPEG codec when available, falling back to libjpeg-turbo.
|
Preview build: curl -s https://raw.githubusercontent.com/DeepWaterExploration/dweOS/main/install.sh | sudo bash -s preview-pr-629Rebuilt on every push. Closing this pull request deletes the preview. |
Re-encoding at a fixed quality of 80 cut the bitrate far more than the resolution did (400 to 30 Mbps at half resolution), since cameras send higher quality frames. Each frame is now re-encoded at the quality read from its own quantization table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a "Stream Resolution" setting (Full, 1/2, 1/4, 1/8) for synchronized cameras that are recording a DWVO. The live stream is scaled down for bandwidth-limited links. The recording keeps the full-resolution frames for post-processing. Like endpoints, the scale is read live, so changing it doesn't restart the stream or split the recording into a new file.
jpeg_scaler.py(new): on Jetson, frames are scaled with the hardware JPEG codec (nvjpegdec→nvvidconv→nvjpegenc) through one long-runninggst-launchprocess, one frame in and one frame out. If those elements are missing or the pipeline fails or stalls, it falls back to libjpeg-turbo, which decodes straight to the smaller size in the DCT domain. If neither is available, frames are sent full size.stream_scale: a new field (1, 2, 4 or 8, default 1) on the stream, stream info and saved settings models. Old settings files still load.PyTurboJPEG==1.8.3(2.x needs libjpeg-turbo 3, which Debian 12, Ubuntu 22.04 and JetPack don't have), plus the libjpeg-turbo system package ininstall_requirements.shand the Dockerfile.Not yet tested on an Orin NX. The GStreamer path was tested locally with software elements on GStreamer 1.20 (the same version as JetPack 6). If nvjpeg fails on the device, it falls back to libjpeg-turbo and logs a warning.
When #504 lands,
PyTurboJPEGneeds to be added to the pyproject dependencies.Fixes #621
Type of change
Quick Checklist