Replies: 4 comments 12 replies
-
My wish list: camera streams to frigate: H264 |
Beta Was this translation helpful? Give feedback.
-
Your wishlist for re-encoding is probably best handled through go2rtc's features Docs The goal for re-encoding of recordings can effectively be done through transcoding of the actual camera stream to your desired codec (i.e. H265) via ffmpeg as used by go2rtc. |
Beta Was this translation helpful? Give feedback.
-
Did anyone had success with configuring go2rtc for transcoding to AV1 or VP9 and can provide a reference config? |
Beta Was this translation helpful? Give feedback.
-
I wanted to report success of using AV1 encoding and OpenVino on an intel arc a310. I am running inside a docker container, inside LXC, on proxmox. Thanks @Arol450 for a good starting point. Some of my shittier cameras do not work with AV1 re-encode, the encoder crashes. They are exceptionally shitty cameras from 2014 and can only run at 5fps @ 960p so I don't really care anyway. My other cameras work fine. File sizes went massively down. From 100MB for a 30 second clip (the cameras have genuinely awful encoders) to a whopping 2MB with AV1 and no discernible quality loss. Super critical for me as my ISP upload speed is only 25mbps, so now we can actually look at the cameras remotely! Is there a way to re=encode live streams? My Arc a3130 is at 2% usage with 7 cameras... I can spare the resouces to re-encode but I didn't see anything relating to live in the config reference? Might have to dig in with go2rtc or something. My cameras are h.264 AXIS cameras, 1280x960 at 15 fps. Configs: Proxmox: Latest proxmox 8.3.2 with latest kernel for good intel GPU driver support In LXC config: (all of the cgroup / apparmor are almost certainly not be necessary, it is leftover from google coral setup, main bit is the devices)
Running a debian unprivileged container. docker-compose.yml
Frigate global config:
Per-camera, for the cameras where it worked:
I did not need the input_args, it actually caused issues setting it. Setting the output_args globally would have worked if not for my shitbox cameras that do something funky enough that ffmpeg and qsv lose their minds and frigate shuts down. With only the slightly-less-shit cameras, it works fine. |
Beta Was this translation helpful? Give feedback.
-
I want to record cameras that provide only H264 and H265 streams, in VP9 now and AV1 soon.
Main reason is space-saving and that most desktops and portable devices have hardware acceleration support for VP9, and will have for AV1 soon.
That means that if I setup in config for detection role to use regular h264 stream, and set up recording role with the same stream but with preset for ffmpeg for re-encoding, then I should have recordings on hard drive in format that I can play in browsers on any desktop or phone.
I don't want to wait eons for camera manufacturers to start selling cameras that support VP9 or AV1 codec, and especially I don't want to wait even more years on top of that for those cameras to get reasonably priced.
Main fault of h265 which modern cameras readily provide is that most browsers don't have license to decode it, which means even if I correctly feed frigate h265 stream, I won't be able to browse recordings in frigate's web interface, rendering those recordings useless.
Currently I am forced to store h264 recordings on hard drive, which take a lot of space if they are in good quality.
With how good Frigate got with support for graphic cards, I assume based on my rudimentary knowledge that a lot of models (of intel cpus, amd cpus, nvidia gpus, amd gpus, intel arc) already support hardware decoding and encoding of VP9, and linux kernels and ffmpegs version had support for it for ages.
Which means for anyone that wants to save space, it should be as easy to purchase for example Nvidia GPU starting from 900 series or intel cpu starting from 10th gen, install it and add preset to config.
Drivers in linux kernels and ffmpeg versions that can support gpus and cpus that support hardware encoding of AV1 should start appearing soon, even if they are not already there.
Then it will be as simple as switching profile preset in config from VP9 to AV1, and everything should still work flawlessly?
Why wait for industry to play catch up, when we can go ahead of curve by ourselves?
Beta Was this translation helpful? Give feedback.
All reactions