Use two-pass Constant Quality mode:¹
ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 1 -an -f webm /dev/null
ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 2 output.webm
Setting the video bitrate to zero while also specifying the CRF (Constant Rate Factor) enables Constant Quality mode which targets a certain perceptual quality level. For ...
tl;dr: Since Youtube reencodes all videos regardless of the upload format, it really isn't that important. Just export your video with a high bitrate to preserve quality. Also see my answer here regarding quality loss caused by Youtube.
Long answer: Each reencoding of a video to a compressed format lowers the quality. Usually, that means you'll lose quality ...
YouTube will re-encode whatever you give it. VP9 is currently too slow to encode. So the best choice is to either:
Give it the original footage, or if it is not accepted by YouTube or is too big to upload, then...
Re-encode to H.264
ffmpeg will accept just about any input and will provide a great quality output. Development is very active, so it is ...
Rather than framerate, the issue is there's only one frame. You'll have to loop the image.
ffmpeg -i Audio.opus -loop 1 -i image.png -pix_fmt yuv420p -ac 2 -s 640x360 -strict strict -r pal -shortest myAudioFile.webm
-loop 1 : infinitely loops over the same image
-shortest : stops encoding when the shortest input stream has entirely been encoded
YUV color encoding with 4:2:0 chroma subsampling is the only widely safe pixel format for web playback, although for certain codecs, other pixel formats may be supported.
FFmpeg auto-selects the pixel format for the output as not all encoders support all pixel formats. It will select the pixel format which best preserves the source bit depth, chroma ...
The alphaextract/alphamerge filters are meant for this.
Since your alpha reference is already greyscale, we only need the alphamerge filter
ffmpeg -i main.mp4 -i alpha.mp4 -filter_complex alphamerge,format=yuva420p -c:v libvpx -auto-alt-ref 0 out.webm
On Linux I use optimizeVideo, which is a wrapper around ffmpeg that automatically detects those settings according to Google's recommendations.
The result is a video which quality difference you cannot tell, but usually orders of magnitude smaller.