Closed balthus closed 2 years ago
We've seen a similar issue with ubiquiti cameras. Perhaps the new ffmpeg version in the beta will fix, but the args in the FAQ are how audio is enabled
Hello, Yes, I also think it's something wrong with ffmpeg because the one installed on my ubuntu using the same arguments on the RTSP endpoint works fine. The video contains audio although not so in sync with the video, but there is audio and no crash. Will try with nightly build to see if it works better and post here ;)
I think blakeblackshear/frigate:0.11.0-b36b635 will be the best early build to try as it uses ffmpeg5.
WARNING: This is a beta build and also has DB changes so make a backup before downloading otherwise it will cause issues if downgrading.
Hi Nick,
I just tried with blakeblackshear/frigate:0.11.0-b36b635 and similar results:
`
frigate | [2022-07-07 19:13:05] watchdog.DiningRoom ERROR : Ffmpeg process crashed unexpectedly for DiningRoom.
frigate | [2022-07-07 19:13:05] watchdog.DiningRoom ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] segment:'/tmp/cache/DiningRoom-20220707191257.mp4' starts with packet stream:1 pts:2755 pts_time:0.344375 frame:0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:1 start_pts_time:0 pts:2755 pts_time:0.344375 dts:2755 dts_time:0.344375 -> pts:2755 pts_time:0.344375 dts:2755 dts_time:0.344375
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] segment:'/tmp/cache/DiningRoom-20220707191257.mp4' starts with packet stream:1 pts:3739 pts_time:0.467375 frame:0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:1 start_pts_time:0 pts:3739 pts_time:0.467375 dts:3739 dts_time:0.467375 -> pts:3739 pts_time:0.467375 dts:3739 dts_time:0.467375
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] segment:'/tmp/cache/DiningRoom-20220707191257.mp4' starts with packet stream:1 pts:4763 pts_time:0.595375 frame:0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:1 start_pts_time:0 pts:4763 pts_time:0.595375 dts:4763 dts_time:0.595375 -> pts:4763 pts_time:0.595375 dts:4763 dts_time:0.595375
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] segment:'/tmp/cache/DiningRoom-20220707191257.mp4' starts with packet stream:1 pts:5846 pts_time:0.73075 frame:0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:1 start_pts_time:0 pts:5846 pts_time:0.73075 dts:5846 dts_time:0.73075 -> pts:5846 pts_time:0.73075 dts:5846 dts_time:0.73075
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a832a3c0] nal_unit_type: 7(SPS), nal_ref_idc: 3
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a832a3c0] nal_unit_type: 8(PPS), nal_ref_idc: 3
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a832a3c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Last message repeated 1 times
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a83f9a80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] segment:'/tmp/cache/DiningRoom-20220707191257.mp4' starts with packet stream:1 pts:6819 pts_time:0.852375 frame:0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:1 start_pts_time:0 pts:6819 pts_time:0.852375 dts:6819 dts_time:0.852375 -> pts:6819 pts_time:0.852375 dts:6819 dts_time:0.852375
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a791f680] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a78f3540] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Last message repeated 1 times
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a7920840] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a78e5940] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] segment:'/tmp/cache/DiningRoom-20220707191257.mp4' starts with packet stream:1 pts:7848 pts_time:0.981 frame:0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:1 start_pts_time:0 pts:7848 pts_time:0.981 dts:7848 dts_time:0.981 -> pts:7848 pts_time:0.981 dts:7848 dts_time:0.981
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a7d7e880] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Last message repeated 1 times
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a7e4dbc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [h264 @ 0x5570a7f1d1c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] segment:'/tmp/cache/DiningRoom-20220707191257.mp4' starts with packet stream:0 pts:98112 pts_time:1.09013 frame:0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:0 start_pts_time:1.09013 pts:98112 pts_time:1.09013 dts:98112 dts_time:1.09013 -> pts:0 pts_time:0 dts:0 dts_time:0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:0 start_pts_time:1.09013 pts:104655 pts_time:1.16283 dts:104655 dts_time:1.16283 -> pts:6543 pts_time:0.0727 dts:6543 dts_time:0.0727
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:0 start_pts_time:1.09013 pts:104722 pts_time:1.16358 dts:104722 dts_time:1.16358 -> pts:6610 pts_time:0.0734444 dts:6610 dts_time:0.0734444
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:1 start_pts_time:1.09013 pts:9316 pts_time:1.1645 dts:9316 dts_time:1.1645 -> pts:595 pts_time:0.074375 dts:595 dts_time:0.074375
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [mp4 @ 0x5570a8578980] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 7848 >= 595
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : av_interleaved_write_frame(): Invalid argument
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : No more output streams to write to, finishing.
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [graph 1 input from stream 0:0 @ 0x5570a86d6940] Setting 'video_size' to value '1280x720'
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [graph 1 input from stream 0:0 @ 0x5570a86d6940] Setting 'pix_fmt' to value '0'
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [graph 1 input from stream 0:0 @ 0x5570a86d6940] Setting 'time_base' to value '1/90000'
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [graph 1 input from stream 0:0 @ 0x5570a86d6940] Setting 'pixel_aspect' to value '1/1'
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [graph 1 input from stream 0:0 @ 0x5570a86d6940] Setting 'frame_rate' to value '30000/1001'
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [graph 1 input from stream 0:0 @ 0x5570a86d6940] w:1280 h:720 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:1/1
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [scaler_out_2_0 @ 0x5570a792fa80] Setting 'w' to value '1280'
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [scaler_out_2_0 @ 0x5570a792fa80] Setting 'h' to value '720'
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [scaler_out_2_0 @ 0x5570a792fa80] w:1280 h:720 flags:'' interl:0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [format @ 0x5570a8a25580] Setting 'pix_fmts' to value 'yuv420p'
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [AVFilterGraph @ 0x5570a8a1bf00] query_formats: 5 queried, 4 merged, 0 already done, 0 delayed
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [scaler_out_2_0 @ 0x5570a792fa80] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x0
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Finishing stream 2:0 without any data written to it.
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Output #2, rawvideo, to 'pipe:':
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Metadata:
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : title : IP Camera Video
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : comment : videoMain
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : encoder : Lavf59.16.100
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Stream #2:0, 0, 1/5: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 1280x720 (0x0) [SAR 1:1 DAR 16:9], 0/1, q=2-31, 55296 kb/s, 5 fps, 5 tbn
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Metadata:
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : encoder : Lavc59.18.100 rawvideo
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:0 start_pts_time:1.09013 pts:110772 pts_time:1.2308 dts:110772 dts_time:1.2308 -> pts:12660 pts_time:0.140667 dts:12660 dts_time:0.140667
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:0 start_pts_time:1.09013 pts:113537 pts_time:1.26152 dts:113537 dts_time:1.26152 -> pts:15425 pts_time:0.171389 dts:15425 dts_time:0.171389
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:0 start_pts_time:1.09013 pts:116668 pts_time:1.29631 dts:116668 dts_time:1.29631 -> pts:18556 pts_time:0.206178 dts:18556 dts_time:0.206178
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:0 start_pts_time:1.09013 pts:119066 pts_time:1.32296 dts:119066 dts_time:1.32296 -> pts:20954 pts_time:0.232822 dts:20954 dts_time:0.232822
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:0 start_pts_time:1.09013 pts:122546 pts_time:1.36162 dts:122546 dts_time:1.36162 -> pts:24434 pts_time:0.271489 dts:24434 dts_time:0.271489
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] stream:0 start_pts_time:1.09013 pts:127960 pts_time:1.42178 dts:127960 dts_time:1.42178 -> pts:29848 pts_time:0.331644 dts:29848 dts_time:0.331644
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [segment @ 0x5570a78f7e00] segment:'/tmp/cache/DiningRoom-20220707191257.mp4' count:0 ended
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [AVIOContext @ 0x5570a857a240] Statistics: 109366 bytes written, 2 seeks, 4 writeouts
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [flv @ 0x5570a789ee80] Failed to update header with correct duration.
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [flv @ 0x5570a789ee80] Failed to update header with correct filesize.
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : frame= 9 fps=0.0 q=-1.0 Lq=-1.0 q=0.0 size=N/A time=00:00:01.40 bitrate=N/A speed=3.14x
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : video:203kB audio:15kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Input file #0 (rtsp://lbaltha:gaoliang2011@192.168.1.233:88/videoMain):
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Input stream #0:0 (video): 33 packets read (129721 bytes); 1 frames decoded;
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Input stream #0:1 (audio): 24 packets read (11520 bytes); 24 frames decoded (11520 samples);
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Total: 57 packets (141241 bytes) demuxed
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Output file #0 (/tmp/cache/DiningRoom-%Y%m%d%H%M%S.mp4):
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Output stream #0:0 (video): 9 packets muxed (103703 bytes);
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Output stream #0:1 (audio): 11 frames encoded (11264 samples); 10 packets muxed (4318 bytes);
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Total: 19 packets (108021 bytes) muxed
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Output file #1 (rtmp://127.0.0.1/live/DiningRoom):
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Output stream #1:0 (video): 9 packets muxed (103703 bytes);
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Output stream #1:1 (audio): 24 packets muxed (11520 bytes);
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Total: 33 packets (115223 bytes) muxed
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Output file #2 (pipe:):
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Output stream #2:0 (video): 0 frames encoded; 0 packets muxed (0 bytes);
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Total: 0 packets (0 bytes) muxed
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [AVIOContext @ 0x5570a7933280] Statistics: 116240 bytes written, 0 seeks, 37 writeouts
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [rtmp @ 0x5570a7927580] UnPublishing stream...
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [rtmp @ 0x5570a7927580] Deleting stream...
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [AVIOContext @ 0x5570a792e540] Statistics: 0 bytes written, 0 seeks, 0 writeouts
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : 25 frames successfully decoded, 0 decoding errors
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : [aac @ 0x5570a789e440] Qavg: 47372.719
frigate | [2022-07-07 19:13:05] ffmpeg.DiningRoom.detect ERROR : Conversion failed!
` Thanks for the warning, but I'm still in beta test so I don't care if I lose recordings
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, just wondering if foscam cameras work with two way audio in combination with frigate?
Describe the problem you are having
Hello,
The recordings never contains sound. I read the faq and used the advised settings but then there are ffmpeg errors. Using the same url/stream via vlc does produce some sound (although few second of lags) I tried with latest build and nightly docker build I tried with 1 foscam and 2 different tapo cameras and the result is the same.
Maybe there are other ticks/options to make it work?
Version
0.11.0-ef54cd6
Frigate config file
Relevant log output
Frigate stats
No response
Operating system
Debian
Install method
Docker Compose
Coral version
CPU (no coral)
Any other information that may be helpful
No response