Closed xromansx closed 2 years ago
Updated to version Agent DVR v.3.9.8.0 same behavior but now I selected None in decoder options. Also The CPU is really high ~75% and when I stop it goes to ~5%. So defenetly CPU is processing something.
If you change the decode method you need to disable/ enable the camera. you need to select a low res stream for live viewing and a high res stream for raw recording. I'm guessing your high res stream is maxing out your PC when it's trying to play it back - it needs to decode it, process it re-encode it for the UI and then the browser needs to decode it again. The raw file is the raw data from the camera without any processing. Try downloading a file and play it back with a native player like VLC.
This is what I aslo tried and downloaded the file but still have this low fps video.
dunno - could be the timestamps are screwy on the camera - can you upload a recording somewhere?
https://drive.google.com/file/d/1cUdWnXDpjgEvE1DZS_3NiOhhToDc-z2p/view?usp=sharing I don't know how it's recording but I can see that it create lot of CPU load.
Thanks, I think the framerate is fine - it just needs packet re-ordering enabled:
https://www.ispyconnect.com/userguide-agent-dvr.aspx Under troubleshooting:
Stuttering Video? Some cameras (notably Reolink) emit frames in groups of audio and video which can result in stuttering live and recorded playback. To work around this, edit the camera, click to configure the videosource settings, select the FFMPEG tab and set a value for Max Delay (for example 4 seconds) and a value for Max Reorder Queue Size (for example 500).
Tried this also same result I see that seconds move slower. also I tried diferent linux video recording software and don't have this issue, I don't know if I can write the names. I don't understand why CPU is so high, with different soft recording on, my CPU max 5%, when I use Agent DVR CPU is ~70%
if you can you port forward the camera i can try it from here - send me a url - sean at ispyconnect dot com "I don't understand why CPU is so high, with different soft recording on, my CPU max 5%, when I use Agent DVR CPU is ~70%" it completely depends how you have it configured
I sent you email with IP and my configs.
hmm seems to be working fine here
.. recording playback is using around 3% CPU (whilst live playback is still running). Framerate seems fine without that ffmpeg tweak.
I'm thinking maybe for some reason your computer isn't using the GPU. Make sure your GPU is forwarded into the container and is available (check the logs at /logs.html).
Maybe the problem is with docker image ? From logs:
H264 compatible version of ffmpeg is required to use H264 encoding. Switch to VP8 in settings if unable to record.
Error: CMD: CMD: No such file or directory
Error: CMD: at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at CoreLogic.Utilities.CMD.GetOutput(String exe, String strCommand)
Error: Front: ONVIF Device: at CoreLogic.Extensions.WithCancellation[T](Task`1 task, CancellationToken cancellationToken) at CoreLogic.Onvif.ONVIFDevice.ProcessMedia1Client(EndpointAddress ep, CancellationTokenSource cts) at CoreLogic.Onvif.ONVIFDevice.Connect()
ffmpegbase: Front: Couldn't create AV_HWDEVICE_TYPE_VAAPI decoder. Using CPU instead.
I think the last one forcing CPU to be used. The problem is more related with container by itself maybe ffmpeg version is compiled wrong.
V3.9.9.0
5:20:09 PM | ffmpegbase: Camera 1: Preferred decoder (AV_HWDEVICE_TYPE_DRM) does not support the profile. Using AV_HWDEVICE_TYPE_VAAPI |
---|---|
5:20:09 PM | Error: ffmpegbase: Camera 1: Preferred decoder (AV_HWDEVICE_TYPE_DRM) does not support the profile. Using AV_HWDEVICE_TYPE_VAAPI |
5:20:09 PM | ffmpegbase: Camera 1: Setting preferred decoder to vaapi |
5:20:09 PM | ffmpegbase: Camera 1: Opening AV_HWDEVICE_TYPE_VAAPI |
5:20:09 PM | ffmpegbase: Camera 1: Couldn't create AV_HWDEVICE_TYPE_VAAPI decoder. Using CPU instead. |
5:20:09 PM | Error: ffmpegbase: Camera 1: Couldn't create AV_HWDEVICE_TYPE_VAAPI decoder. Using CPU instead. |
5:20:09 PM | ffmpeg: Camera 1: Set decoder to CPU |
yeah you'll need to make sure the GPU is available in the container.
it is, I don't have any issues with other software. maybe problem with ffmpeg, It's stange that nobody else have similar issue.
you can set ffmpeg logging in server settings - general tab to info and get more details. It definitely does work and is not a problem with the code. Just needs setting up properly.
I think the main problem is : ffmpegbase: Camera 1: Couldn't create AV_HWDEVICE_TYPE_VAAPI decoder. Using CPU instead. And I don't know how to fix it. ffmpeg recompiling with more options may help but have no idea how to do it inside the container.
More Logs:
9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003d280] Failed to open /dev/dri/renderD128 as DRM device node. -- | -- 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003d280] Cannot open X11 display /dev/dri/renderD128. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003d280] No VA display found for device /dev/dri/renderD128. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f400768c0] Failed to open /dev/dri/renderD129 as DRM device node. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f400768c0] Cannot open X11 display /dev/dri/renderD129. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f400768c0] No VA display found for device /dev/dri/renderD129. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003d280] Failed to open /dev/dri/renderD130 as DRM device node. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003d280] Cannot open X11 display /dev/dri/renderD130. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003d280] No VA display found for device /dev/dri/renderD130. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003cd00] Failed to open /dev/dri/renderD131 as DRM device node. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003cd00] Cannot open X11 display /dev/dri/renderD131. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003cd00] No VA display found for device /dev/dri/renderD131. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003d280] Failed to open :0 as DRM device node. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003d280] Cannot open X11 display :0. 9:52:37 PM | [AVHWDeviceContext @ 0x7f8f4003d280] No VA display found for device :0. 9:52:37 PM | ffmpegbase: Camera 1: Couldn't create AV_HWDEVICE_TYPE_VAAPI decoder. Using CPU instead. 9:52:37 PM | Error: ffmpegbase: Camera 1: Couldn't create AV_HWDEVICE_TYPE_VAAPI decoder. Using CPU instead. 9:52:37 PM | ffmpeg: Camera 1: Set decoder to CPU@doitandbedone do you have any idea?
I thing the issue is really similar to: https://github.com/doitandbedone/ispyagentdvr-docker/issues/361 https://github.com/doitandbedone/ispyagentdvr-docker/issues/100
and in more details related to my HW here: https://github.com/linuxserver/docker-jellyfin/issues/26
It's seams that container has some priblems with build in mesa-va-drivers or ffmpeg not using them or maybe 965 driver needs to be installed inside it.
I see lot of projects are switching to debian 10 based container.
I have more logs:
8:34:49 PM | [rtsp @ 0x7f86cc0fbbc0] SDP: v=0 o=- 38990265062388 38990265062388 IN IP4 192.168.9.31 s=RTSP Session c=IN IP4 192.168.9.31 t=0 0 a=control:* a=range:npt=0- m=video 0 RTP/AVP 96 a=rtpmap:96 H264/90000 a=range:npt=0- a=framerate:0S a=fmtp:96 profile-level-id=4d002a; packetization-mode=1; sprop-parameter-sets=Z00AKp2oHgCJ+WbgICAoAAADAAgAAAMA9CA=,aO48gA== a=Media_header:MEDIAINFO=494D4B48010100000400010000000000000000000000000000000000000000000000000000000000; a=framerate:25 a=control:trackID=3 |
---|---|
8:34:49 PM | [rtsp @ 0x7f86cc0fbbc0] setting jitter buffer size to 0 |
8:34:49 PM | [h264 @ 0x7f86cc0bf640] Reinit context to 1920x1088, pix_fmt: yuvj420p |
8:34:51 PM | Start Stream: Camera 1: Using software decoder |
8:34:51 PM | [h264 @ 0x7f86cc0ef1c0] Reinit context to 1920x1088, pix_fmt: yuvj420p |
8:34:52 PM | ONVIF State Monitor: Camera 1: Onvif event receiver state: Connecting to http://192.168.9.31:8899/... |
8:34:52 PM | ONVIF State Monitor: Camera 1: Onvif event receiver state: Connection is established. Receiving... |
8:35:14 PM | [h264 @ 0x7f86cc0ef1c0] Increasing reorder buffer to 1 |
8:35:36 PM | [h264 @ 0x7f86cc0ef1c0] left block unavailable for requested intra4x4 mode -1 |
8:35:36 PM | [h264 @ 0x7f86cc0ef1c0] error while decoding MB 0 13, bytestream 182695 |
8:35:36 PM | [h264 @ 0x7f86cc0ef1c0] concealing 6649 DC, 6649 AC, 6649 MV errors in I frame |
8:36:13 PM | [rtsp @ 0x7f86cc0fbbc0] CSeq 6 expected, 0 received. |
8:36:15 PM | [h264 @ 0x7f86cc0ef1c0] left block unavailable for requested intra4x4 mode -1 |
8:36:15 PM | [h264 @ 0x7f86cc0ef1c0] error while decoding MB 0 14, bytestream 93711 |
8:36:15 PM | [h264 @ 0x7f86cc0ef1c0] concealing 6529 DC, 6529 AC, 6529 MV errors in I frame |
yeah you'll either need to forward the gpu into the container or use linux/ windows directly to avoid the issue.
I used another containers they had gpu driver build in I think there should be posibility to have it build in also here.
Apologies been a bit busy as of late. As for GPU there were some efforts but reached a roadblock. Perhaps things have changed since then. If you do find another image and can share details on how they managed to do so I'd be happy to review and include changes if possible. As for the image upgrade, I can put some effort once I free up my responsibilities. For now I'm keeping the image in maintenance mode.
You are also welcomed to create some trial branches and submit a pull request with changes.
On Tue, May 31, 2022, 6:47 PM xromansx @.***> wrote:
I used another containers they had gpu driver build in I think there should be posibility to have it build in also here.
— Reply to this email directly, view it on GitHub https://github.com/doitandbedone/ispyagentdvr-docker/issues/407#issuecomment-1143027436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORTFNHLLC6GFGFDPVQOGXDVM26K5ANCNFSM5WINY7PA . You are receiving this because you were mentioned.Message ID: @.***>
I used shinobi image and installed AgentDVR in it and made it use installed ffmpeg but this didn't resolve the issue. Also had a different server with old sis video card and installed agentdvr on it and have same cpu problem. it worked only on intel video installed directly on the system. So run out of ideas. Maybe it's how .net works with non intel cards .
Please check on new version 4.1.2.0 and report new findings. @xromansx
Hi, Agent DVR v.3.9.6.0 in docker.
I'm now testing different software this one has everything what I need, onvif motion detection works great, only one issue, when it does the recordings it can only do ~3fps with drops when I setup this stream as a main stream I can see that the video is really slow. in settings for recorder I have RAW Record streem. I tested different softwares and on other ones I can get easy 10fps no drops didn't try higher fps also when the file is saved on PC it's avi (I know it's only extension) but I can see inside the resolution and bitrate, with Agent DVR files are mkv and no information inside.
Also if I setup main stream in Live Video it isn't smooth ~4fps and lot of drops. It looks like not raw but processed by something.
And in decoder I didn't find the options auto or none, only CPU, GPU and VLC.
Some Logs:
9:20:35 AM | StartSaving: Front: -- | -- 9:20:35 AM | Raw Writer (CoreLogic.Sources.Combined.RawMonitor): Recording 9:20:35 AM | Front: Recording Opened 9:20:51 AM | Front: Recording Closed 9:20:51 AM | FrameBuffer: Front: Record stop 9:22:06 AM | Skip storage management on /agent/Media/WebServerRoot/Media/ as it is disabled 9:30:06 AM | Discovery: ONVIF v2.41 9:30:06 AM | Discovery: Using Media Version 1 9:30:28 AM | SourcePlayingFinished: Front: Playing finished (Restart) 9:30:32 AM | intervals: Front: Reconnecting 9:30:32 AM | intervals: Front: Reconnect Exit 9:30:34 AM | Start Stream: Front: Using software decoder