Closed itsfolf closed 3 years ago
Good question, never used hw acceleration in ffmpeg before, but I'll try to look into it.
Some info I found: https://developer.nvidia.com/ffmpeg
This is possible, though it depends on your build of ffmpeg, most distros don't compile with hw accel support.
@ShayBox I have an AMD GPU and I usually use vaapi for hardware acceleration however I couldn't get it working with this since it requires the v4l2 format, could you help?
I don't really understand v4l2 or ffmpeg that well, on top of distros not compiling with hwaccel there's multiple types of it, VA-API, VDPAU, NVDECODE/NVENCODE, of which are gpu brand exclusive afaik, the best solution would be to compile ffmpeg to have vaapi/vdpau/nvenc and add the option to ffmpeg on your own local copy of mon2cam, but I wouldn't know how to solve any v4l2 formatting issues, or if v4l2loopback can even support custom formats for those codecs.
I'm going to close this, but if anyone is interested in a way to do this, you can modprobe v4l2loopback to create a device and use obs or ffmpeg compiled with your gpus hardware accel to stream to it
Currently Mon2Cam takes plenty of CPU resources which is problematic for screen sharing games, would it be possible to use hardware acceleration on ffmpeg (possibly VAAPI) to improve this?