ReplaySorcery
ReplaySorcery copied to clipboard
Improve documentation.
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.
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:
- not all VAAPI encoders supports the quality parameter. The log message is from within FFmpeg and there's sadly nothing we can do about it
- the invalid argument from the bitrate is probably because its way too low or there selected RC mode is not supported. There should be more log messages explaining which argument is invalid and why. Yet again its up to the VAAPI encoder and there's nothing we can do about it
- there is a
videoPreset
option but for the VAAPI encoder it doesn't really do much. It might help you but yet again its up to the VAAPI encoder and there's nothing we can do about it
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:
- lack of personal interest in the project + anxiety that I'm not doing enough
- I switch between side projects a lot. I never thought one would actually take off like this and I kinda want to work on other stuff
- I switched from Linux to MacBook for work and Windows for gaming, which makes things difficult to work on
- but at the same time I don't wanna abandon this project, so maybe I might try and find someone to continue it, or just put it into maintenance mode with no new features
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 :)
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:
Furthermore, for me all the others are even worse. On vaapi_h264
it's more pixelated:
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 ;)
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:
-
videoProfile
: you generally don't have to worry about this. It only applies to the H.264 encoders and specifies the H.264 profile (eg.baseline
,main
, high`), with higher profiles having more features and sometimes better quality and lower profiles having more support and sometimes better performance -
videoPreset
: as already stated for hardware-accelerated this doesn't do much. But due to the limited settings and how each encoder backend has different settings, this is a nice overall config for any non-common settings. For example,x264
has a whole range of presets and I setfast = ultrafast, medium = medium, slow = slower
which internally does a bunch of configuration. -
videoGOP
: most frames in a video reference past frames to compress more. However, some frames are encoded from scratch to improve quality and seekability. These frames are called key-frames (or I-frames) and the frames between one keyframe and the next is called a Group Of Pictures (GOP). This setting specifies the size of the GOP. A lower value increases file size for more accuracy in seeking and better quality, while a higher value does the opposite. I recommend setting this somewhere between half you framerate to double you framerate (half to 2 seconds).