GeekTips
109 subscribers
586 photos
3 videos
77 files
231 links
Linux Mint, video encoding, ffmpeg, geek tips, regex, pdf manipulation, substitcher, mpv config
Download Telegram
sudo apt remove blueberry

sudo apt install blueman

Blueberry (comes with Linux Mint) is for bluetooth but isn't as stable as Blueberry which is a applet for gnome-bluetooth which just works reliably. Once you install blueman reboot your computer.

Note: Apple Magic Keyboard won't work properly just a few keys if you have NumLock enabled on laptop.
Remove GNOME file indexing tracker as it slows down the system

sudo apt remove tracker tracker-extract tracker-miner-fs

Then reboot
sudo npm install -g tldr

if you don't have npm and nodejs installed then do
sudo apt install nodejs npm

TLDR (too long, didn't read) is like quick, concise man (manual pages) ..so instead of
man ocrmypdf 
and getting a long manual pages explaining everything in detail with you skimming for the useful options — instead do

tldr ocrmypdf 

and you get this:

ocrmypdf

Generate a searchable PDF or PDF/A from a scanned PDF or an image of text.
More information: https://ocrmypdf.readthedocs.io/en/latest/cookbook.html.

- Create a new searchable PDF/A file from a scanned PDF or image file:
    ocrmypdf path/to/input_file path/to/output.pdf

- Replace a scanned PDF file with a searchable PDF file:
    ocrmypdf path/to/file.pdf path/to/file.pdf

- Skip pages of a mixed-format input PDF file that already contain text:
    ocrmypdf --skip-text path/to/input.pdf path/to/output.pdf

- Clean, de-skew, and rotate pages of a poor scan:
    ocrmypdf --clean --deskew --rotate-pages path/to/input_file path/to/output.pdf

- Set the metadata of the searchable PDF file:
    ocrmypdf --title "title" --author "author" --subject "subject" --keywords "keyword; key phrase; ..." path/to/input_file path/to/output.pdf

- Display help:
    ocrmypdf --help

also can search with -s option

tldr -s configure network
Searching for: configure network

$ docker-network
$ lxc-network
$ az-network
$ networksetup (Available on: osx, osx)
$ ip-link
$ ipconfig (Available on: windows, windows, windows, windows)
$ networkquality (Available on: osx)
$ ip-address
$ git-config
$ nload

Run tldr <command> to see specific pages.
GMIC-Qt 500+ filters.
To use the awesome G'MIC filters download Ubuntu 20.04 debian file.
for Linux Mint 20.3
gmic_3.0.2_ubuntu20-04_focal_amd64.deb
https://gmic.eu/download.html

Or here is the gallery from the homepage which I made into a PDF https://t.iss.one/geektips/160

To see an overview of all the filters GMIC 3.0.0 (released December 2021) can do see here
https://discuss.pixls.us/t/release-of-gmic-3-0/17226
Some GMIC artistic filters from the GMIC gallery
I wish to make a PDF for reference for the entire gallery. So I screenshot all of them using SHIFT + PrintScreen and open each one in Fotoxx and save them.

Open fotoxx and choose Montage and 1 column and ADD ALL images in the directory and it makes the montage.

tldr img2pdf

img2pdf

Command-line lossless converter of raster images to PDF.
More information: https://gitlab.mister-muffin.de/josch/img2pdf.

- Convert multiple images to a single PDF, each image being on its own page:
    img2pdf path/to/image1.jpg path/to/image2.jpg --output path/to/file.pdf

- Convert only the first frame of a multi-frame image to PDF:
    img2pdf path/to/file.gif --first-frame-only --output path/to/file.pdf

- Auto orient the image, use a page size of A4 in landscape mode, and set a border of 2cm horizontally and 5.1cm vertically:
    img2pdf path/to/file.jpg --auto-orient --pagesize A4^T --border 2cm:5.1cm --output path/to/file.pdf

- Shrink only larger images to a 10cm by 15cm rectangle inside a 30x20cm page:
    img2pdf path/to/file.tiff --pagesize 30cmx20cm --imgsize 10cmx15cm --fit shrink --output path/to/file.pdf

- Convert an image to PDF, and specify metadata for the resulting file:
    img2pdf path/to/file.png --title title --author author --creationdate 1970-01-31 --keywords keyword1 keyword2 --subject subject --output path/to/file.pdf

So I did this command to get a PDF by lossly converting image to PDF
img2pdf /home/mint/Pictures/gmicgallery/montage.jpg  --output gmicgallery.pdf
Fotoxx montage choosing 1 column and adding all images to stitch them together
gmicgallery.pdf
4.8 MB
GMIC entire filter gallery for quick reference.

Note these are just some of the 500+ available filters to use but gives a quick overview of some you may wish to use on your photos / images.
search & replace with regex (regular expressions) to strip out unwanted text till the the ( starts

.*\(
the . says any character except a new line
the * says unlimited
\ is an escape character for (

This way I now have the links to paste into videomass which is a frontend GUI for yt_dlp

BTW if videomass can't find your yt_dlp you must install it with the python method
python3 -m pip install -U yt-dlp

You can update yt-dlp anytime with
yt-dlp -U
AppImages run on any linux distro and contain all dependencies. Similar to flatpak (which is ok) and the terrible and must remove if you have it snap.

Download appimage into a directory then right click on appimage — Permissions — check Allow this file to run as a program


Compatibility with most linux distributions.

Simple to run i.e download,make it executable and run.since it is not installed no system libraries are altered.

Download and use trusted software directly from the original author(s).

Uninstalling is as simple as just deleting the file.
To create a shortcut of an appimage into your Applications menu (Linux Mint XFCE) but probably works with Cinammon too

On your Desktop right click and choose Create Launcher
Name: Krita 5.2.0
Command: browse to your directory of appimages and choose Krita.appimage

right click on Krita 5_2_0.desktop file you just created and open with Text Editor and add Categories=Graphics;
save the file

sudo mv /Desktop/Krita 5_2_0.desktop /usr/share/applications

Now Krita will appear in your Menu

If you have many appimages it's best just to drag your appimages folder to sidebar in the file manager and open them by double clicking them. That's what I do.
Mainting aspect ratios. Just like in some photo editing programs when you resize an image by dragging a photo at its corner you need to hold SHIFT to lock its aspect ratio so the same concept for upscaling or descaling videos you wish to re-encode.

In ffmpeg using
-vf scale=-2:720

-2 preserves aspect ratio and 720 says downscale to 720p. In the screenshot it’s a 1080p (970p) video and no need to use this aspect ratio calculator to figure out your width would need to be 1475.

Posted more in depth about this here
https://t.iss.one/geektips/29

Aspect ratio calculator isn’t needed
https://andrew.hedges.name/experiments/aspect_ratio/
zfs-cheat-sheet-98234.pdf
38.3 KB
ZFS cheat sheet
Video and audio conferencing. Most know Zoom. Telegram in July 2021 rolled out up to 30 participants. Easily can record the video stream and or just audio and after sends them to your Saved messages. I’d still re-encode them to reduce the file size.

Jistsi I’ve used a little bit but no longer a fan. Jami I am a fan of and can do video conferencing too and around 30 too. Jami is totally decentralized. In fact I became aware of it when investigating off the grid communication. Supposedly you can have a Wi-Fi network setup WITHOUT internet access (like on a ship) and two phones can communicate video / audio or text / video / audio messaging. Send files even.

December 23, 2021 they’ve finally released the swarm feature. I need to get more people on Jami because between Telegram and Jami those seem to have the best privacy options. Once Jami gets group chat guessing mid 2022 it should be really good. Right now just 1 to 1 chat for swarm.

https://jami.net/taranis-a-major-release-of-jami/
Jami swarm feature just means conversation history you have with someone will show up on your eyephone, android, Linux, windoze or BigMac. So what? All social media apps do this. Yes but Jami doesn’t have central servers so it was a huge technical feat to implement.

— no phone number or email for registration
— distributed, peer to peer, no server
— no ads ever
Linux Mint XFCE 20.3 is out. Download the the ISO with torrent using Transmission. On Windows or Linux use QBitTorrent.

If you never have used torrent before then be sure to set your Upload speed to something low and Stop seeding ratio (sharing) ratio at like .25 (1/4). So if you download 2GB you share 500MB.

I plan to just upgrade Linux Mint 20.2 to 20.3 following these instructions
Quickly trim a video with videomass. Choose Presets Manager | load video | go to next panel | View | Show Timeline (CTRL-T).

Here I trim out from 05:07 to the end 05:38