Closed alexdelprete closed 2 years ago
Looks like the RTMP module is not happy with that particular camera and its data, If you disable RTMP it would likely fix the issue.
Disabled RTMP:
[2022-09-06 21:13:54] watchdog.citofono ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-09-06 21:13:54] ffmpeg.citofono.detect ERROR : [rtsp @ 0x5575a6167d00] Missing PPS in sprop-parameter-sets, ignoring
[2022-09-06 21:13:54] ffmpeg.citofono.detect ERROR : [rtsp @ 0x5575a6167d00] DTS discontinuity in stream 1: packet 46 with DTS 26599865889061, packet 47 with DTS 26599865961024
[2022-09-06 21:13:54] ffmpeg.citofono.detect ERROR : [rtsp @ 0x5575a6167d00] DTS discontinuity in stream 1: packet 48 with DTS 26599865961025, packet 49 with DTS 26599865984709
[2022-09-06 21:13:54] ffmpeg.citofono.detect ERROR : [AVHWFramesContext @ 0x7fe55004bd40] Failed to sync surface 0x18: 23 (internal decoding error).
[2022-09-06 21:13:54] ffmpeg.citofono.detect ERROR : [h264 @ 0x5575a6182f40] Failed to transfer data to output frame: -5.
[2022-09-06 21:13:54] ffmpeg.citofono.detect ERROR : Error while processing the decoded data for stream #0:0
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [rtsp @ 0x55eb079e7ec0] Missing PPS in sprop-parameter-sets, ignoring
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [rtsp @ 0x55eb079e7ec0] nal size exceeds length: 26337 1445
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [h264 @ 0x55eb079ee980] Invalid NAL unit 0, skipping.
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : Last message repeated 4 times
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [rtsp @ 0x55eb079e7ec0] RTP H.264 NAL unit type 26 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [h264 @ 0x55eb079ee980] Invalid NAL unit 0, skipping.
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : Last message repeated 1 times
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [h264 @ 0x55eb079ee980] A non-intra slice in an IDR NAL unit.
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [h264 @ 0x55eb079ee980] decode_slice_header error
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [h264 @ 0x55eb079ee980] no frame!
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [rtsp @ 0x55eb079e7ec0] RTP H.264 NAL unit type 29 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [rtsp @ 0x55eb079e7ec0] RTP H.264 NAL unit type 29 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [rtsp @ 0x55eb079e7ec0] RTP H.264 NAL unit type 26 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [rtsp @ 0x55eb079e7ec0] RTP H.264 NAL unit type 27 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [rtsp @ 0x55eb079e7ec0] Error parsing AU headers
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [rtsp @ 0x55eb079e7ec0] nal size exceeds length: 33400 1445
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [h264 @ 0x55eb079ee980] sps_id 9 out of range
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [h264 @ 0x55eb079ee980] missing picture in access unit with size 232
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [segment @ 0x55eb07a07600] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[2022-09-06 21:14:14] ffmpeg.citofono.record ERROR : [segment @ 0x55eb07a07600] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[2022-09-06 21:14:14] watchdog.citofono INFO : Terminating the existing ffmpeg process...
[2022-09-06 21:14:14] watchdog.citofono INFO : Waiting for ffmpeg to exit gracefully...
[2022-09-06 21:14:34] ffmpeg.citofono.record ERROR : [rtsp @ 0x55ec3de68ec0] Missing PPS in sprop-parameter-sets, ignoring
[2022-09-06 21:14:34] ffmpeg.citofono.record ERROR : [rtsp @ 0x55ec3de68ec0] Error parsing AU headers
[2022-09-06 21:14:34] ffmpeg.citofono.record ERROR : [segment @ 0x55ec3df9da00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[2022-09-06 21:14:34] ffmpeg.citofono.record ERROR : [segment @ 0x55ec3df9da00] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[2022-09-06 21:14:34] ffmpeg.citofono.record ERROR : [segment @ 0x55ec3df9da00] Non-monotonous DTS in output stream 0:0; previous: 848, current: 848; changing to 849. This may result in incorrect timestamps in the output file.
[2022-09-06 21:14:34] watchdog.citofono INFO : Terminating the existing ffmpeg process...
[2022-09-06 21:14:34] watchdog.citofono INFO : Waiting for ffmpeg to exit gracefully...
Can you post the full ffmpeg command for the record process from the debug page? For some reason this newer version of ffmpeg isn't liking the video feed. In the past, the Error parsing AU headers
message has been audio related.
Can you post the full ffmpeg command for the record process from the debug page?
here it is:
"ffmpeg_cmds": [
{
"cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD129 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://admin:AFFJIE@citofono.axel.dom:554/Streaming/Channels/101 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/citofono-%Y%m%d%H%M%S.mp4",
"roles": [
"record"
]
},
In the past, the
Error parsing AU headers
message has been audio related.
Should I try disabling the audio on the camera?
It seems audio is already disabled in the command with -an
.
You might want to try messing with your cameras settings, see if something like H.264+
or other settings are enabled and see if changing settings around fixes the issue.
It seems audio is already disabled in the command with
-an
in recording, yes, but the audio data would be captured in input. can I use -an
in input? I was thinking to disable it completely on the camera just to see if it creates issues.
You might want to try messing with your cameras settings, see if something like
H.264+
or other settings are enabled and see if changing settings around fixes the issue.
There's no H264+ in the settings, just plain H.264. I can play around with I frames etc. but I don't think it's a camera issue, previous versions of frigate were working ok. I know this one has a newer ffmpeg, but it should be compatible with "standard" h.264 streams, I hope...:)
I mean it can't hurt to disable the cameras audio and see what happens. We use a new ffmpeg version because it has better compatibility with cameras and hardware accleration.
Iframe rate generally should be the same as the fps. Might also be worth trying constant bit rate instead of variable bit rate.
Switched to CBR, disabled audio, reduced framerate to 22fps on the main stream. Same errors:
[2022-09-07 20:07:55] ffmpeg.citofono.detect ERROR : [rtsp @ 0x556656677d00] Missing PPS in sprop-parameter-sets, ignoring
[2022-09-07 20:07:55] ffmpeg.citofono.detect ERROR : [AVHWFramesContext @ 0x7fb26404be00] Failed to sync surface 0x18: 23 (internal decoding error).
[2022-09-07 20:07:55] ffmpeg.citofono.detect ERROR : [h264 @ 0x556656697040] Failed to transfer data to output frame: -5.
[2022-09-07 20:07:55] ffmpeg.citofono.detect ERROR : Error while processing the decoded data for stream #0:0
[2022-09-07 20:07:55] ffmpeg.citofono.record ERROR : [rtsp @ 0x5560f0ff7ec0] Missing PPS in sprop-parameter-sets, ignoring
[2022-09-07 20:07:55] ffmpeg.citofono.record ERROR : [h264 @ 0x5560f0ffe900] cabac decode of qscale diff failed at 64 55
[2022-09-07 20:07:55] ffmpeg.citofono.record ERROR : [h264 @ 0x5560f0ffe900] error while decoding MB 64 55, bytestream 655
[2022-09-07 20:07:55] ffmpeg.citofono.record ERROR : [h264 @ 0x5560f0ffe900] missing picture in access unit with size 1452
[2022-09-07 20:07:55] ffmpeg.citofono.record ERROR : [h264 @ 0x5560f0ffe900] Invalid NAL unit 0, skipping.
[2022-09-07 20:07:55] ffmpeg.citofono.record ERROR : [h264 @ 0x5560f0ffe900] no frame!
[2022-09-07 20:07:55] ffmpeg.citofono.record ERROR : [segment @ 0x5560f100fb80] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[2022-09-07 20:07:55] ffmpeg.citofono.record ERROR : [segment @ 0x5560f100fb80] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[2022-09-07 20:07:55] watchdog.citofono INFO : Terminating the existing ffmpeg process...
[2022-09-07 20:07:55] watchdog.citofono INFO : Waiting for ffmpeg to exit gracefully...
@alexdelprete Maybe try following https://github.com/blakeblackshear/frigate/pull/3771 to use a different ffmpeg version and see if that fixes it for you?
use a different ffmpeg version and see if that fixes it for you?
the debian/ubuntu builds are ok? what is the docker image based on?
We uses https://github.com/BtbN/FFmpeg-Builds/releases
I would say might as well try your built in ffmpeg first and see how it works
I also found this one, link from the official ffmpeg repo: https://johnvansickle.com/ffmpeg/
Anyway, I solved the problem: it was an issue with the GPU passthrough to the container. When upgrading proxmox probably the kernel upgrades created some issues. I reinstalled the drivers and double-checked vainfo in the docker VM to make sure VAAPI was working:
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.15 (libva 2.12.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.4.1
vainfo: Supported profile and entrypoints
VAProfileH264ConstrainedBaseline: VAEntrypointStats
VAProfileH264Main : VAEntrypointStats
VAProfileH264High : VAEntrypointStats
VAProfileNone : VAEntrypointVideoProc
The really strange thing is that I remember I was using the iHD intel driver, but now the i965 is the only one working. I'll dig into that when I have time, but for now, frigate is happy and the log is perfectly clean with the latest 0.11rc2. :)
[2022-09-08 03:02:11] frigate.app INFO : Starting Frigate (0.11.0-c461c9e)
Starting migrations
[2022-09-08 03:02:12] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-09-08 03:02:12] peewee_migrate INFO : There is nothing to migrate
[2022-09-08 03:02:12] detector.coral INFO : Starting detection process: 217
[2022-09-08 03:02:12] frigate.edgetpu INFO : Attempting to load TPU as usb
[2022-09-08 03:02:12] ws4py INFO : Using epoll
[2022-09-08 03:02:12] frigate.app INFO : Output process started: 219
[2022-09-08 03:02:12] frigate.app INFO : Camera processor started for citofono: 224
[2022-09-08 03:02:12] frigate.app INFO : Camera processor started for living: 227
[2022-09-08 03:02:12] frigate.app INFO : Capture process started for citofono: 230
[2022-09-08 03:02:12] frigate.app INFO : Capture process started for living: 233
[2022-09-08 03:02:13] ws4py INFO : Using epoll
[2022-09-08 03:02:15] frigate.edgetpu INFO : TPU found
Great and thanks for updating! Glad it is working. That will be good to keep in mind in the future as well. I'll go ahead and close this then.
Last thing: I made the custom ffmpeg "working" with the other repo linked above, but you should update docs to specify that the bins have to be under the bin folder, otherwise frigate doesn't pick them up because it's expecting the same structure as the BtbN one.
Thanks for the support. :)
Last thing: I made the custom ffmpeg "working" with the other repo linked above, but you should update docs to specify that the bins have to be under the bin folder, otherwise frigate doesn't pick them up because it's expecting the same structure as the BtbN one.
Thanks for the support. :)
Thanks, I'll add a note about that.
Describe the problem you are having
Never had big issues with frigate, hwaccel was working fine, coral usb too. Now I upgraded to 0.11rc2. Always had a very clean log, no errors. Now the log is full of errors for one specific camera. Frigate seems to be working, but not constantly.
Tried disabling hwaccel in the config, but the errors remain the same. Looks like something related to ffmpeg of this version, but I'm not sure.
I have another camera (Eufy Indoor Cam 2k) that seems to be working fine also with 0.11.
Version
0.11.0-C461C9E
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
Debian
Install method
Docker Compose
Coral version
USB
Network connection
Wireless
Camera make and model
Hikvision DS-HD1
Any other information that may be helpful
No response