Stream https flow with mpv and yt-dlp

How to stream https flow with mpv and yt-dlp ? 1yt-dlp -o - <url_to_stream> | mpv --demuxer-max-bytes=1G - with --demuxer-max-bytes, image stays sync with sound. to set specific configuration, you can use: ~/.config/yt-dlp/config ~/.config/mpv/mpv.conf

2023-11-16 · G2G

Set songs tags and rename songs filename with id3v2

in oneliner and mass renaming mode get tags information with exiftool and copy tags /rename mp3 file with id3v2 1IFS=$'\n';for MP3_NAME in *mp3; do 2 ARTIST=$(exiftool -artist "$MP3_NAME" | awk -F': ' '{print $2}'); 3 SONG=$(exiftool -title "$MP3_NAME" | awk -F': ' '{print $2}'); 4 ALBUM=$(exiftool -album "$MP3_NAME" | awk -F': ' '{print $2}'); 5 id3v2 -a "$ARTIST" -t "$SONG" -A "$ALBUM" --genre 45 "$MP3_NAME" ; 6 mv -vi "$MP3_NAME" "${ARTIST} - ${SONG}.mp3" ; 7done; 8IFS=$' \t\n' tags based on mp3 filename if some mp3 files are no tags with exiftool 1# move mp3 files without tags in 3mpty directory 2IFS=$'\n';for SONG in *mp3; do 3 [ -z "$(exiftool -artist "$SONG")" ] && \ 4 mv -vi "$SONG" 3mpty/ ; 5done 6cd 3mpty 7 8# set tags on mp3 files from filename with this format "artist - title.mp3" 9IFS=$'\n'; for SONG_FILENAME in *mp3; do 10 ARTIST=$(echo "$SONG_FILENAME" | sed 's/ - .*$//'); 11 TITLE=$(echo "$SONG_FILENAME" | sed 's/^.*- \(.*\)\..*$/\1/'); 12 id3v2 -a "$ARTIST" -t "$TITLE" "$SONG_FILENAME"; 13done; 14IFS=$' \t\n' id3v2 commands that may help 1id3v2 -h 2id3v2 --list-frames # list id3v2 frames 3id3v2 --list-genres # list id3v1 genres 4id3v2 --delete-all # remove all tags from mp3 file

2020-04-05 · G2G

Manage subtitles with mpv media player

with hotkeys add custom hotkeys to increase / decrease subtitle size 1cat <EOF>> ~/.config/mpv/input.conf 2# increase subtitle font size 3ALT+k add sub-scale +0.1 4 5# decrease subtitle font size 6ALT+j add sub-scale -0.1 HOTKEYS v => show/hide subtitle ALT+k => increase subtitle size ALT+j => decrease subtitle size

2020-02-12 · G2G

Get captions from Youtube video

(…not video’s subtitle) 1youtube-dl --o "%(title)s.%(id)s.%(ext)s" $URL; # first stop 2youtube-dl --sub-lang en --write-auto-sub --sub-format srt --skip-download -o "%(title)s.%(id)s.%(ext)s" $URL; # and finally if you’re using mpv as video player, use v to display captions.

2020-01-21 · G2G