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
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)
If you wanna update or correct the author (artist) or title (name) of the book you can do it to an existing m4b audiobook. Say you named it --name "Prince" but wanna correct it to "The Prince" do like so:

m4b-tool meta --name "The Prince" The Prince.m4b
split audio into 20 min equal time interval segments split00.mp3, split01.mp3, split02.mp3, split03.mp3

ffmpeg -i input.m4b -c copy -f segment -segment_time 20:00 -reset_timestamps 1 split%02d.mp3

-reset_timestamps 1 is critical as for each segment it recalculates the time
%02d outputs 00, 01, 02, 03, etc. change to %03d for 000, 001, 002, 003, etc.
1) split an m4b audiobook into multiple mka or mkv audio files for each chapter (if it already has chapters) with MKVToolnix. Drag m4b file into MKVToolnix into Multiplexer then choose Output tab
Split mode: Before chapters
Chapter numbers: all
Must rename chapters to their original names though.

2) With Freac by importing m4b and outputting an mp3 for each chapter but has to re-encode them

3) With m4b-tool
m4b-tool split --audio-format mp3 --audio-bitrate 96k "data/my-audio-book.m4b"

extracts all chapters from m4b audio book and re-encodes them
Komga https://komga.org
PDF, CBZ, CBR (Comic books) and epub server that's free. (No built in reader for epubs just can download and see their covers) a huge advantage over Ubooquity is it streams the PDF a page or two at a time so you don't have to download the entire PDF to read it. Tracks reading progress, built-in streaming full screen reader, regex searching for titles.
Libraries on left panel with PDF covers
add library by naming it and choosing a folder