go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

FishEye dewarping with go2rtc, ffmpeg and GPU processing

Open davidguerrer0 opened this issue 1 year ago • 1 comments

Hi,

I'm having a bad time trying to figure out (if it's even possible) how to use go2rtc to dewarp a fisheye (180º) rtsp from a Dahua camera that does not support hardware dewarping for itself (I use othe model from Hikvision that directly offers several independent dewarped streams), and get "two independent" cameras from it.

As by now, I have succeded in getting these two cameras applying several filters with FFMPEG, but just running these two streams is getting my CPU closer to 100% utilization.

It seems that "#raw= -vf" option is not compatible with "#hardware" in the ffmpeg declaration.

My current full config is:

streams:

  FishGoA:
    - ffmpeg:rtsp://admin:[email protected]:554/live#video=h264#raw=-vf "crop=1944:1944:320:0,v360=fisheye:c3x2:out_forder=urbdlb:out_frot=031210:id_fov=360,crop=1700:850:210:1600"

  FishGoB:
    - ffmpeg:rtsp://admin:[email protected]:554/live#video=h264#raw=-vf "crop=1944:1944:320:0,v360=fisheye:c3x2:out_forder=urbdlb:out_frot=031210:id_fov=360,crop=1100:700:40:210"

Any suggestion on how to apply options for using the GPU of my Intel NUC (board D54250WYB). I've tryed everything but to no avail.

Thanks for any clue... David

davidguerrer0 avatar Sep 28 '24 13:09 davidguerrer0

It's bad idea to combine video and raw in one line. They probably will be incompatible with each other. If you have complex raw params - you should use exec source: https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#source-exec

AlexxIT avatar Oct 06 '24 08:10 AlexxIT