If the target is a GitHub readme, then you can embed a video directly. eg https://github.com/paulirish/git-recent#readme
That said, OP's SVG trick may be a smarter choice if the content is a terminal capture.
replies(5):
That said, OP's SVG trick may be a smarter choice if the content is a terminal capture.
I think it's best for embedding a motion demo of a feature your software provides, no more than 5 seconds. Even then, a video option may be useful to some people.