Skip to content

Instantly share code, notes, and snippets.

View aphex3k's full-sized avatar
🇺🇦
Слава Україні!

Michael Henke aphex3k

🇺🇦
Слава Україні!
  • Dexcom
  • San Diego, CA
  • 05:48 (UTC -07:00)
View GitHub Profile
@aphex3k
aphex3k / plex_pp.sh
Last active October 6, 2021 17:00
Plex Server postprocessing script to convert MPEG2-TS to 10-bit HEVC mp4
#!/bin/bash
#
# Plex DVR Postprocessing
renice -n 19 -p $$
ionice -n 3 -p $$
# https://forums.plex.tv/t/plexpostproc-script-error-1-failed-to-convert-using-ffmepg/316669/7
LD_LIBRARY_PATH=/home/micha/ffmpeg_build/lib:/home/micha/ffmpeg_build/lib:/usr/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH
@aphex3k
aphex3k / wg-quick@wg0.socket
Last active September 25, 2019 23:29
Start WireGuard when connection to the listen port is made
[Unit]
Description=WireGuard wg0 socket
Before=wg-quick@wg0.service
Conflicts=wg-quick@wg0.service
[Socket]
ListenDatagram=51228
Accept=false
[Install]
@aphex3k
aphex3k / about.txt
Created September 10, 2019 21:21
Visual Studio Community 2019 for Mac
=== Visual Studio Community 2019 for Mac ===
Version 8.2.5 (build 42)
Installation UUID: be905dc1-cf48-41ed-aafd-8f0626e45e3c
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.14.0.85 (d16-2-fix-mac-updates / 86973979)
Package version: 600000333
=== Mono Framework MDK ===
@aphex3k
aphex3k / coin_block_list
Last active March 18, 2024 02:18
This list disables browser based miners such as coin-hive
# Contribute: https://gitlab.com/ZeroDot1/CoinBlockerLists/issues/new
# Copyright: (c) ZeroDot1, 2019
# Description: This list disables browser based miners such as coin-hive
# Donate: http://bit.ly/CBLDonate Every donation keeps the future development going. Thank you.
# Homepage: https://gitlab.com/ZeroDot1/CoinBlockerLists/
# Last modified: 2019-09-13 15:09
# License: https://gitlab.io/ZeroDot1/CoinBlockerLists/LICENSE
# [CoinBlocker hosts List by ZeroDot1]
0.0.0.0 0-100-195.btcc.com
0.0.0.0 0-104.openvpn.f2pool.com
@aphex3k
aphex3k / blacklist
Last active June 11, 2020 01:52
This blocklist is tailored to my liking and specific use case. Use with caution and at your own risk.
# Title: aphex3k/blacklist
# This blocklist is tailored to my liking and specific use case. Use
# with caution and at your own risk.
# ===============================================================
vungle.com
www.vungle.com
bild.de
www.bild.de
t-online.de
@aphex3k
aphex3k / External Compression.md
Last active July 7, 2020 22:43
EAC Additional command-line options

MP3

Audio-Book, mono, good quality, small files

-V0 -B 48 -Y -q 0 -m m -p -c --resample 22.05

AAC

Audio-Book, good quality, small files

@aphex3k
aphex3k / ffmpeg_cuda.md
Last active September 1, 2022 09:29
Transcoding MPEG2 TS to H.264 MP4

Transcoding MPEG2 TS to H.264 MP4

The goal is to transcode a DVR recording containing one video source in mpeg2 format, any number (typically 2-3) of audio sources in ac-3 format and maybe a subtitle source all together in a transport stream container. In addition the video stream might be interlaced.

The target is a video file playable natively on modern iOS and Android devices using their platforms native and hardware supported playback capabilities.

Target file container and formats

The target file container and supported stream formats are listed below to ensure very good playback compatibility on modern devices and platforms.

  • MP4/M4V container format
@aphex3k
aphex3k / practical examples.md
Created November 28, 2018 05:45
FFMPEG transcoding using NVENC

ffmpeg -y -hwaccel cuvid -c:v mpeg2_cuvid -i input.ts -c:v h264_nvenc -preset slow -profile:v high -level 4.2 -vf format=yuv420p -rc vbr_hq -qmin 23 -qmax 32 -maxrate 5M -bufsize 10M -c:a copy -map 0:0 -map 0:1 output.mp4

@aphex3k
aphex3k / pi-compose
Created November 13, 2018 19:11
compose image to fullscreen wallpaper for raspberry pi touchscreen display
#!/bin/bash
t_width=800
t_height=480
if [ -f "${1}" ]
then
convert "${1}" -auto-orient oriented.bmp
convert oriented.bmp -resize ${t_width}x${t_height} foreground.bmp
convert oriented.bmp -resize ${t_width}x${t_height}^ -gaussian-blur 5x5 -crop ${t_width}x${t_height}+0+0 -modulate 120,10 background.bmp