add:media
This commit is contained in:
4
media/README.md
Normal file
4
media/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
playlist.sh: runs mpv with a folder of music as a playlist
|
||||
video-compress.sh: compresses and or convert a video with ffmpeg
|
||||
webpconvert.sh: converts an image to webp
|
||||
- need convert to rust/go
|
||||
2
media/video-compress.sh
Executable file
2
media/video-compress.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
ffmpeg -i "$1" -c:v libx265 -crf 24 -preset medium -c:a aac -b:a 128k "$2"
|
||||
13
media/webpconvert.sh
Executable file
13
media/webpconvert.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# TODO add resource options like ogcard, yt-thumbnail, etc
|
||||
# convert to golang or rust probably for better ux on cli
|
||||
DEFAULT_WIDTH=1200
|
||||
|
||||
if [ "$#" -lt 2 ] || [ "$#" -gt 3 ]; then
|
||||
echo "Usage: $0 <input> <output> [width]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WIDTH="${3:-$DEFAULT_WIDTH}"
|
||||
|
||||
magick "$1" -resize "${WIDTH}x>" -quality 85 "$2"
|
||||
@@ -1 +0,0 @@
|
||||
playlist.sh: runs mpv with a folder of music as a playlist
|
||||
Reference in New Issue
Block a user