From a1ec4771740d321df4480e8a7224fa10b59f0569 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Fri, 3 Apr 2026 22:46:48 +0200 Subject: Update repo with git init directly in home dir --- .config/nushell/dv.nu | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .config/nushell/dv.nu (limited to '.config/nushell/dv.nu') diff --git a/.config/nushell/dv.nu b/.config/nushell/dv.nu new file mode 100644 index 0000000..e5e382a --- /dev/null +++ b/.config/nushell/dv.nu @@ -0,0 +1,25 @@ +export def record [name: string] { + let location: path = $env.MISCPATH | path join / rawdv $name + mkdir $location + cd $location + dvgrab -a +} + +export def collect-to-mp4 [dvdirectory: string, name: string] { + let location: path = $env.MISCPATH | path join / rawdv $dvdirectory + let output_location: path = $env.MISCPATH | path join output + cd $location + let file_list = "tmp_file_list.txt" + ls **/*.dv + | get name + | each { |path| $"file '($path)'"} + | save $file_list + ffmpeg -f concat -safe 0 -i $file_list -c:v libx264 -crf 23 -preset medium $"($name).mp4" + mv $"($name).mp4" $output_location + rm $file_list +} + +export def record-and-save [name: string] { + record $name + collect-to-mp4 $name $name +} -- cgit v1.2.3