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
MusicBrainz Picard (free on Win, Linux, Mac) easy to edit a chaptered opus audiobook. Can change chapter names or even times.
After converting to mka with MKVToolnix which fixes most mp3 errors and then with videomass (ffmpeg) you convert to opus and you still get this error you must deleted these corrupt mp3s as it'll destroy chapter times in the entire opus audiobook. See here for more info
Notes from this excellent Regular Expression Article

grep -o -w "\w\{5\}" wordle-caps.txt > wordle-complete.txt

The regex string itself, \w\{5\} is equivalent to five continuous characters

shuf -n 5 wordle-complete.txt

grep '[^ED][A][T][^ED][^ED]' wordle1 > wordle2

The circumflex ( ^ ) means that the single statement should be inverted, similar to the -v switch. So the full regular expression [^ED][A][T] [^ED][^ED] searches for a string of five letters. The first must not be E or D, the second must be an A, the third must be a T, and so on

grep '[^WP][A][T][A][^WP]' wordle2 >

The A can occur in the second, fourth, or fifth position, and the O can occur in the second, third, or fourth position. L and R do not occur at any position in the target word. The regex for this is [C][^LR][^LR][^LR][^LR]
WordleREGREX.pdf
2.1 MB
Worlde Regrex article
To make text to speech audio with the 9,000 character limit at ttstool dot com. Copy the text into LibreOffice Writer and go through spell checking it. Any titles or heading text put a period ( . ) to pause otherwise it'll speak without pausing the next paragraph and it's really bad.

Replace any IV, XX, Roman numerals with 4, 20, numerals.

Set View to Zoom Factor to Variable 50% to make it easy to select under 9,000 characters.

Hold down Shift key to add more or subtract characters around 7,000 to 8,500 or so paying attention to character count near bottom left. If you don't see it go to View | Status Bar. Then repeat this process as many times as necessary. This document had 55,094 characters total so copied and pasted 7 times.
ttstool dot com Choose a language then a voice. Favorites are Microsoft David, Mark, James and Amazon Joey. Drag bottom right corner to get more text area. Copy and paste text keeping under the 9,000 character limit. Click download arrow to get the 32kbps mp3 file and name it narration01.mp3, narration02.mp3, narration03.mp3 and so on.
In Videomass (multiplatform, GPL, free, ffmpeg front-end GUI) choose Concatenate media files and drag your narrated mp3 files. Sidenote: LosslessCut (GPL) also works great concatenating audio/video files. This gives you one mp3 file which you encode with freac at opus 16kbps voice and be sure to change Title metadata in freac.
Split an audiobook into 60 min chapters

ffmpeg -i someaudiobook.mp3 -c copy -f segment -segment_time 1:00:00 -reset_timestamps 1 ch%02d.mp3
Generate a PDF TOC (Table of Contents) and bookmarks from filenames. I tried jpdftweak, jpdfbookmarks but PDFSAM (Basic Version free, Linux and Windoze) does the job perfectly.
It creates an clickable table of contents at the beginning and also bookmarks. Also it compressed the file from 916MB (874MiB) (pdftk *.pdf cat output combined.pdf) to 810MB (773MiB) with PDFSAM.
Showing Thumbnail of the top portion of the page for the clickable link in the Table of Contents.
Back to adding some Subtitles with Gaupol (flatpak).
Edit a few videos together and add soundtracks in Shotcut (Linux, Mac, Windoze GPL)
Using LosslessCut (Linux, Mac, Windoze GPL) to make quick editing cuts of mp3s. Trim off the first 22 seconds and last 20 seconds of each file before encoding into a opus chaptered audiobook with freac.
These are the options that I use for mp3s. But for videos I use SmartCut or keyframe cuts.
Queue up the files you wish to batch download in Videomass (Linux, Mac, Windoze GPL free) which uses yl-dlp to downlaod from youtube, bitchute, odysee, etc.
Download all the videos in Videomass
Queue up all the videos you wish to re-encode to reduce file size keeping 720p.
-c:v hevc -crf 28 -c:a libopus -b:a 16k -vf scale="-2:720"

The preset I use. - 2 keeps aspect ratio even if you upscale or downscale video. hevc = x265. -crf 28 I use for most videos. -crf 23 for a great documentary or movie and -crf 31 for VHS quality.
Legogender
Liaspec
Liaspec
Librafeminine
Librafeminine
Libragender
Libragender
Libralesbian
Libralesbian
Libramasculine
Libramasculine
Libramaverique
Libramaverique
Librandrogyne
Librandrogyne
Libranonbinary
Libranonbinary
Lilafluid
Lilafluid
Lingender
Lingender
Linkgender
Littlefluid
Littlefluid
Lolgender
Ludogender
Lunagender
Lunagender
Lunarset
Lunarset

Remove duplicate lines without changing order
nl -w1 gender.txt | sort -k2 | uniq -f1 | sort -n | cut -f2- > output.txt

or this one works too keeping original order
awk '!seen[$0]++' gender.txt > output.txt

Legogender
Liaspec
Librafeminine
Libragender
Libralesbian
Libramasculine
Libramaverique
Librandrogyne
Libranonbinary
Lilafluid
Lingender
Linkgender
Littlefluid
Lolgender
Ludogender
Lunagender
Lunarset
regex searches for and replaces digits up to 13 times after a dash -
-(\d){13}