For example:
How do they do it?
I tried next but it just downloaded module locally (didn't appear on github):
git submodule add https://github.com/FFmpeg/FFmpeg
git submodule update --init --recursive
git submodule add https://github.com/FFmpeg/FFmpeg
You are missing a parameter - the path where the submodule repository will be added to the main repository.
Try:
git submodule add https://github.com/FFmpeg/FFmpeg FFmpeg