Joey Hafner
b83b70cb23
Some checks are pending
SSH and echo to file / ssh (push) Waiting to run
- Update flake to get most recent versions of librespot, spotify-player - Add obs-toggle-recording script, wrap OBS with nixGL - Prune flatpaks: Bottles, Chromium, Gnome Platform, Zoom, Kontact, Neochat - Add unstable packages: librespot, fzf, deploy-rs - Create librespot Systemd unit, enable spotify-player.
26 lines
800 B
Nix
26 lines
800 B
Nix
{ pkgs, ... }:{
|
|
home.packages = with pkgs; [
|
|
ffmpeg_7-full
|
|
( writeShellApplication {
|
|
name = "send-to-x264-mp4"; # { filePath }: { none } (side-effect: transcodes & remuxes file to x264/mp4)
|
|
runtimeInputs = [
|
|
libnotify
|
|
];
|
|
text = ''
|
|
INPUT_FILE=$(realpath "$1")
|
|
|
|
FILE_PATH=$(dirname "$INPUT_FILE")
|
|
FILE_NAME=$(basename "$INPUT_FILE")
|
|
FILE_NAME="''${''\FILE_NAME%.*}"
|
|
|
|
OUTFILE="$FILE_PATH/$FILE_NAME.mp4"
|
|
|
|
notify-send -t 2000 "Transcode starting" "$FILE_NAME"
|
|
|
|
nixGL ffmpeg -hide_banner -vaapi_device /dev/dri/renderD128 -i "$INPUT_FILE" -map 0 -vf 'format=nv12,hwupload' -c:v h264_vaapi -b:v 8M -c:a copy "$OUTFILE"
|
|
|
|
notify-send -t 4000 "Transcode complete" "$FILE_NAME"
|
|
'';
|
|
} )
|
|
];
|
|
} |