Open EndlessEden opened 11 months ago
You seem knowledgeable about this, happy to accept pull request with these changes, not sure when I'll get to it.
The reason HW stuff isn't added is that if docker is selected it has a different build with different modules. I wrote it so that only the common modules are available.
That being said, we should be able to refresh the options if docker is not used. The issue is let's say you do not select docker, then you select a HW module. Then you go back and select docker afterwards. You need to add code to reset the encoder to the defaults at that point.
I'd be completely happy removing the docker options entirely.
That would simplify it, but then you'd be locking it to RPi only and we'd have to detect that. As technically it can be run on other platforms currently.
That would simplify it, but then you'd be locking it to RPi only and we'd have to detect that.
You mean the acceleration options? I tested the ffmpeg option on my windows machine during development and had no issues with the non-docker implementation.
yeah I mean if we add HW accel to the lists or options. That or just like docker we only enable them on RPI but have to detect when we aren't on RPI and auto remove them.
That is why I left it to the expert line for those that know what they are doing. As there was no easy way to keep it generic on the fly.
Yeah, that makes sense and the reason why I thought you made the command-line editable. I think the idea of detecting RPi and automatically adding the options to the command line is a neat idea, but if that's done why would you make it an option and not just automatically do it?
also a valid point, for me if you didn't want that option for whatever reason (bad firmware causing issues) you would have no way to disable it.
I'm not against adding HW Accel as I use it myself. But I just couldn't find a safe way to do it for all situations and not over complicating the startup by adding detection.
I did add a little magic to change the lists, and it could be used to add the options I think.
yeah, I was just looking at the pi support plugin and it does have an is_octopi
function.
which I'm pretty sure is what I use to add the lists of modules. I also detect windows and MacOS IIRC.
Issue: By default, no options are provided to instruct ffmpeg to use hardware encoding/decoding. Solution: add drop-down box and checkbox to enable hardware encoding/decoding to ffmpeg line.
Example:
Further, the available encoders should include h264_omx, h264_cuvid, h264_amf, h264_vaapi if Hhardware Acceleration is ticked and "Encoding" is selected from the dropdown box.
This type of solution makes using hardware accel easy, without needing to be a expert in the use of FFMPEG.
A simple description describing the encoders (omx = rpi, cuvid = nvidia, amf = amd, vaapi = intel/quicksync) is all thats needed to get users going. -- any encoding issues due to hardware encoding not being availible on the host os would be the responsibility of the user to resolve.
FFMPEG on Octopi-OS is already built with mmal/h264_omx built in, so not including this when native support exists is a major lost opportunity.