This is a command-line tool that takes a regular screenshot using either PNG, JPG, or a video capture using MP4, WebM, APNG and uploads it to shr.moe.
* bc is not necessary if you use both zopflipng and mozjpeg and only partially optional if you use either but not optional if you use neither.
If you're on archlinux you can install it from the AUR:
git clone https://git.sr.ht/~loli/shr-moe-screenshot cd ./shr-moe-screenshot && sudo cp ./screenshot /usr/bin/
Take a normal screenshot.
Take a PNG screenshot, but don't preview it.
screenshot -n -e png
Optimize the screenshot for the smallest file size and return a direct link to the image.
Start recording a WebM at 30 fps. (Run "screenshot -a" again to stop. Note: The second run will take a while to compress then upload so be patient)
screenshot -a -f 30
After the command successfully completes, the URL to your image or video will be copied to your clipboard so you can just paste anywhere you want.
|-a||Start and stop video capture (requires ffmpeg)||N/A||N/A|
|-b||Set video colour depth||
|-c||Turns off PNG crushing||On because most systems are fast enough to handle this kind of compression and it can really save on upload for people with slow internet (not to mention drive space for the server)||N/A|
|-d||Returns a direct link to the image or video||Off||N/A|
|-e||Sets the image encoder to be used||
|-f||Set the fps to capture video at (can only be specified for the first command with -a)||
|-h||Show help message and exit||N/A||N/A|
|-p||Sets the pixel format to be used for WebM/MP4 encoding||
|-k||CRF parameter for WebM/MP4 encoding (The higher the value, the lower the quality and file size)||
|-l||Sets how long the screenshot will stay on the server for in days (Note: Their is no guarantees that the screenshot will actually stay on the server for as long as you specify including the default)||
||Any amount in days|
|-n||Disables opening up the previewer||Off||N/A|
|-o||Turns on auto selecting the best encoder for smallest file by trying both PNG and JPEG (will be slower but can make a big difference on file size)||Off||N/A|
|N/A||Media previewer to use for resulting output||
||Any program you want|
|-q||Quality parameter for JPEG encoding||
|-s||Delay to take a screenshot||N/A||Any amount in seconds|
|-t||Upload screenshots through Tor (requires torsocks)||Off||N/A|
|-u||Sets the uid and exits||
|-v||Sets the video encoder to be used||
|N/A||Options to be passed to torsocks||
|N/A||Directory to store screenshots in||
||Wherever you want. Personally I don't care to keep mine so I just use
|-i||External file to encode and upload||N/A||
|-y||Upload external file without encoding (For wizards only!)||N/A||N/A|