[Config Support]: Error opening input: Invalid data found when processing input & Ffmpeg process crashed unexpectedly for #18796
-
Describe the problem you are havingI've used Frigate for the past 2 years without problems, and yesterday the motherboard on my server died, and had to do a full migration. Now I cannot get it to run properly. I have 21 cameras, but I stripped down the configuration to only two to make troubleshooting easier. I have an nvidia 2060 (with the preset-nvidia args) and a coral TPU doing detection for people. I record the main stream directly from the camera, and do re-streaming on the sub stream to detect (and to use on multiple dashboards). When I start frigate, after everything runs I get Version0.15.0-6cb5cfb Frigate config filemqtt:
host: 192.168.2.1
user: MQTT-user
password: Password
ffmpeg:
hwaccel_args: preset-nvidia
input_args: -rtsp_transport tcp
# use Nvidia GPU for h264 decoding
#input_args:
#- -c:v
#- h264_cuvid
# try to prevent smearing of the video from packetloss
output_args:
record: preset-record-generic-audio-copy
record:
enabled: true
retain:
days: 21
mode: all
detect:
enabled: true
fps: 5
detectors:
coral:
type: edgetpu
device: usb
snapshots:
enabled: true
retain:
default: 21
objects:
track:
- cat
- person
- dog
filters:
person:
min_score: 0.5
threshold: 0.8
cat:
min_score: 0.5
threshold: 0.8
dog:
min_score: 0.5
threshold: 0.8
go2rtc:
streams:
patioGarage_sub:
- ffmpeg:http://192.168.3.15/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=admin&password=password#video=copy#audio=copy
entradaSecundaria_sub:
- ffmpeg:http://192.168.3.16/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=admin&password=password#video=copy#audio=copy
cameras:
#RLC-520A
patioGarage:
ffmpeg:
inputs:
- path: http://192.168.3.15/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=password#video=copy#audio=copy
input_args: preset-http-reolink
roles:
- record
- path: rtsp://127.0.0.1:8554/patioGarage_sub
input_args: preset-rtsp-restream
roles:
- detect
entradaSecundaria:
ffmpeg:
inputs:
- path: http://192.168.3.16/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=password#video=copy#audio=copy
input_args: preset-http-reolink
roles:
- record
- path: rtsp://127.0.0.1:8554/entradaSecundaria_sub
input_args: preset-rtsp-restream
roles:
- detect Relevant Frigate log output2025-06-19 16:35:53.727206628 [2025-06-19 16:35:53] frigate.app INFO : Starting Frigate (0.15.0-6cb5cfb)
2025-06-19 16:35:53.741826349 [2025-06-19 16:35:53] peewee_migrate.logs INFO : Starting migrations
2025-06-19 16:35:53.742981795 [2025-06-19 16:35:53] peewee_migrate.logs INFO : There is nothing to migrate
2025-06-19 16:35:53.780770398 [2025-06-19 16:35:53] frigate.app INFO : Recording process started: 439
2025-06-19 16:35:53.785399389 [2025-06-19 16:35:53] frigate.app INFO : Review process started: 448
2025-06-19 16:35:53.786844270 [2025-06-19 16:35:53] frigate.app INFO : go2rtc process pid: 98
2025-06-19 16:35:53.794866896 [2025-06-19 16:35:53] detector.coral INFO : Starting detection process: 455
2025-06-19 16:35:56.440309504 [2025-06-19 16:35:53] frigate.app INFO : Output process started: 474
2025-06-19 16:35:56.440409523 [2025-06-19 16:35:54] frigate.app INFO : Camera processor started for patioGarage: 509
2025-06-19 16:35:56.443912258 [2025-06-19 16:35:53] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2025-06-19 16:35:56.443943587 [2025-06-19 16:35:54] frigate.app INFO : Camera processor started for entradaSecundaria: 511
2025-06-19 16:35:56.444042656 [2025-06-19 16:35:56] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2025-06-19 16:35:56.444159924 [2025-06-19 16:35:54] frigate.app INFO : Capture process started for patioGarage: 517
2025-06-19 16:35:56.444188754 [2025-06-19 16:35:54] frigate.app INFO : Capture process started for entradaSecundaria: 533
2025-06-19 16:35:56.444214144 [2025-06-19 16:35:54] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-06-19 16:35:56.444237643 [2025-06-19 16:35:54] frigate.api.fastapi_app INFO : FastAPI started
2025-06-19 16:35:59.251839735 [2025-06-19 16:35:59] frigate.video ERROR : entradaSecundaria: Unable to read frames from ffmpeg process.
2025-06-19 16:35:59.252097382 [2025-06-19 16:35:59] frigate.video ERROR : entradaSecundaria: ffmpeg process is not running. exiting capture thread...
2025-06-19 16:36:14.161866449 [2025-06-19 16:36:14] watchdog.entradaSecundaria ERROR : Ffmpeg process crashed unexpectedly for entradaSecundaria.
2025-06-19 16:36:14.161904989 [2025-06-19 16:36:14] watchdog.entradaSecundaria ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-06-19 16:36:14.161958378 [2025-06-19 16:36:14] ffmpeg.entradaSecundaria.detect ERROR : [in#0 @ 0x55567b47acc0] Error opening input: Invalid data found when processing input
2025-06-19 16:36:14.161981178 [2025-06-19 16:36:14] ffmpeg.entradaSecundaria.detect ERROR : Error opening input file rtsp://127.0.0.1:8554/entradaSecundaria_sub.
2025-06-19 16:36:14.162025017 [2025-06-19 16:36:14] ffmpeg.entradaSecundaria.detect ERROR : Error opening input files: Invalid data found when processing input
2025-06-19 16:36:19.287322262 [2025-06-19 16:36:19] frigate.video ERROR : entradaSecundaria: Unable to read frames from ffmpeg process.
2025-06-19 16:36:19.287622478 [2025-06-19 16:36:19] frigate.video ERROR : entradaSecundaria: ffmpeg process is not running. exiting capture thread...
2025-06-19 16:36:24.178105090 [2025-06-19 16:36:24] watchdog.entradaSecundaria ERROR : Ffmpeg process crashed unexpectedly for entradaSecundaria.
2025-06-19 16:36:24.178147539 [2025-06-19 16:36:24] watchdog.entradaSecundaria ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-06-19 16:36:24.178176169 [2025-06-19 16:36:24] ffmpeg.entradaSecundaria.detect ERROR : [in#0 @ 0x555d7f37bcc0] Error opening input: Invalid data found when processing input
2025-06-19 16:36:24.178209358 [2025-06-19 16:36:24] ffmpeg.entradaSecundaria.detect ERROR : Error opening input file rtsp://127.0.0.1:8554/entradaSecundaria_sub.
2025-06-19 16:36:24.178240038 [2025-06-19 16:36:24] ffmpeg.entradaSecundaria.detect ERROR : Error opening input files: Invalid data found when processing input
2025-06-19 16:36:26.299772537 127.0.0.1 - - [19/Jun/2025:16:36:26 -0300] "" 400 0 "-" "-" "-" Relevant go2rtc log outputNo errors here, leaving the log just in case
2025-06-19 16:35:26.121653950 [INFO] Preparing new go2rtc config...
2025-06-19 16:35:26.419300378 [INFO] Starting go2rtc...
2025-06-19 16:35:26.494371998 16:35:26.494 INF go2rtc platform=linux/amd64 revision=b2399f3 version=1.9.2
2025-06-19 16:35:26.494374938 16:35:26.494 INF config path=/dev/shm/go2rtc.yaml
2025-06-19 16:35:26.494668904 16:35:26.494 INF [rtsp] listen addr=:8554
2025-06-19 16:35:26.494734363 16:35:26.494 INF [api] listen addr=:1984
2025-06-19 16:35:26.494750383 16:35:26.494 INF [webrtc] listen addr=:8555/tcp
2025-06-19 16:35:36.121696172 [INFO] Starting go2rtc healthcheck service... Frigate stats{"cameras":{"patioGarage":{"camera_fps":5.1,"process_fps":5.1,"skipped_fps":0.0,"detection_fps":2.2,"detection_enabled":true,"pid":509,"capture_pid":517,"ffmpeg_pid":522,"audio_rms":0.0,"audio_dBFS":0.0},"entradaSecundaria":{"camera_fps":5.1,"process_fps":5.1,"skipped_fps":0.0,"detection_fps":5.7,"detection_enabled":true,"pid":511,"capture_pid":533,"ffmpeg_pid":684,"audio_rms":0.0,"audio_dBFS":0.0}},"detectors":{"coral":{"inference_speed":7.88,"detection_start":0.0,"pid":455}},"detection_fps":7.9,"gpu_usages":{"NVIDIA GeForce RTX 2060":{"gpu":"0.0%","mem":"4.01%","enc":"0.0%","dec":"0.0%"}},"cpu_usages":{"frigate.full_system":{"cpu":"2.1","mem":"12.9"},"1":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"/package/admin/s6/command/s6-svscan -d4 -- /run/service"},"15":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise s6-linux-init-shutdownd"},"16":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"/package/admin/s6-linux-init/command/s6-linux-init-shutdownd -c /run/s6/basedir -g 3000 -C -B"},"24":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise go2rtc-log"},"25":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise frigate"},"26":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise frigate-log"},"27":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise certsync-log"},"28":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise go2rtc-healthcheck"},"29":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise nginx"},"30":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise go2rtc"},"31":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise s6rc-oneshot-runner"},"32":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise certsync"},"33":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise s6rc-fdholder"},"34":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-supervise nginx-log"},"45":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"/package/admin/s6-2.11.3.2/command/s6-fdholderd -1 -i data/rules"},"46":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"/package/admin/s6/command/s6-ipcserverd -1 -- /package/admin/s6/command/s6-ipcserver-access -v0 -E -l0 -i data/rules -- /package/admin/s6/command/s6-sudod -t 30000 -- /package/admin/s6-rc/command/s6-rc-oneshot-run -l ../.. --"},"86":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/nginx"},"88":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/go2rtc"},"89":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/frigate"},"90":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/certsync"},"98":{"cpu":"0.3","cpu_average":"0","mem":"0.1","cmdline":"/usr/local/go2rtc/bin/go2rtc -config=/dev/shm/go2rtc.yaml"},"106":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"bash ./run.user go2rtc-healthcheck"},"108":{"cpu":"0.9","cpu_average":"2","mem":"5.8","cmdline":"python3 -u -m frigate"},"129":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"nginx: master process nginx"},"170":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"nginx: worker process"},"171":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"nginx: worker process"},"172":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"nginx: worker process"},"173":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"nginx: worker process"},"174":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"nginx: cache manager process"},"307":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"bash ./run.user certsync"},"439":{"cpu":"0.9","cpu_average":"1","mem":"0.6","cmdline":"frigate.recording_manager"},"448":{"cpu":"0.1","cpu_average":"0","mem":"0.5","cmdline":"frigate.review_segment_manager"},"455":{"cpu":"2.1","cpu_average":"3","mem":"0.6","cmdline":"frigate.detector.coral"},"474":{"cpu":"1.4","cpu_average":"1","mem":"0.6","cmdline":"frigate.output "},"479":{"cpu":"0.0","cpu_average":"0","mem":"0.1","cmdline":"/usr/lib/ffmpeg/7.0/bin/ffmpeg -threads 1 -f rawvideo -pix_fmt yuv420p -video_size 640x360 -i pipe: -threads 1 -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:"},"486":{"cpu":"0.0","cpu_average":"0","mem":"0.1","cmdline":"/usr/lib/ffmpeg/7.0/bin/ffmpeg -threads 1 -f rawvideo -pix_fmt yuv420p -video_size 640x360 -i pipe: -threads 1 -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:"},"493":{"cpu":"0.0","cpu_average":"0","mem":"0.1","cmdline":"/usr/lib/ffmpeg/7.0/bin/ffmpeg -threads 1 -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -threads 1 -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:"},"509":{"cpu":"2.4","cpu_average":"5","mem":"0.7","cmdline":"frigate.process:patioGarage"},"511":{"cpu":"4.5","cpu_average":"4","mem":"0.6","cmdline":"frigate.process:entradaSecundaria"},"517":{"cpu":"0.3","cpu_average":"0","mem":"0.6","cmdline":"frigate.capture:patioGarage"},"522":{"cpu":"0.7","cpu_average":"0","mem":"0.5","cmdline":"/usr/lib/ffmpeg/7.0/bin/ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel cuda -hwaccel_output_format cuda -user_agent FFmpeg Frigate/0.15.0-6cb5cfb -rtsp_transport tcp -timeout 5000000 -i rtsp://127.0.0.1:8554/patioGarage_sub -r 5 -vf fps=5,scale_cuda=w=640:h=360,hwdownload,format=nv12,eq=gamma=1.4:gamma_weight=0.5 -threads 2 -f rawvideo -pix_fmt yuv420p pipe:"},"525":{"cpu":"0.3","cpu_average":"0","mem":"0.1","cmdline":"/usr/lib/ffmpeg/7.0/bin/ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -i http://192.168.3.15/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=*&password=* -c:v copy -c:a copy -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/f9f31a385b7c42ca59f0075330931993"},"526":{"cpu":"0.6","cpu_average":"0","mem":"0.1","cmdline":"/usr/lib/ffmpeg/7.0/bin/ffmpeg -hide_banner -loglevel warning -threads 2 -user_agent FFmpeg Frigate/0.15.0-6cb5cfb -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -flags low_delay -strict experimental -analyzeduration 1000M -probesize 1000M -rw_timeout 5000000 -i http://192.168.3.15/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=*&password=* -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy /tmp/cache/patioGarage@%Y%m%d%H%M%S%z.mp4"},"533":{"cpu":"0.3","cpu_average":"0","mem":"0.6","cmdline":"frigate.capture:entradaSecundaria"},"545":{"cpu":"0.7","cpu_average":"0","mem":"0.1","cmdline":"/usr/lib/ffmpeg/7.0/bin/ffmpeg -hide_banner -loglevel warning -threads 2 -user_agent FFmpeg Frigate/0.15.0-6cb5cfb -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -flags low_delay -strict experimental -analyzeduration 1000M -probesize 1000M -rw_timeout 5000000 -i http://192.168.3.16/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=*&password=* -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy /tmp/cache/entradaSecundaria@%Y%m%d%H%M%S%z.mp4"},"684":{"cpu":"0.7","cpu_average":"0","mem":"0.5","cmdline":"/usr/lib/ffmpeg/7.0/bin/ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel cuda -hwaccel_output_format cuda -user_agent FFmpeg Frigate/0.15.0-6cb5cfb -rtsp_transport tcp -timeout 5000000 -i rtsp://127.0.0.1:8554/entradaSecundaria_sub -r 5 -vf fps=5,scale_cuda=w=640:h=360,hwdownload,format=nv12,eq=gamma=1.4:gamma_weight=0.5 -threads 2 -f rawvideo -pix_fmt yuv420p pipe:"},"686":{"cpu":"0.2","cpu_average":"0","mem":"0.1","cmdline":"/usr/lib/ffmpeg/7.0/bin/ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -i http://192.168.3.16/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=*&password=* -c:v copy -c:a copy -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/8d1c1aa2f996a2143fd8725ec80b817e"},"2608":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"sleep 60"},"2650":{"cpu":"0.0","cpu_average":"0","mem":"0.0","cmdline":"sleep 30s"}},"service":{"uptime":550,"version":"0.15.0-6cb5cfb","latest_version":"0.15.1","storage":{"/media/frigate/recordings":{"total":13245591.0,"used":12511458.3,"free":66519.9,"mount_type":"ext4"},"/media/frigate/clips":{"total":13245591.0,"used":12511458.3,"free":66519.9,"mount_type":"ext4"},"/tmp/cache":{"total":1907.4,"used":20.4,"free":1887.0,"mount_type":"tmpfs"},"/dev/shm":{"total":2048.0,"used":34.5,"free":2013.5,"mount_type":"tmpfs"}},"temperatures":{},"last_updated":1750362304},"processes":{"recording":{"pid":439},"review_segment":{"pid":448},"go2rtc":{"pid":98}}} Operating systemDebian Install methodDocker Compose docker-compose file or Docker CLI command#version: "3.9"
services:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: always
#image: ghcr.io/blakeblackshear/frigate:master-f4a44fd
image: ghcr.io/blakeblackshear/frigate:stable
deploy: # <------------- Add this section
resources:
reservations:
devices:
- driver: nvidia
#device_ids: ['0'] # this is only needed when using multiple GPUs
count: 1 # number of GPUs
capabilities: [gpu]
shm_size: "2048mb" # update for your cameras based on calculation above
devices:
- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
- /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/frigate/:/config
- /mnt/14tb/frigate:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 2000000000
ports:
- "5000:5000"
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: "password" Object DetectorCoral Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Since you're using go2rtc and the problematic streams are being served from go2rtc with the ffmpeg module, you should enable trace logs:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the tip, I enabled them and now there's a little more output to work with
|
Beta Was this translation helpful? Give feedback.
-
I'd rather not do detection on the main stream for performance reasons, and the ext doesn't seem to work. Tried it with the url and ffplay on channels 0 to 5, and none opened up a stream. |
Beta Was this translation helpful? Give feedback.
try connecting Frigate to the cameras sub directly in the cameras config