2019-10-24 02:20:38 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2022-03-09 06:51:59 +01:00
|
|
|
# Lassulus streaming setup
|
|
|
|
# -------------------------
|
|
|
|
# ffmpeg \
|
|
|
|
# -f pulse \
|
|
|
|
# -i default \
|
|
|
|
# -vaapi_device /dev/dri/renderD128 \
|
|
|
|
# -f x11grab \
|
|
|
|
# -video_size 1366x768 \
|
|
|
|
# -i :0 \
|
|
|
|
# -vf 'hwupload,scale_vaapi=format=nv12' \
|
|
|
|
# -c:v h264_vaapi \
|
|
|
|
# -c:a aac \
|
|
|
|
# -b:a 96k \
|
|
|
|
# -af "highpass=f=200, lowpass=f=3000" \
|
|
|
|
# -qp 30 \
|
|
|
|
# -f flv \
|
|
|
|
# rtmp://lassul.us:1935/stream/nixos \
|
|
|
|
# ./rc3-output-$(date +%d%H%M%S).mp4
|
|
|
|
#
|
|
|
|
# Dann abspielen mit :
|
|
|
|
# mpv rtmp://lassul.us:1935/stream/nixos
|
2022-02-25 12:12:32 +01:00
|
|
|
|
2019-10-24 02:20:38 +02:00
|
|
|
cfg = config.programs.custom.video;
|
|
|
|
|
2020-03-28 10:04:00 +01:00
|
|
|
# show keyboard input on desktop for screencasts
|
|
|
|
screenKey = pkgs.symlinkJoin {
|
|
|
|
name = "screen-keys";
|
2021-11-01 09:20:42 +01:00
|
|
|
paths =
|
|
|
|
let
|
|
|
|
screenKeyScript = { position ? "bottom", size ? "small", ... }:
|
|
|
|
pkgs.writeShellScriptBin "screenkeys-${position}-${size}" # sh
|
|
|
|
''
|
|
|
|
${pkgs.screenkey}/bin/screenkey \
|
|
|
|
--no-detach \
|
|
|
|
--bg-color '#fdf6e3' \
|
|
|
|
--font-color '#073642' \
|
|
|
|
-p ${position} \
|
|
|
|
-s ${size} \
|
|
|
|
"$@"
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
lib.flatten (lib.flip map [ "large" "small" "medium" ] (size:
|
|
|
|
lib.flip map [ "top" "center" "bottom" ]
|
|
|
|
(position: screenKeyScript { inherit size position; })));
|
2020-03-28 10:04:00 +01:00
|
|
|
};
|
|
|
|
|
2021-11-01 09:20:42 +01:00
|
|
|
in
|
|
|
|
{
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
options.programs.custom.video.enable = mkEnableOption "enable video tools";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
2022-05-25 18:32:53 +02:00
|
|
|
unstable.youtube-dl
|
2019-10-24 02:20:38 +02:00
|
|
|
mplayer
|
|
|
|
mpv
|
|
|
|
|
|
|
|
# to record your screen
|
|
|
|
# ---------------------
|
|
|
|
simplescreenrecorder
|
2020-03-28 10:04:00 +01:00
|
|
|
screenKey
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
# to transcode video material
|
|
|
|
# ---------------------------
|
|
|
|
handbrake
|
|
|
|
ffmpeg-full
|
|
|
|
|
|
|
|
# video editing
|
|
|
|
# -------------
|
|
|
|
openshot-qt
|
|
|
|
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|