Skip to content

Instantly share code, notes, and snippets.

View hizkifw's full-sized avatar
🍝

Hizkia Felix hizkifw

🍝
View GitHub Profile
@Andrey2G
Andrey2G / encoding.txt
Last active November 13, 2024 02:59
Video Encoding with multiple resolutions
ffmpeg -i "c:/videos/sample.mp4
-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0
-c:v libx264 -crf 22 -c:a aac -ar 48000
-filter:v:0 scale=w=480:h=360 -maxrate:v:0 600k -b:a:0 64k
-filter:v:1 scale=w=640:h=480 -maxrate:v:1 900k -b:a:1 128k
-filter:v:2 scale=w=1280:h=720 -maxrate:v:2 900k -b:a:2 128k
-var_stream_map "v:0,a:0,name:360p v:1,a:1,name:480p v:2,a:2,name:720p"
-preset slow -hls_list_size 0 -threads 0 -f hls -hls_playlist_type event -hls_time 3
-hls_flags independent_segments -master_pl_name "name-pl.m3u8"
"c:/videos/encoded/name-%v.m3u8"
@hizkifw
hizkifw / tic_tac_toe.py
Created July 5, 2017 15:58
A simple Tic-Tac-Toe engine in Python
import os
matrix = [
[" ", " ", " "],
[" ", " ", " "],
[" ", " ", " "]
]
keymap = [
"Q", "W", "E",
"A", "S", "D",
@hthighway
hthighway / plexdrive.service
Last active March 16, 2021 20:30
SYSTEMD files for plexdrive. Ceates a plexdrive mount and then a UnionFS of local and remote content (SEE updated version here: https://github.com/hthighway/scripts/tree/master/plexdrive )
[Unit]
Description=Plexdrive
AssertPathIsDirectory=/mnt/plexdrive
After=network-online.target
[Service]
Type=simple
#
# uid & gid values are for the user that you want to run plexdrive, $id will give you the values for the logged in user
#