[Config Support]: restream + 90° rotation Error: "Filtering and streamcopy cannot be used together" #12305
-
Describe the problem you are havingI have a camera that is tilted 90° and I would like to rotate the image in frigate to view it normally.
Is there a correct way to do this with restream? Version14beta3 Frigate config filedetectors:
coral_pci:
type: edgetpu
device: pci
database:
path: /config/frigate.db
audio:
enabled: false
logger:
default: info
logs:
frigate.event: debug
environment_vars:
EXAMPLE_VAR: value
birdseye:
enabled: true
restream: false
width: 1280
height: 720
quality: 8
mode: objects
ffmpeg:
global_args: -hide_banner -loglevel warning -threads 2
hwaccel_args: preset-vaapi
input_args: preset-rtsp-restream
output_args:
detect: -threads 2 -f rawvideo -pix_fmt yuv420p
record: preset-record-generic
retry_interval: 10
# Optional: Detect configuration
# NOTE: Can be overridden at the camera level
detect:
# Optional: width of the frame for the input with the detect role (default: shown below)
width: 640
# Optional: height of the frame for the input with the detect role (default: shown below)
height: 480
# Optional: desired fps for your camera for the input with the detect role (default: shown below)
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
fps: 5
# Optional: enables detection for the camera (default: True)
enabled: true
# Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared: 25
# Optional: Configuration for stationary object tracking
stationary:
# Optional: Frequency for confirming stationary objects (default: same as threshold)
# When set to 1, object detection will run to confirm the object still exists on every frame.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
interval: 50
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 50
# Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
# This can help with false positives for objects that should only be stationary for a limited amount of time.
# It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
# car at the default.
# WARNING: Setting these values overrides default behavior and disables stationary object tracking.
# There are very few situations where you would want it disabled. It is NOT recommended to
# copy these values from the example config into your config unless you know they are needed.
max_frames:
default: 3000
objects:
person: 1000
annotation_offset: 0
objects:
track:
- person
- cat
- dog
- bicycle
filters:
person:
min_area: 5000
max_area: 100000
min_ratio: 0.5
max_ratio: 2.0
min_score: 0.5
threshold: 0.68
motion:
threshold: 30
lightning_threshold: 0.8
contour_area: 10
frame_alpha: 0.01
frame_height: 100
mask: 0,900,1080,900,1080,1920,0,1920
improve_contrast: true
record:
enabled: true
retain:
days: 7
mode: motion
export:
timelapse_args: -vf setpts=0.04*PTS -r 30
events:
retain:
default: 14
mode: active_objects
go2rtc:
streams:
front:
- ffmpeg:rtsp://XXX:[email protected]:554/h264Preview_01_main#rotate=90
front_sub:
- rtsp://XXX:[email protected]:554/h264Preview_01_sub#rotate=90
webrtc:
candidates:
- 10.10.10.3:8555
- stun:8555
cameras:
# Required: name of the camera
front:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front
roles:
- record
input_args: preset-rtsp-restream
- path: rtsp://127.0.0.1:8554/front_sub
input_args: preset-rtsp-restream
roles:
- detect
best_image_timeout: 60
ui:
order: 0
dashboard: true
birdseye:
order: 0
threshold: 29
contour_area: 10
improve_contrast: 'true'
ui:
time_format: browser
date_style: short
time_style: medium
strftime_fmt: '%Y/%m/%d %H:%M'
telemetry:
network_interfaces:
- eth
- enp
- eno
- ens
- wl
- lo
stats:
# Enable AMD GPU stats (default: shown below)
amd_gpu_stats: true
# Enable Intel GPU stats (default: shown below)
intel_gpu_stats: true
# Enable network bandwidth stats monitoring for camera ffmpeg processes, go2rtc, and object detectors. (default: shown below)
# NOTE: The container must either be privileged or have cap_net_admin, cap_net_raw capabilities enabled.
network_bandwidth: false
# Optional: Enable the latest version outbound check (default: shown below)
# NOTE: If you use the HomeAssistant integration, disabling this will prevent it from reporting new versions
version_check: true
version: 0.14 Relevant log output2024-07-05 10:22:23.743324154 [2024-07-05 10:22:23] watchdog.front INFO : Terminating the existing ffmpeg process...
2024-07-05 10:22:23.743326072 [2024-07-05 10:22:23] watchdog.front INFO : Waiting for ffmpeg to exit gracefully...
2024-07-05 10:22:26.010579577 10:22:26.010 WRN [rtsp] error="streams: exec: Filtergraph 'transpose=1' was defined for video output stream 0:0 but codec copy was selected.\nFiltering and streamcopy cannot be used together.\n" stream=front
2024-07-05 10:22:28.860798001 [2024-07-05 10:22:28] frigate.video ERROR : front: Unable to read frames from ffmpeg process.
2024-07-05 10:22:28.860803352 [2024-07-05 10:22:28] frigate.video ERROR : front: ffmpeg process is not running. exiting capture thread...
2024-07-05 10:22:29.075271084 10:22:29.075 WRN [rtsp] error="streams: exec: Filtergraph 'transpose=1' was defined for video output stream 0:0 but codec copy was selected.\nFiltering and streamcopy cannot be used together.\n" stream=front_sub
2024-07-05 10:22:33.766902826 [2024-07-05 10:22:33] watchdog.front ERROR : Ffmpeg process crashed unexpectedly for front.
2024-07-05 10:22:33.767714758 [2024-07-05 10:22:33] watchdog.front ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-07-05 10:22:33.768155998 [2024-07-05 10:22:33] ffmpeg.front.detect ERROR : rtsp://127.0.0.1:8554/front_sub: Invalid data found when processing input
2024-07-05 10:22:33.820597437 [2024-07-05 10:22:33] ffmpeg.front.record ERROR : [rtsp @ 0x558f8d9d9f00] method DESCRIBE failed: 404 Not Found
2024-07-05 10:22:33.822027393 [2024-07-05 10:22:33] ffmpeg.front.record ERROR : rtsp://127.0.0.1:8554/front: Server returned 404 Not Found
2024-07-05 10:22:33.822030439 [2024-07-05 10:22:33] watchdog.front INFO : Terminating the existing ffmpeg process...
2024-07-05 10:22:33.822032048 [2024-07-05 10:22:33] watchdog.front INFO : Waiting for ffmpeg to exit gracefully...
2024-07-05 10:22:36.070032429 10:22:36.069 WRN [rtsp] error="streams: exec: Filtergraph 'transpose=1' was defined for video output stream 0:0 but codec copy was selected.\nFiltering and streamcopy cannot be used together.\n" stream=front
2024-07-05 10:22:37.016203397 10:22:37.016 WRN [rtsp] error="streams: exec: Filtergraph 'transpose=1' was defined for video output stream 0:0 but codec copy was selected.\nFiltering and streamcopy cannot be used together.\n" stream=front_sub
2024-07-05 10:22:37.018744876 [2024-07-05 10:22:37] frigate.video ERROR : front: Unable to read frames from ffmpeg process.
2024-07-05 10:22:37.019203551 [2024-07-05 10:22:37] frigate.video ERROR : front: ffmpeg process is not running. exiting capture thread... Frigate statsNo response Operating systemUNRAID Install methodDocker CLI Object DetectorCoral Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I'd suggest taking a look at the go2rtc docs, you can't rotate without specifying how the video should be encoded https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#source-ffmpeg |
Beta Was this translation helpful? Give feedback.
I'd suggest taking a look at the go2rtc docs, you can't rotate without specifying how the video should be encoded https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#source-ffmpeg