matanui159 / ReplaySorcery

An open-source, instant-replay solution for Linux
GNU General Public License v3.0
851 stars 26 forks source link

Improve documentation. #128

Open Okxa opened 2 years ago

Okxa commented 2 years ago

Obviously this project is pretty new, but the documentation is lacking.

While the default config file has accepted values listed, it has no explanation what those options do, and how do they relate to each other.

For example, I had tried to adjust quality on vaapi_hevc backend. But only log says: Quality attribute is not supported: will use default quality level., so I could not fiqure out why the video looked the same, until I looked at the log. Also could not adjust bitrate, I set it to 1M and the program just crashed with Failed to open encoder: Invalid argument.

(Side question: Can you actually adjust quality in any way when using kms backend? It's blurry for me. But this might be a separate issue.)

For now it would be fine if there was some markdown doc or something to explain what the settings do (and how they relate to ffmpeg?) and what they cannot do, for example with certain backends. And not to forget examples, from standard usage to further setup (like customizing outputCommand)

In the end perhaps it would be good to ship with man pages, but for now, just something is better than nothing.

matanui159 commented 2 years ago

Yes documentation needs to be improved but how they all interact with each other both inside and outside of FFmpeg can get confusing. For your questions however:

Just in general when using the VAAPI backends we are really just left up to the implementation which can be the best implementation available with every setting supported (I think only Intel does this), it "works" but doesn't provide many options (AMD, Nouveau), or it's just non-existent (nVidia). And yeah, there is nothing we can do about it :(

More documentation would be nice but I haven't worked on this project in a long while. Been meaning to do a proper announcement at some point but the TL;DR; is:

Anyway, I still remember a lot about this project so if you have any questions or you want to open a PR to start the documentation I'm happy to help :)

Okxa commented 2 years ago

Just in general when using the VAAPI backends we are really just left up to the implementation which ... "works" but doesn't provide many options

Yeah shame about it. The quality with vaapi_hevc is passabe though. Just everything looks like it's been smeared with vaseline:

image

Furthermore, for me all the others are even worse. On vaapi_h264 it's more pixelated:

image

vaapi_h264 also looks very similiar to x11 input backend with x264 encoding, even if I tried changing any settings. I have a multimonitor setup on AMD gpu, if that has any significance.

But yeah, about documentation:

Anyway, I still remember a lot about this project so if you have any questions

This question mainly arose because I tried to use videoInput = kms_service and choose a different encoder from auto. There is no indication anywhere what are compatible with what. I assume that you can only use the VAAPI encoders with hardware accelration.

Also some explanation on what these ffmpeg settings (videoProfile, videoPreset, videoGOP) mean in practice, so user can adjust the quality easier (I have no idea). Although idk how good quality the defaults are, I had about only what I showed above.

Anyways, if you remember about how you implemented these settings, you writing things down would help. Even if it's not complete, it will help others to write documentation.

lack of personal interest in the project + anxiety that I'm not doing enough

Can't say I have not been there, best to just take it easy and ask for pull requests, I guess ;)

matanui159 commented 2 years ago

I might be biased but I personally think those are quite good results. I don't think you would be able to get much better without using a lot of computer resources.

Yes iirc the VAAPI encoders are the only hardware-accelerated encoders right now. The reason hardware acceleration needs to be set in the input (rather than the encoder) is because the input is created first and the encoder is configured from it, so for auto input/encoder detection the hardware-acceleration needs to be set in the input.

For the other settings: