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.
https://jsbin.com/nohamuguze/edit?html,css,output
edit: sigh.... Works in Firefox and Chrome. Has issues in Safari - I'm sure I could futs with it more and get it to work everywhere but still, sadness