massive rewrite using flake-parts
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
9
pkgs/customscripts/src/ytmp3
Normal file
9
pkgs/customscripts/src/ytmp3
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p ffmpeg yt-dlp
|
||||
yt-dlp -f bestaudio -o "ytmp3.%(title)s.%(ext)s" "$1"
|
||||
file=$(echo ytmp3.*.*)
|
||||
newfile=$(echo $file | cut -c 7-)
|
||||
mv "$file" "$newfile"
|
||||
ffmpeg -i "$newfile" -c:a mp3 "${newfile%.*}.mp3"
|
||||
rm "$newfile"
|
||||
#trust me ive a reason for lossy->lossy transcoding
|
Reference in New Issue
Block a user