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
Qrafter Pro ($5 iOS) create QR codes for websites (URL) or your Wi-Fi password so guests can just scan them.

I tried about five different online ones and these two seem the best (just had ads on webpage) to generate your own QR code.) https://qrgenerator.org
https://qr-code-generator.org

In LibreOffice Writer choose Insert | Object | QR Code and you can put a URL or any text.
PhotoLayers (free with ads or $2 iOS). Can do 10 overlay images with automatic masking (cutting out background) and can edit any layer at a time. In Juxtaposer ($5 iOS) app it’s good also but can’t go back to edit a top image or layer once it’s done.
Linux
- Document Viewer (xreader 3.0.2) is very fast PDF viewer, double pages, CTRL-I inverted mode (night mode), select and copy text but no Annotation or highlighting.

- sudo apt install evince which is pretty much same as Document Viewer but has highlighting CTRL-H

To reduce a size of a PDF though by compressing JPEG images and lowering the DPI

/prepress (default) Higher quality output (300 dpi) but bigger size
/ebook Medium quality output (150 dpi) with moderate output file size
/screen Lower quality output (72 dpi) but smallest possible output file size

ps2pdf -dPDFSETTINGS=/ebook input.pdf output.pdf

To
extract, delete, rotate, split PDF pages use PDF Arranger
sudo apt install pdfarranger
Host Minder (Linux app) uses /etc/hosts file to block 100,000+ bad domains with 0.0.0.0 ...free and easy to change levels. These consolidated hosts files allow you to block websites from various categories such as Ads, Porn, Gambling, Social, and Fake News. Linux
Linux to remotely control your computer

sudo apt install tigervnc-scraping-server
x0vncserver -SecurityTypes=none
connect with any VNC client with encryption disabled and anything for a password since SecurityTypes=none means no password at all. Only do this at home on a local LAN and don't port forward your port on your router.
Make your own epub with free open source LibreOffice Writer

Tools | Chapter Numbering and Paragraph Style choose Heading 2 (or 1 or 3)
Highlight each chapter then right click and choose paragraph | Heading 2 you wish to include in the Table of Contents (usally each one...just in this bible I'm doing every 5)
Quicker way is double click on chapter then use the keyboard shortcut
At the top of the document choose Insert | Table of Contents and Index | Table of Contents, Index or Bibliography
After you've made a few chapters with paragraph style of Heading 2 right click on a TOC Table of Contents and Update Index. This is invisible part of the epub just put in the Outline of the epub when you export it.
Export your epub 3.0. Add a cover jpg image, set Title and Author.
epub outline or Table of contents on eyephone
epub in dark mode on eyephone using Kybook 3
Splitting video (mp4 or mkv) into fixed intervals as chapter markers into a single mkv file.  Drag mp4 or mkv video into MKVToolNix (open source Linux, Mac, Win) into the Multiplexer | Output and choose Chapters in fixed intervals | Start Multiplexing

Chapter <NUM:2> will give Chapter 01, Chapter 02, etc. or change to <NUM:3> for Chapter 001, Chapter 002, etc. 00:15:00 or 15:00 or 15m will split audio into chapters every 15 minutes.
split video file (mp4 or mkv) into fixed intervals for each file video001.mkv, video002.mkv, etc.

splits into multiple files each 2 minutes
ffmpeg tips

ffmpeg is an open source free video encoder, muxer, audio encoder

split video into 3 min equal time interval segments split00.mp4, split01.mp4, split02.mp4, split03.mp4

ffmpeg -i input.mp4 -c copy -f segment -segment_time 3:00 -reset_timestamps 1 test%02d.mp4

-reset_timestamps 1
is critical as for each segment it recalculates the time

%02d outputs 00, 01, 02, 03, etc. change to %03 for 000, 001, 002, 003, etc.

for an hour use 1:00:00 not 60:00
ffmpeg tips
Extracts audio from a video file to an mp3  -b:a 256k - set audio bitrate (default 128kbps) -ar 44100 - Set the audio frequency of the output file.  22050, 44100, 48000 Hz. -ac 2 - Set the number of audio channels. (1 mono, 2 stereo, etc.) -vn -an -sn (skip video, audio, or subtitle stream)
ffmpeg -i input.mp4 -vn output.mp3

Extract a portion from video --ss (starting time at 6 mins) -t (time duration 4m30s) OR -to (time stop)

New video clip will be from 6 mins to 10min 30seconds mark and 4 mins and 30 seconds in length.

ffmpeg -i input.mp4 -ss 6:00 -t 4:30 output.mp4
ffmpeg -i input.mp4 -ss 6:00 -to 10:30 output.mp4
Encode a video to x265 (hevc) --crf 28 (default) 23 is better quality but bigger file size for great movies

-crf 31 is ok for a small file size
--preset medium (default) could try fast or slow but slow isn't worth the extra encoding time. Fast is about same as medium encoding time so default I believe is perfect.
-c:v  hevc (encoding to x265)
-c:v copy passthru video doesn't touch original video stream
-c:a copy passthru doesn't touch original audio stream.  
-c:s copy passthru copy subtitle stream.
-c copy will copy video, audio, subtitle streams as is (passthru)

from START of video or to END of video simply don't specify anything
ffmpeg -i input.mp4 -to 5:30 output.mp4 
ffmpeg -i input.mp4 -ss 6:32 output.mp4

encode clip from START of movie to 5 min 30 sec mark (to indicate START don't specify -ss)
encode clip from 6 min 32 sec mark till END of video (to indicated END time don't specify -to)