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
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
freac (open source free) re-encode 256 and 128kbps mp3s (just talking / no music) to 32kbps. Can set in encoding options to automatically delete source files and to output to same folder as source. Also use this to convert entire music collection mp3 320kbps files —> opus 96kbps files.
Apps you wish to startup at boot. Go to Settings | Session and Startup
I have three that I specifically wish to startup everytime Linux Mint boots

VLC I use the command
/usr/bin/vlc --started-from-file %U --http-port 8091

AuthPass (password manager)
/home/mint/appimages/apps/authpass/authpass

Psensor (monitors CPU temperature and usage and memory usage
psensor
Combine a subtitle SRT file and hard burn-in video. Usually for movies, tv shows you don't want to do this as you just use external SRT files. However, if your audience is say on telegram and they aren't gonna download the mp4 or mkv along with the SRT then this is a solution.

Here's my videomass command I used to encode an mp4. Notice double quotes " enclose the single quotes '.

-c:v hevc -crf 28 -c:a libopus -b:a 32k -strict -2 -vf subtitles="'/home/mint/videos/movie.srt'"
In case you wish to do it with Handbrake hard burn-in SRT subtitles this is how you'd do it. Be sure to set the language and browse for your external SRT file.
Timeshift is a backup utility for your system files only. I recommend set it to once a week and just keep one snapshot if something goes wrong you can restore a snapshot. In the screenshot it shows 20.2 which I could revert back to in case 20.3 upgrade didn't go smooth. No need to though as it went without a hitch as expected.
Mozilla makes Firefox and even though they're a terrible organization it’s their browser I use on Linux. So by default the security settings are a joke. So configure your settings like so for somewhat of privacy.
Firefox — Settings — Search

DuckDuckGo is still own by #$^$#^ but better than alternatives. Don't let Firefox provide search suggestions that means you'd be allowing it to use it's recommended algorithms to influence you.
Firefox — Settings — Cookies and Site Data

Delete cookies and site data when Firefox is closed. This keeps your History nice and clean. Don't let it remember your logins and passwords nor fill out forms. Instead use authpass as a password manager.