I have script that records a video and saves it into a folder. What I want to do is to have an automated way to share recorded videos with friends - either by sending it via discord or caprine (fb messenger client).
If my script operated on images, I could simply copy it with mime type, like xclip -t image/png path/to/picture.png
. When I do this, I can paste the image immediatelly into discord/caprine and it is interpreted as an image and gets sent.
However, this doesn't work with videos for some reason (I found the mime types here). Is there a way to either set the mime type to something so that discord/caprine correctly interprets it, or programatically drag&drop it?
When I take the video from file manager and manually drag it to discord/caprine, everything works without issues. Is there a way to do this via CLI?
Even things to look for would help a lot, I have no idea how this is called and what should I search for.
file -i filename
. Much better than hunting the correct mime type on the web.