Some personal scripts I use to setup my system(s) on CachyOS. Included are some useful utility scripts for CLI usage.
| Script | Description |
|---|---|
| compressvid | Compress a local video file with smart-replace logic. Uses HEVC via NVENC or libx265. |
| getAudio | Extract audio from a video as MP3. Supports VBR quality and a mono/64 kbps lecture mode. |
| viddl | Download YouTube videos/playlists with yt-dlp, with optional post-download GPU/CPU compression. |
| playmusic | Search YouTube, stream audio through mpv, manage history & favourites, download MP3s. |
| listScripts | Print a summary of all scripts. Pass -h to display every script's full help panel. |
git clone https://github.com/zoroaster1x/personal-scripts.git
cd personal-scripts
python setupMSIArch.py # installs all packages, copies scripts to ~/.local/binsetupMSIArch.py installs everything through paru or yay (whichever is available), including:
- ffmpeg – required by compressvid, getAudio, and viddl
- python-rich – pretty terminal output used by every script
- yt-dlp – YouTube downloading (CLI + Python library)
- mpv-mpris / playerctl – audio playback for playmusic
It also copies every file in
scripts/to~/.local/binand makes them executable.
compressvid video.mp4 # medium HEVC compression (NVENC or CPU)
compressvid video.mp4 -c high # high compression
compressvid video.mp4 -r # smart-replace (keeps original if savings < 1 MB)
compressvid video.mp4 -r -a # smart-replace + extract MP3
compressvid video.mp4 -o out.mp4 # custom output pathCompression levels map to CQ/CRF values: light = 24, medium = 29, high = 34.
getAudio video.mp4 # VBR quality 2 (~192 kbps)
getAudio lecture.mp4 -l # mono 64 kbps (great for speech)
getAudio video.mp4 -q 0 -o ~/Music/ # best quality, save to directoryviddl "https://youtube.com/watch?v=..." # 720p, saved to ~/Downloads
viddl "URL1" "URL2" -q high # batch 1080p+
viddl "https://..." -a # audio-only MP3
viddl "https://..." -c high -p ~/Vids # download + max compressionplaymusic "artist - song" # search & pick from results
playmusic "rotary park" -f # auto-play first result
playmusic "Hawaii Part II" -a -b -l # album, background, loop
playmusic -H # show playback history
playmusic -F # show favourites
playmusic -k # kill background playerConfig lives in ~/.config/playmusic/config.json (timeout, volume, result count).
History and favourites are stored under ~/.local/state/playmusic/.
listScripts # summary table
listScripts -h # full help for every scriptBoth compressvid and viddl probe ffmpeg -encoders at runtime:
- NVENC available →
hevc_nvencwith CUDA hardware decode and presetp5. - NVENC unavailable →
libx265with presetmedium(works on any machine with ffmpeg).
No flags are needed; the fastest available encoder is selected automatically.