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
Another Regular Expressions Regex cheat sheet / quick reference guide
GREP (Global REplace and Print) command used in iThoughts app on iOS

m..n - Tamzin, Germaine, Tomlin, McEntire

m.n - Amanda, feminist, Minogue, Monaco

man$ - matches what ends in man Portman, Kidman, Chapman but NOT Amanda
sausage$ will match all text where the line ends with sausage ($ means 'end of line')

^ma - matches what starts in ma Mayor, May, Mary, Matt but NOT Pitman, Huma
^sausage will match all text where the line starts with sausage (^ means 'start of line')

sausage[1-3] will match on sausage1, sausage2, sausage3 but NOT sausage4.

[0-9] - only digits [A-Z] - only letters
freac free audio encoder (free GPL) use to convert all mp3 320kbps to opus 96kbps. Sounds excellent and 3x small than mp3. Freac also use to get an audio stream from a mp4 or mkv video file.

Drag folder(s) into freac. Don't do more than 200 at once.
General settings I choose filename usually or <track> - <artist> - <title>
opus encoder settings 96kbps Music VBR
LAME mp3 encoder settings 192kbps for audiobooks from mp4/mkv video files
Encode settings - Encode output to same source folder and Delete original files after encoding saves tons of time
freac encodes in parallel using all CPU cores
Veracrypt is a free hard disk and partition encryption program. Even has plausible deniability if so needed. Create a Volume by following the easy tutorial on Vercrypt's website.

Encryption Algorithms - all are Key size 256 bits and Block Size 128 bits

AES J. Daemen, V. Rijmen 2001
Camellia Mitsubishi Electric and NTT of Japan 2000
Kuznyechik National Standard of the Russian Federation GOST R 34.12-2015 2015
Serpent R. Anderson, E. Biham, L. Knudsen 1998
Twofish B. Schneier, J. Kelsey, D. Whiting, D. Wagner, C. Hall, N. Ferguson 1998

Personal rating Kuzneychik > Camellia > Serpent > AES > Twofish so with that said choose your poison combo
AES-Twofish 
AES-Twofish-Serpent 
Camellia-Kuznyechik 
Camellia-Serpent 
Kuznyechik-AES 
Kuznyechik-Serpent-Camellia 
Kuznyechik-Twofish 
Serpent-AES 
Serpent-Twofish-AES 
Twofish-Serpent   

Encryption benchmark. Slower I'd assume is better
Hash Algorithms - recommend either Whirlpool or Streebog

RIPEMD-160 1996 160 bits
SHA-256 by NSA 2002 256 bits
SHA-512 by NSA 2002 512 bits
Whirlpool by Vincent Rijmen (co-designer of the AES encryption algorithm) and Paulo S. L. M. Barreto 2003 512 bits 
Streebog competitor of NIST SHA-3 standard 2012 512 bits 


Hash speed. Slower indicates better
Select Device / input password / check save cache if mounting multiple drives with the same password
If more than one drive or partition is encrypted choose Mount All and Dismount All
always select the partition not the root or 200MB partition
shows Encryption and Hash algorithms used
when it boots up never choose Initialize just Ignore else it'll format your disk
On Mac and Windows veracrypt under Emby just works with encrypted external drives.

Linux Mint here's what needs to be done.

sudo mkdir /media/emby

each time you mount the encrypted drive

veracrypt /dev/sdb2 --filesystem=none 

(or you can use the GUI and click OPTIONS then Filesystem check Do Not Mount)..change sdb2 to whatever your disk partition is

sudo mount -o umask=022,uid=mint,gid=mint /dev/mapper/veracrypt1 /media/emby

put your username in place of mint
then to umount it do

sudo umount /media/emby

then in veracrypt GUI dismount
m4b audiobook players

iOS BookPlayer (free) shows chapters.

Android Smartbook Audio Player $2 and Listen Audiobook Player $2 both show chapters.

Mac OS use IINA or VLC - Linux use Cozy and for more than 132+ chapters use DeadBeef audioplayer.
m4b-tool is multi platform Windows, Mac, Linux for setting it up is for advanced users but once it's setup you're good to go and each time you only need to change the directory location, filename, title, author.

m4b-tool (free) is better than AudioBook Builder as it doesn't have the iPod 32 bit limitation so the created audiobook can be as big as size as necessary.  Also it can use threads so it's much faster. Plus it's free.
Install the according to the OS instructions then after done don't forget the final step (scroll down) on m4b-tool page and install the latest beta version release.

If you are sure, all dependencies are installed, the next step is to download the latest release of m4b-tool from https://github.com/sandreas/m4b-tool/releases

Depending on the operating system, you can rename m4b-tool.phar to m4b-tool and run m4b-tool --version directly from the command line. If you are not sure, you can always use the command php m4b-tool.phar --version to check if the installation was successful. This should work on every system.

Linux Mint 20.2 Uma and Ubuntu 20.4 I had to install these two files which solved the following error:
merging 4 files into test-tmpfiles/tmp_test.m4b, this can take a while Could not detect length for file 1-finished.m4b, output 'sh: 1: exec: mp4info: not found ' does not contain a valid length value

mp4v2-utils_2.0.0~dfsg0-6_amd64.deb

libmp4v2-2_2.0.0~dfsg0-6_amd64.deb

sudo dpkg -i mp4v2-utils_2.0.0~dfsg0-6_amd64.deb libmp4v2-2_2.0.0~dfsg0-6_amd64
m4b-tool list (list commands)
m4b-tool merge --help

Here is the command line I use in Terminal to create a single m4b audiobook with chapters from mp3 files in a directory. The mp3 files names will be how the chapters will be shown in the m4b audiobook. Put cover.jpg in the same directory.

m4b-tool merge -v --artist "God" --name "Bible King James Version" --use-filenames-as-chapters --no-chapter-reindexing --audio-bitrate 32k --audio-samplerate 22050 --audio-codec aac --audio-profile aac_he_v2 --jobs 4 "/home/mint/Music/bible" -o "Bible.m4b"

-v = verbose

--artist "Seneca" = author of audiobook for metadata. Title and Length metadata will be automatically included.

--name "Letters from a Stoic" = title of the audiobook for metadata

--use-filenames-as-chapters = name your files as you want the chapters to be named

--no-chapter-reindexing = forces it to use chapter names especially on large audiobooks

--audio-bitrate 32k = 32kbps seems to be good enough

--audio-codec aac = make sure you compiled or installed ffmpeg with libfdk_aac for best audio quality (very important) as detailed in the installation instructions.

--audio-profile aac_he_v2 = (Advanced Audio Codec High Efficiency version 2) saves 2-7MB or so per audiobook.

--jobs 4 = I have a quad-core CPU so I specify jobs 4 so it uses all CPU cores simultaneously
in quotes "put the path" to the .mp3 chapters to create your audiobook

-o "author and title of m4b audiobook" = output filename (make sure you put the .m4b extension as it will error and won't work)