Made my first Github repo.
Inspired by https://github.com/occivink/mpv-image-viewer, made mpv into a great little image viewer combining a few others scripts and my own configs. It also has my mpv as video player configs. Amazing piece of software, I keep thinking !!
And a little bash function to play youtube music. I also have a video cutting bash function that has a bug so didn’t post in Github. Maybe someone can help me with that. Also suggestions for improvements in mpv configs/scripts/shaders are welcome.
ytdlcut ()
{
ffmpeg -ss "$2" -i "$(youtube-dl -f "bv*[height<=?1440]" -g --youtube-skip-dash-manifest $1)" -t "$3" -c copy "$(echo "$(youtube-dl -e $1)" | sed 's/[^a-zA-Z0-9 ]//g')-cut.mkv"
}
This works fine if video has both audio and video which youtube doesn’t except for low res 720p, 360p etc. Using 2 inputs works but video starttime and duration are both wrong ffmpeg related problem maybe?
ytdlcut ()
{
ffmpeg -ss "$2" -i "$(youtube-dl -f "bv[height<=?1440]" -g --youtube-skip-dash-manifest $1)" -t "$3" -ss "$2" -i "$(youtube-dl -f bestaudio -g --youtube-skip-dash-manifest $1)" -t "$3" -c copy "$(echo "$(youtube-dl -e $1)" | sed 's/[^a-zA-Z0-9 ]//g')-cut.mkv"
}
Cheers.